Beispiel #1
0
    void Assembler::asm_store32(LOpcode op, LIns *value, int32_t dr, LIns *base) {

        switch (op) {
            case LIR_sti:
                // handled by mainline code below for now
                break;
            case LIR_stb:
            case LIR_sts:
                NanoAssertMsg(0, "NJ_EXPANDED_LOADSTORE_SUPPORTED not yet supported for this architecture");
                return;
            default:
                NanoAssertMsg(0, "asm_store32 should never receive this LIR opcode");
                return;
        }

        Register rs = findRegFor(value, GpRegs);
        Register ra = value == base ? rs : getBaseReg(LIR_sti, base, dr, GpRegs & ~rmask(rs));

    #if !PEDANTIC
        if (isS16(dr)) {
            STW(rs, dr, ra);
            return;
        }
    #endif

        // general case store, any offset size
        STWX(rs, ra, R0);
        asm_li(R0, dr);
    }
Beispiel #2
0
void Assembler::asm_store32(LIns *value, int32_t dr, LIns *base) {
    Register rs = findRegFor(value, GpRegs);
    Register ra = value == base ? rs : getBaseReg(LIR_sti, base, dr, GpRegs & ~rmask(rs));

#if !PEDANTIC
    if (isS16(dr)) {
        STW(rs, dr, ra);
        return;
    }
#endif

    // general case store, any offset size
    STWX(rs, ra, R0);
    asm_li(R0, dr);
}