pb interpreter: work around old compiler bug
This commit is contained in:
parent
9bde4bc009
commit
ee467fbbb4
|
@ -535,7 +535,16 @@ void S_pb_interp(ptr tc, void *bytecode) {
|
||||||
regs[INSTR_drr_dest(instr)] = *(int8_t *)TO_VOIDP(regs[INSTR_drr_reg1(instr)] + regs[INSTR_drr_reg2(instr)]);
|
regs[INSTR_drr_dest(instr)] = *(int8_t *)TO_VOIDP(regs[INSTR_drr_reg1(instr)] + regs[INSTR_drr_reg2(instr)]);
|
||||||
break;
|
break;
|
||||||
case pb_ld_op_pb_int8_pb_immediate:
|
case pb_ld_op_pb_int8_pb_immediate:
|
||||||
|
#if defined(__arm__)
|
||||||
|
/* Complicated load to avoid an internal compiler error from an old gcc on Raspbian: */
|
||||||
|
{
|
||||||
|
int8_t v;
|
||||||
|
memcpy(&v, TO_VOIDP(regs[INSTR_dri_reg(instr)] + INSTR_dri_imm(instr)), sizeof(int8_t));
|
||||||
|
regs[INSTR_dri_dest(instr)] = v;
|
||||||
|
}
|
||||||
|
#else
|
||||||
regs[INSTR_dri_dest(instr)] = *(int8_t *)TO_VOIDP(regs[INSTR_dri_reg(instr)] + INSTR_dri_imm(instr));
|
regs[INSTR_dri_dest(instr)] = *(int8_t *)TO_VOIDP(regs[INSTR_dri_reg(instr)] + INSTR_dri_imm(instr));
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case pb_ld_op_pb_uint8_pb_register:
|
case pb_ld_op_pb_uint8_pb_register:
|
||||||
regs[INSTR_drr_dest(instr)] = *(uint8_t *)TO_VOIDP(regs[INSTR_drr_reg1(instr)] + regs[INSTR_drr_reg2(instr)]);
|
regs[INSTR_drr_dest(instr)] = *(uint8_t *)TO_VOIDP(regs[INSTR_drr_reg1(instr)] + regs[INSTR_drr_reg2(instr)]);
|
||||||
|
|
|
@ -469,7 +469,7 @@ typedef char tputsputcchar;
|
||||||
/* Use "/dev/urandom" everywhere except Windows */
|
/* Use "/dev/urandom" everywhere except Windows */
|
||||||
#define USE_DEV_URANDOM_UUID
|
#define USE_DEV_URANDOM_UUID
|
||||||
|
|
||||||
#if defined(__arm64__) || defined(__arm32__)
|
#if defined(__arm64__) || defined(__arm__)
|
||||||
# if arm_isa_version == 6
|
# if arm_isa_version == 6
|
||||||
# define STORE_FENCE() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory")
|
# define STORE_FENCE() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory")
|
||||||
# else
|
# else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user