From f333d471d2cdd47d830dfe3a3e40efbb106c100d Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 13 Jul 2011 20:25:46 +0000 Subject: [PATCH] Testcases for ARM assembly BX/BXJ instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135078 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/MC/ARM/basic-arm-instructions.s | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index 7cf04897a89..6c1b39d24b4 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -326,12 +326,34 @@ _func: bl _bar @ FIXME: blx _bar +@ CHECK: bl _bar @ encoding: [A,A,A,0xeb] +@ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch + +@------------------------------------------------------------------------------ +@ BLX (register) +@------------------------------------------------------------------------------ blx r2 blxne r2 -@ CHECK: bl _bar @ encoding: [A,A,A,0xeb] -@ CHECK: @ fixup A - offset: 0, value: _bar, kind: fixup_arm_uncondbranch @ CHECK: blx r2 @ encoding: [0x32,0xff,0x2f,0xe1] @ CHECK: blxne r2 @ encoding: [0x32,0xff,0x2f,0x11] +@------------------------------------------------------------------------------ +@ BX +@------------------------------------------------------------------------------ + + bx r2 + bxne r2 + +@ CHECK: bx r2 @ encoding: [0x12,0xff,0x2f,0xe1] +@ CHECK: bxne r2 @ encoding: [0x12,0xff,0x2f,0x11] + +@------------------------------------------------------------------------------ +@ BXJ +@------------------------------------------------------------------------------ + + bxj r2 + bxjne r2 +@ CHECK: bxj r2 @ encoding: [0x22,0xff,0x2f,0xe1] +@ CHECK: bxjne r2 @ encoding: [0x22,0xff,0x2f,0x11] -- 2.34.1