Commit a8e0644d authored by David Schleef's avatar David Schleef

arm: fix some compile mismatches

parent dae83aff
......@@ -544,6 +544,14 @@ orc_arm_emit_par (OrcCompiler *p, int op, int mode, OrcArmCond cond,
};
code = arm_code_par (cond, par_mode[mode], Rn, Rd, par_op[op], Rm);
if (op == 7) {
int tmp;
/* gas does something screwy here */
code &= ~0xf00;
tmp = Rn;
Rn = Rm;
Rm = tmp;
}
ORC_ASM_CODE(p," %s%s%s %s, %s, %s\n",
par_mode_names[mode], par_op_names[op], orc_arm_cond_name(cond),
orc_arm_reg_name (Rd),
......@@ -678,7 +686,7 @@ orc_arm_emit_rv (OrcCompiler *p, int op, OrcArmCond cond,
int Rd, int Rm)
{
orc_uint32 code;
static const orc_uint32 rv_opcodes[] = { 0x06b00030, 0x06bf0fb0 };
static const orc_uint32 rv_opcodes[] = { 0x06bf0f30, 0x06bf0fb0 };
static const char *rv_insn_names[] = { "rev", "rev16" };
code = arm_code_rv (rv_opcodes[op], cond, Rd, Rm);
......
......@@ -64,18 +64,18 @@ arm_rule_ ## opcode (OrcCompiler *p, void *user, OrcInstruction *insn) \
orc_arm_emit (p, orc_arm_mul (cond,S,Rd,Rm,Rs)); \
} while (0)
#define orc_arm_mull(op,cond,S,RdH,RdL,Rm,Rs) (op|((cond)<<28)|((S)<<20)|(((RdH)&15)<<16)|(((RdL)&15)<<12)|(((Rs)&15)<<8)|((Rm)&15))
#define orc_arm_emit_smull(p,cond,S,RdL,RdH,Rm,Rs) do { \
ORC_ASM_CODE (p, "mull %s, %s, %s, %s\n", orc_arm_reg_name (RdH), \
orc_arm_reg_name (RdL), \
orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \
orc_arm_emit(p,orc_arm_mull (0x00c00090,cond,S,RdH,RdL,Rm,Rs)); \
#define orc_arm_mull(op,cond,S,RdL,RdH,Rn,Rm) (op|((cond)<<28)|((S)<<20)|(((Rn)&15)<<16)|(((RdL)&15)<<12)|(((RdH)&15)<<8)|((Rm)&15))
#define orc_arm_emit_smull(p,cond,S,RdL,RdH,Rn,Rm) do { \
ORC_ASM_CODE (p, "smull %s, %s, %s, %s\n", orc_arm_reg_name (RdL), \
orc_arm_reg_name (RdH), \
orc_arm_reg_name (Rn), orc_arm_reg_name(Rm)); \
orc_arm_emit(p,orc_arm_mull (0x00c00090,cond,S,RdL,Rm,RdH,Rn)); \
} while (0)
#define orc_arm_emit_umull(p,cond,S,RdL,RdH,Rm,Rs) do { \
ORC_ASM_CODE (p, "umull %s, %s, %s, %s\n", orc_arm_reg_name (RdH), \
orc_arm_reg_name (RdL), \
orc_arm_reg_name (Rm), orc_arm_reg_name(Rs)); \
orc_arm_emit(p,orc_arm_mull (0x00800090,cond,S,RdH,RdL,Rm,Rs)); \
#define orc_arm_emit_umull(p,cond,S,RdL,RdH,Rn,Rm) do { \
ORC_ASM_CODE (p, "umull %s, %s, %s, %s\n", orc_arm_reg_name (RdL), \
orc_arm_reg_name (RdH), \
orc_arm_reg_name (Rn), orc_arm_reg_name(Rm)); \
orc_arm_emit(p,orc_arm_mull (0x00800090,cond,S,RdL,RdH,Rn,Rm)); \
} while (0)
void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment