diff options
author | Jon Medhurst <tixy@linaro.org> | 2014-03-11 10:05:26 -0400 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2014-07-02 07:48:36 -0400 |
commit | 449fd15fbcde239875031d70fd06abb4a0e1ed09 (patch) | |
tree | 03c689fc99430e0bb3eb7ced5968f7c994c482d2 /arch | |
parent | 272226007f436eff953c4398c1f5509cb74889ac (diff) |
ARM: kprobes: Fix test code compilation errors for ARMv4 targets
Conditionally compile kprobes test cases for ARMv5 instructions to avoid
compilation errors with ARMv4 targets like:
/tmp/cc7Tx8ST.s:16740: Error: selected processor does not support ARM mode `clz r0,r0'
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/kprobes-test-arm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm/kernel/kprobes-test-arm.c b/arch/arm/kernel/kprobes-test-arm.c index e73f9cff9225..cb1424240ff6 100644 --- a/arch/arm/kernel/kprobes-test-arm.c +++ b/arch/arm/kernel/kprobes-test-arm.c | |||
@@ -218,6 +218,7 @@ void kprobe_arm_test_cases(void) | |||
218 | TEST_BB_R("bx r",7,2f,"") | 218 | TEST_BB_R("bx r",7,2f,"") |
219 | TEST_BF_R("bxeq r",14,2f,"") | 219 | TEST_BF_R("bxeq r",14,2f,"") |
220 | 220 | ||
221 | #if __LINUX_ARM_ARCH__ >= 5 | ||
221 | TEST_R("clz r0, r",0, 0x0,"") | 222 | TEST_R("clz r0, r",0, 0x0,"") |
222 | TEST_R("clzeq r7, r",14,0x1,"") | 223 | TEST_R("clzeq r7, r",14,0x1,"") |
223 | TEST_R("clz lr, r",7, 0xffffffff,"") | 224 | TEST_R("clz lr, r",7, 0xffffffff,"") |
@@ -339,6 +340,7 @@ void kprobe_arm_test_cases(void) | |||
339 | TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2") | 340 | TEST_UNSUPPORTED(__inst_arm(0xe16f02e1) " @ smultt pc, r1, r2") |
340 | TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2") | 341 | TEST_UNSUPPORTED(__inst_arm(0xe16002ef) " @ smultt r0, pc, r2") |
341 | TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc") | 342 | TEST_UNSUPPORTED(__inst_arm(0xe1600fe1) " @ smultt r0, r1, pc") |
343 | #endif | ||
342 | 344 | ||
343 | TEST_GROUP("Multiply and multiply-accumulate") | 345 | TEST_GROUP("Multiply and multiply-accumulate") |
344 | 346 | ||
@@ -561,6 +563,7 @@ void kprobe_arm_test_cases(void) | |||
561 | TEST_UNSUPPORTED("ldrsht r1, [r2], #48") | 563 | TEST_UNSUPPORTED("ldrsht r1, [r2], #48") |
562 | #endif | 564 | #endif |
563 | 565 | ||
566 | #if __LINUX_ARM_ARCH__ >= 5 | ||
564 | TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]") | 567 | TEST_RPR( "strd r",0, VAL1,", [r",1, 48,", -r",2,24,"]") |
565 | TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") | 568 | TEST_RPR( "strccd r",8, VAL2,", [r",13,0, ", r",12,48,"]") |
566 | TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") | 569 | TEST_RPR( "strd r",4, VAL1,", [r",2, 24,", r",3, 48,"]!") |
@@ -597,6 +600,7 @@ void kprobe_arm_test_cases(void) | |||
597 | TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!") | 600 | TEST_UNSUPPORTED(__inst_arm(0xe1efc3d0) " @ ldrd r12, [pc, #48]!") |
598 | TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48") | 601 | TEST_UNSUPPORTED(__inst_arm(0xe0c9f3d0) " @ ldrd pc, [r9], #48") |
599 | TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48") | 602 | TEST_UNSUPPORTED(__inst_arm(0xe0c9e3d0) " @ ldrd lr, [r9], #48") |
603 | #endif | ||
600 | 604 | ||
601 | TEST_GROUP("Miscellaneous") | 605 | TEST_GROUP("Miscellaneous") |
602 | 606 | ||
@@ -1229,7 +1233,9 @@ void kprobe_arm_test_cases(void) | |||
1229 | TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0") | 1233 | TEST_COPROCESSOR( "mrc"two" 0, 0, r0, cr0, cr0, 0") |
1230 | 1234 | ||
1231 | COPROCESSOR_INSTRUCTIONS_ST_LD("",e) | 1235 | COPROCESSOR_INSTRUCTIONS_ST_LD("",e) |
1236 | #if __LINUX_ARM_ARCH__ >= 5 | ||
1232 | COPROCESSOR_INSTRUCTIONS_MC_MR("",e) | 1237 | COPROCESSOR_INSTRUCTIONS_MC_MR("",e) |
1238 | #endif | ||
1233 | TEST_UNSUPPORTED("svc 0") | 1239 | TEST_UNSUPPORTED("svc 0") |
1234 | TEST_UNSUPPORTED("svc 0xffffff") | 1240 | TEST_UNSUPPORTED("svc 0xffffff") |
1235 | 1241 | ||
@@ -1289,7 +1295,9 @@ void kprobe_arm_test_cases(void) | |||
1289 | TEST( "blx __dummy_thumb_subroutine_odd") | 1295 | TEST( "blx __dummy_thumb_subroutine_odd") |
1290 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ | 1296 | #endif /* __LINUX_ARM_ARCH__ >= 6 */ |
1291 | 1297 | ||
1298 | #if __LINUX_ARM_ARCH__ >= 5 | ||
1292 | COPROCESSOR_INSTRUCTIONS_ST_LD("2",f) | 1299 | COPROCESSOR_INSTRUCTIONS_ST_LD("2",f) |
1300 | #endif | ||
1293 | #if __LINUX_ARM_ARCH__ >= 6 | 1301 | #if __LINUX_ARM_ARCH__ >= 6 |
1294 | COPROCESSOR_INSTRUCTIONS_MC_MR("2",f) | 1302 | COPROCESSOR_INSTRUCTIONS_MC_MR("2",f) |
1295 | #endif | 1303 | #endif |