|
@@ -33,13 +33,13 @@ static void jump_label_make_branch(struct jump_entry *entry, struct insn *insn)
|
|
{
|
|
{
|
|
/* brcl 15,offset */
|
|
/* brcl 15,offset */
|
|
insn->opcode = 0xc0f4;
|
|
insn->opcode = 0xc0f4;
|
|
- insn->offset = (entry->target - entry->code) >> 1;
|
|
|
|
|
|
+ insn->offset = (jump_entry_target(entry) - jump_entry_code(entry)) >> 1;
|
|
}
|
|
}
|
|
|
|
|
|
static void jump_label_bug(struct jump_entry *entry, struct insn *expected,
|
|
static void jump_label_bug(struct jump_entry *entry, struct insn *expected,
|
|
struct insn *new)
|
|
struct insn *new)
|
|
{
|
|
{
|
|
- unsigned char *ipc = (unsigned char *)entry->code;
|
|
|
|
|
|
+ unsigned char *ipc = (unsigned char *)jump_entry_code(entry);
|
|
unsigned char *ipe = (unsigned char *)expected;
|
|
unsigned char *ipe = (unsigned char *)expected;
|
|
unsigned char *ipn = (unsigned char *)new;
|
|
unsigned char *ipn = (unsigned char *)new;
|
|
|
|
|
|
@@ -59,6 +59,7 @@ static void __jump_label_transform(struct jump_entry *entry,
|
|
enum jump_label_type type,
|
|
enum jump_label_type type,
|
|
int init)
|
|
int init)
|
|
{
|
|
{
|
|
|
|
+ void *code = (void *)jump_entry_code(entry);
|
|
struct insn old, new;
|
|
struct insn old, new;
|
|
|
|
|
|
if (type == JUMP_LABEL_JMP) {
|
|
if (type == JUMP_LABEL_JMP) {
|
|
@@ -69,13 +70,13 @@ static void __jump_label_transform(struct jump_entry *entry,
|
|
jump_label_make_nop(entry, &new);
|
|
jump_label_make_nop(entry, &new);
|
|
}
|
|
}
|
|
if (init) {
|
|
if (init) {
|
|
- if (memcmp((void *)entry->code, &orignop, sizeof(orignop)))
|
|
|
|
|
|
+ if (memcmp(code, &orignop, sizeof(orignop)))
|
|
jump_label_bug(entry, &orignop, &new);
|
|
jump_label_bug(entry, &orignop, &new);
|
|
} else {
|
|
} else {
|
|
- if (memcmp((void *)entry->code, &old, sizeof(old)))
|
|
|
|
|
|
+ if (memcmp(code, &old, sizeof(old)))
|
|
jump_label_bug(entry, &old, &new);
|
|
jump_label_bug(entry, &old, &new);
|
|
}
|
|
}
|
|
- s390_kernel_write((void *)entry->code, &new, sizeof(new));
|
|
|
|
|
|
+ s390_kernel_write(code, &new, sizeof(new));
|
|
}
|
|
}
|
|
|
|
|
|
static int __sm_arch_jump_label_transform(void *data)
|
|
static int __sm_arch_jump_label_transform(void *data)
|