unrecognized opcode `mtc0 $0,$9' from sde-gcc to mips-mti-elf-GCC

Home Forums MIPS Insider MIPS FAQ unrecognized opcode `mtc0 $0,$9' from sde-gcc to mips-mti-elf-GCC

This topic contains 1 reply, has 2 voices, and was last updated by  ChrisImgtec 2 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #64586

    Ranga
    Participant

    I am able to build following code with sde-GCC and that is working, but same thing if I build with mips-mti-elf-gcc is not working instead its through unrecognized opcode `mtc0 $0,$9′
    please if someone know what going wrong please help me in correcting and/or fixing the above issue.

    here is my code looks like
    v#if 1
    #define hal_getsr(val)
    ({
    register unsigned __r;
    asm volatile (“mfc0 %0,$12; nop; nop;”
    : “=d” (__r));
    val = __r;
    })

    #define hal_setsr(val)
    ({
    register unsigned __r = (val);
    asm volatile (“mtc0 %0,$12; nop; nop;” : : “d” (__r));
    __r;
    })
    #endif

    #64587

    ChrisImgtec
    Moderator

    Here’s one I use:

    #define setsr(x)
    ({ unsigned int X;
    X=x;
    __asm__ __volatile (“mtc0 %0, $%1, 0” : : “d” (X), “i” (C0_STATUS));})

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.