[mini] Fix ARM assembler syntax for MRC
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 6 Apr 2016 15:14:02 +0000 (17:14 +0200)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Wed, 6 Apr 2016 15:14:02 +0000 (17:14 +0200)
According to http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/CIHEEIDJ.html the MRC instruction is documented as:

    MRC{cond} coproc, opcode1, Rd, CRn, CRm{, opcode2}

with coproc being "the name of the coprocessor the instruction isfor. The standard name is pn, where n is an integer in the range 0-15."

GCC seemed to accept the operand without the 'p' prefix but clang raised an "invalid operand for instruction" error.

mono/mini/mini-arm-tls.S

index 47a6dbb5ba2fda5c38e2923c67edefd4f4f5635c..c8fa1c9519b8a3cd82b81e7b38120ab20f2c0fbd 100644 (file)
@@ -130,7 +130,7 @@ DECLARE_GLOBAL_SYMBOL mono_fallback_set_tls_key
        .align 4
 DECLARE_GLOBAL_SYMBOL mono_fast_get_tls_key2
        bic     r0, r0, #0x80000000
-       mrc     15, 0, r1, cr13, cr0, #3
+       mrc     p15, 0, r1, cr13, cr0, #3
        lsls    r0, r0, #3
        ldr     r1, [r1, #4]
        add     r0, r1
@@ -146,7 +146,7 @@ DECLARE_GLOBAL_SYMBOL mono_fast_get_tls_key2_end
        .align 4
 DECLARE_GLOBAL_SYMBOL mono_fast_set_tls_key2
        bic     r0, r0, #0x80000000
-       mrc     15, 0, r2, cr13, cr0, #3
+       mrc     p15, 0, r2, cr13, cr0, #3
        lsls    r0, r0, #3
        ldr     r2, [r2, #4]
        add     r0, r2