diff options
author | Vladimir Medic <Vladimir.Medic@imgtec.com> | 2013-07-17 14:05:19 +0000 |
---|---|---|
committer | Vladimir Medic <Vladimir.Medic@imgtec.com> | 2013-07-17 14:05:19 +0000 |
commit | 16f385f90f481195bfcf6b139ced4cee033bb887 (patch) | |
tree | 971d4f72b0bf0fca2858ffdade72ab7140fd47be /test | |
parent | c88ac4a344bdb5b3ade5c24d67e1227c4d3a8978 (diff) | |
download | external_llvm-16f385f90f481195bfcf6b139ced4cee033bb887.zip external_llvm-16f385f90f481195bfcf6b139ced4cee033bb887.tar.gz external_llvm-16f385f90f481195bfcf6b139ced4cee033bb887.tar.bz2 |
Implement eret and deret(return from exception) instructions for Mips. Test examples are given.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186507 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/MC/Mips/mips-control-instructions.s | 28 | ||||
-rw-r--r-- | test/MC/Mips/mips_directives.s | 10 |
2 files changed, 28 insertions, 10 deletions
diff --git a/test/MC/Mips/mips-control-instructions.s b/test/MC/Mips/mips-control-instructions.s new file mode 100644 index 0000000..ee70940 --- /dev/null +++ b/test/MC/Mips/mips-control-instructions.s @@ -0,0 +1,28 @@ +# RUN: llvm-mc %s -triple=mips-unknown-unknown -show-encoding -mcpu=mips32r2 | \ +# RUN: FileCheck -check-prefix=CHECK32 %s +# RUN: llvm-mc %s -triple=mips-unknown-unknown -show-encoding -mcpu=mips64r2 | \ +# RUN: FileCheck -check-prefix=CHECK64 %s + +# CHECK32: break # encoding: [0x00,0x00,0x00,0x0d] +# CHECK32: break 7, 0 # encoding: [0x00,0x07,0x00,0x0d] +# CHECK32: break 7, 5 # encoding: [0x00,0x07,0x01,0x4d] +# CHECK32: syscall # encoding: [0x00,0x00,0x00,0x0c] +# CHECK32: syscall 13396 # encoding: [0x00,0x0d,0x15,0x0c] +# CHECK32: eret # encoding: [0x42,0x00,0x00,0x18] +# CHECK32: deret # encoding: [0x42,0x00,0x00,0x1f] + +# CHECK64: break # encoding: [0x00,0x00,0x00,0x0d] +# CHECK64: break 7, 0 # encoding: [0x00,0x07,0x00,0x0d] +# CHECK64: break 7, 5 # encoding: [0x00,0x07,0x01,0x4d] +# CHECK64: syscall # encoding: [0x00,0x00,0x00,0x0c] +# CHECK64: syscall 13396 # encoding: [0x00,0x0d,0x15,0x0c] +# CHECK64: eret # encoding: [0x42,0x00,0x00,0x18] +# CHECK64: deret # encoding: [0x42,0x00,0x00,0x1f] + + break + break 7 + break 7,5 + syscall + syscall 0x3454 + eret + deret diff --git a/test/MC/Mips/mips_directives.s b/test/MC/Mips/mips_directives.s index c29806a..bbb2616 100644 --- a/test/MC/Mips/mips_directives.s +++ b/test/MC/Mips/mips_directives.s @@ -41,15 +41,5 @@ $JTI0_0: .set f6,$f6 # CHECK: abs.s $f6, $f7 # encoding: [0x46,0x00,0x39,0x85] # CHECK: and $3, $15, $15 # encoding: [0x01,0xef,0x18,0x24] -# CHECK: break # encoding: [0x00,0x00,0x00,0x0d] -# CHECK: break 7, 0 # encoding: [0x00,0x07,0x00,0x0d] -# CHECK: break 7, 5 # encoding: [0x00,0x07,0x01,0x4d] -# CHECK: syscall # encoding: [0x00,0x00,0x00,0x0c] -# CHECK: syscall 13396 # encoding: [0x00,0x0d,0x15,0x0c] abs.s f6,FPU_MASK and r3,$t7,STORE_MASK - break - break 7 - break 7,5 - syscall - syscall 0x3454 |