From c3ce05c594ded5c2ad20410719bd9e586aeff180 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Fri, 14 May 2010 19:16:02 +0000 Subject: [PATCH] Fix so "int3" is correctly accepted, added "into" and fixed "int" with an argument, like "int $4", to not get an Assertion error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103791 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86InstrInfo.td | 6 ++++-- test/MC/AsmParser/X86/x86_32-new-encoder.s | 13 +++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index 6d41a3d722b..818ccb0c440 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -542,8 +542,10 @@ let neverHasSideEffects = 1 in { } // Trap -def INT3 : I<0xcc, RawFrm, (outs), (ins), "int\t3", []>; -def INT : I<0xcd, RawFrm, (outs), (ins i8imm:$trap), "int\t$trap", []>; +def INTO : I<0xce, RawFrm, (outs), (ins), "into", []>; +def INT3 : I<0xcc, RawFrm, (outs), (ins), "int3", []>; +// FIXME: need to make sure that "int $3" matches int3 +def INT : Ii8<0xcd, RawFrm, (outs), (ins i8imm:$trap), "int\t$trap", []>; def IRET16 : I<0xcf, RawFrm, (outs), (ins), "iret{w}", []>, OpSize; def IRET32 : I<0xcf, RawFrm, (outs), (ins), "iret{l}", []>; diff --git a/test/MC/AsmParser/X86/x86_32-new-encoder.s b/test/MC/AsmParser/X86/x86_32-new-encoder.s index 136d6f51b85..bc716da8298 100644 --- a/test/MC/AsmParser/X86/x86_32-new-encoder.s +++ b/test/MC/AsmParser/X86/x86_32-new-encoder.s @@ -56,3 +56,16 @@ movb 0, %al // CHECK: movb 0, %al # encoding: [0xa0,A,A,A,A] movw 0, %ax // CHECK: movw 0, %ax # encoding: [0x66,0xa1,A,A,A,A] movl 0, %eax // CHECK: movl 0, %eax # encoding: [0xa1,A,A,A,A] +// rdar://7973775 +into +// CHECK: into +// CHECK: encoding: [0xce] +int3 +// CHECK: int3 +// CHECK: encoding: [0xcc] +int $4 +// CHECK: int $4 +// CHECK: encoding: [0xcd,0x04] +int $255 +// CHECK: int $255 +// CHECK: encoding: [0xcd,0xff] -- 2.34.1