diff --git a/h/out.h b/h/out.h index 6aeffc446..9cc791ab2 100644 --- a/h/out.h +++ b/h/out.h @@ -61,13 +61,13 @@ struct outname { /* * relocation type bits */ -#define RELSZ 0x0fff /* relocation length */ -#define RELO1 1 /* 1 byte */ -#define RELO2 2 /* 2 bytes */ -#define RELO4 3 /* 4 bytes */ -#define RELOPPC 4 /* PowerPC 26-bit address */ -#define RELOLIS 5 /* PowerPC lis */ -#define RELOVC4 6 /* VideoCore IV address in 32-bit instruction */ +#define RELSZ 0x0fff /* relocation length */ +#define RELO1 1 /* 1 byte */ +#define RELO2 2 /* 2 bytes */ +#define RELO4 3 /* 4 bytes */ +#define RELOPPC 4 /* PowerPC 26-bit address */ +#define RELOPPC_LIS 5 /* PowerPC lis */ +#define RELOVC4 6 /* VideoCore IV address in 32-bit instruction */ #define RELPC 0x2000 /* pc relative */ #define RELBR 0x4000 /* High order byte lowest address. */ diff --git a/mach/powerpc/as/mach5.c b/mach/powerpc/as/mach5.c index d72b8514a..76acac432 100644 --- a/mach/powerpc/as/mach5.c +++ b/mach/powerpc/as/mach5.c @@ -42,8 +42,8 @@ void emit_hl(word_t in) case OP_HA: /* ha16[expr] */ if (PASS_RELO && (hl_expr.typ & S_TYP) != S_ABS) { /* - * RELOLIS only works with lis _, _ (same as - * addis _, r0, _). Check if instruction + * RELOPPC_LIS only works with lis _, _ (same + * as addis _, r0, _). Check if instruction * isn't addis or register RA isn't r0. */ if ((in & 0xfc1f0000) != (0x3c000000)) @@ -55,7 +55,7 @@ void emit_hl(word_t in) * Low 26 bits: signed offset */ fit(fitx(hl_expr.val, 26)); - newrelo(hl_expr.typ, RELOLIS | FIXUPFLAGS); + newrelo(hl_expr.typ, RELOPPC_LIS | FIXUPFLAGS); reg = (in >> 21) & 0x1f; in = (hl_token == OP_HA) << 31; in |= reg << 26; diff --git a/util/amisc/ashow.c b/util/amisc/ashow.c index ec85de30d..6ead9db6c 100644 --- a/util/amisc/ashow.c +++ b/util/amisc/ashow.c @@ -140,7 +140,7 @@ showrelo() case RELOPPC: printf("\tPowerPC 26-bit address\n"); break; - case RELOLIS: + case RELOPPC_LIS: printf("\tPowerPC lis instruction\n"); break; case RELOVC4: diff --git a/util/led/ack.out.5 b/util/led/ack.out.5 index c8b9fc8fa..8e076cb86 100644 --- a/util/led/ack.out.5 +++ b/util/led/ack.out.5 @@ -161,13 +161,14 @@ struct outrelo { /* * relocation type bits */ -#define RELSZ 0x0fff /* relocation length */ -#define RELO1 0x01 /* 1 byte */ -#define RELO2 0x02 /* 2 bytes */ -#define RELO4 0x03 /* 4 bytes */ -#define RELOPPC 0x04 /* 26-bit PowerPC address */ -#define RELOLIS 0x05 /* PowerPC lis */ -#define RELOVC4 0x06 /* VideoCore IV address in 32-bit insruction */ +#define RELSZ 0x0fff /* relocation length */ +#define RELO1 1 /* 1 byte */ +#define RELO2 2 /* 2 bytes */ +#define RELO4 3 /* 4 bytes */ +#define RELOPPC 4 /* PowerPC 26-bit address */ +#define RELOPPC_LIS 5 /* PowerPC lis */ +#define RELOVC4 6 /* VideoCore IV address in 32-bit instruction */ + #define RELPC 0x2000 /* pc relative */ #define RELBR 0x4000 /* High order byte lowest address. */ #define RELWR 0x8000 /* High order word lowest address. */ @@ -231,7 +232,7 @@ VideoCore IV instruction. The relocation depends on the instruction, and uses an offset encoded in the instruction. .PP -RELOLIS assembles a PowerPC \fBlis\fR instruction. +RELOPPC_LIS assembles a PowerPC \fBlis\fR instruction. The relocatable datum is a 4-byte integer. The high bit is set for ha16 or clear for hi16. The next 5 bits are the register \fIRT\fR. diff --git a/util/led/relocate.c b/util/led/relocate.c index 1b8960938..bce18e1f9 100644 --- a/util/led/relocate.c +++ b/util/led/relocate.c @@ -169,7 +169,7 @@ static uint32_t get_powerpc_valu(char* addr, uint16_t type) (unsigned long)opcode1, (unsigned long)opcode2); } -/* RELOLIS stores a signed 26-bit offset in the low bits. */ +/* RELOPPC_LIS stores a signed 26-bit offset in the low bits. */ static uint32_t get_lis_valu(char *addr, uint16_t type) { uint32_t valu = read4(addr, type) & 0x03ffffff; @@ -193,7 +193,7 @@ static uint32_t getvalu(char* addr, uint16_t type) return read4(addr, type); case RELOPPC: return get_powerpc_valu(addr, type); - case RELOLIS: + case RELOPPC_LIS: return get_lis_valu(addr, type); case RELOVC4: return get_vc4_valu(addr); @@ -389,7 +389,7 @@ static putvalu(uint32_t valu, char* addr, uint16_t type) case RELOPPC: put_powerpc_valu(addr, valu, type); break; - case RELOLIS: + case RELOPPC_LIS: put_lis_valu(addr, valu, type); break; case RELOVC4: