[llvm-commits] [llvm] r138360 - in /llvm/trunk: lib/Target/ARM/ARMInstrThumb.td test/MC/ARM/basic-thumb-instructions.s test/MC/ARM/thumb-diagnostics.s

Jim Grosbach grosbach at apple.com
Tue Aug 23 12:49:10 PDT 2011


Author: grosbach
Date: Tue Aug 23 14:49:10 2011
New Revision: 138360

URL: http://llvm.org/viewvc/llvm-project?rev=138360&view=rev
Log:
Thumb parsing and encoding for SVC.

Modified:
    llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
    llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
    llvm/trunk/test/MC/ARM/thumb-diagnostics.s

Modified: llvm/trunk/lib/Target/ARM/ARMInstrThumb.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMInstrThumb.td?rev=138360&r1=138359&r2=138360&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMInstrThumb.td (original)
+++ llvm/trunk/lib/Target/ARM/ARMInstrThumb.td Tue Aug 23 14:49:10 2011
@@ -534,7 +534,7 @@
 }
 
 
-// A8.6.218 Supervisor Call (Software Interrupt) -- for disassembly only
+// A8.6.218 Supervisor Call (Software Interrupt)
 // A8.6.16 B: Encoding T1
 // If Inst{11-8} == 0b1111 then SEE SVC
 let isCall = 1, Uses = [SP] in

Modified: llvm/trunk/test/MC/ARM/basic-thumb-instructions.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/basic-thumb-instructions.s?rev=138360&r1=138359&r2=138360&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/basic-thumb-instructions.s (original)
+++ llvm/trunk/test/MC/ARM/basic-thumb-instructions.s Tue Aug 23 14:49:10 2011
@@ -533,3 +533,13 @@
         subs r1, r2, r3
 
 @ CHECK: subs	r1, r2, r3              @ encoding: [0xd1,0x1a]
+
+
+ at ------------------------------------------------------------------------------
+@ SVC
+ at ------------------------------------------------------------------------------
+        svc #0
+        svc #255
+
+@ CHECK: svc	#0                      @ encoding: [0x00,0xdf]
+@ CHECK: svc	#255                    @ encoding: [0xff,0xdf]

Modified: llvm/trunk/test/MC/ARM/thumb-diagnostics.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/thumb-diagnostics.s?rev=138360&r1=138359&r2=138360&view=diff
==============================================================================
--- llvm/trunk/test/MC/ARM/thumb-diagnostics.s (original)
+++ llvm/trunk/test/MC/ARM/thumb-diagnostics.s Tue Aug 23 14:49:10 2011
@@ -108,3 +108,13 @@
 @ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled
 @ CHECK-ERRORS:         str r3, [r7, #128]
 @ CHECK-ERRORS:         ^
+
+@ Out of range immediate for SVC instruction.
+        svc #-1
+        svc #256
+@ CHECK-ERRORS: error: invalid operand for instruction
+@ CHECK-ERRORS:         svc #-1
+@ CHECK-ERRORS:             ^
+@ CHECK-ERRORS: error: instruction requires a CPU feature not currently enabled
+@ CHECK-ERRORS:         svc #256
+@ CHECK-ERRORS:         ^





More information about the llvm-commits mailing list