Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mips/support.S
Context not available. | |||||
jr ra | jr ra | ||||
li v0, 1 # longjmp return | li v0, 1 # longjmp return | ||||
END(longjmp) | END(longjmp) | ||||
LEAF(mips3_ld) | |||||
.set push | |||||
.set noreorder | |||||
.set mips64 | |||||
#if defined(__mips_o32) | |||||
mfc0 t0, MIPS_COP_0_STATUS # turn off interrupts | |||||
and t1, t0, ~(MIPS_SR_INT_IE) | |||||
mtc0 t1, MIPS_COP_0_STATUS | |||||
COP0_SYNC | |||||
nop | |||||
nop | |||||
nop | |||||
ld v0, 0(a0) | |||||
#if _BYTE_ORDER == _BIG_ENDIAN | |||||
dsll v1, v0, 32 | |||||
dsra v1, v1, 32 # low word in v1 | |||||
dsra v0, v0, 32 # high word in v0 | |||||
#else | |||||
dsra v1, v0, 32 # high word in v1 | |||||
dsll v0, v0, 32 | |||||
dsra v0, v0, 32 # low word in v0 | |||||
#endif | |||||
mtc0 t0, MIPS_COP_0_STATUS # restore intr status. | |||||
COP0_SYNC | |||||
nop | |||||
#else /* !__mips_o32 */ | |||||
ld v0, 0(a0) | |||||
#endif /* !__mips_o32 */ | |||||
jr ra | |||||
nop | |||||
.set pop | |||||
END(mips3_ld) | |||||
LEAF(mips3_sd) | |||||
.set push | |||||
.set mips64 | |||||
.set noreorder | |||||
#if defined(__mips_o32) | |||||
mfc0 t0, MIPS_COP_0_STATUS # turn off interrupts | |||||
and t1, t0, ~(MIPS_SR_INT_IE) | |||||
mtc0 t1, MIPS_COP_0_STATUS | |||||
COP0_SYNC | |||||
nop | |||||
nop | |||||
nop | |||||
# NOTE: a1 is padding! | |||||
#if _BYTE_ORDER == _BIG_ENDIAN | |||||
dsll a2, a2, 32 # high word in a2 | |||||
dsll a3, a3, 32 # low word in a3 | |||||
dsrl a3, a3, 32 | |||||
#else | |||||
dsll a2, a2, 32 # low word in a2 | |||||
dsrl a2, a2, 32 | |||||
dsll a3, a3, 32 # high word in a3 | |||||
#endif | |||||
or a1, a2, a3 | |||||
sd a1, 0(a0) | |||||
mtc0 t0, MIPS_COP_0_STATUS # restore intr status. | |||||
COP0_SYNC | |||||
nop | |||||
#else /* !__mips_o32 */ | |||||
sd a1, 0(a0) | |||||
#endif /* !__mips_o32 */ | |||||
jr ra | |||||
nop | |||||
.set pop | |||||
END(mips3_sd) | |||||
Context not available. |