* hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,

then gets its real address into FUN and its GOT/DP value into %r19.

        * tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
This commit is contained in:
Jeff Law 1994-04-06 00:56:36 +00:00
parent 117dbbc609
commit 4f91591410
3 changed files with 22 additions and 3 deletions

View File

@ -1,5 +1,10 @@
Tue Apr 5 15:29:25 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
* hppa-tdep.c (hppa_fix_call_dummy): If FUN is a procedure label,
then gets its real address into FUN and its GOT/DP value into %r19.
* tm-hppa.h (CALL_DUMMY): Use %r20, not %r19 as a temporary.
* hppa-tdep.c (frameless_function_invocation): If no unwind
descriptor was found, then assume this was not a frameless
function invocation.

View File

@ -344,8 +344,8 @@ call_dummy
ldsid (0,r22), r4
ldil 0, r1 ; _sr4export will be placed here.
ldo 0(r1), r1
ldsid (0,r1), r19
combt,=,n r3, r19, text_space ; If target is in data space, do a
ldsid (0,r1), r20
combt,=,n r3, r20, text_space ; If target is in data space, do a
ble 0(sr5, r22) ; "normal" procedure call
copy r31, r2
break 4, 8
@ -388,7 +388,7 @@ text_space ; Otherwise, go through _sr4export,
#define CALL_DUMMY {0x4BDA3FB9, 0x4BD93FB1, 0x4BD83FA9, 0x4BD73FA1,\
0x37C13FB9, 0x24201004, 0x2C391005, 0x24311006,\
0x2C291007, 0x22C00000, 0x36D60000, 0x02C010A4,\
0x20200000, 0x34210000, 0x002010b3, 0x82642022,\
0x20200000, 0x34210000, 0x002010b4, 0x82832022,\
0xe6c06000, 0x081f0242, 0x00010004, 0x00151820,\
0xe6c00002, 0xe4202000, 0x6bdf3fd1, 0x00010004,\
0x00151820, 0xe6c00002, 0x08000240, 0x08000240}

View File

@ -1074,6 +1074,20 @@ hppa_fix_call_dummy (dummy, pc, fun, nargs, args, type, gcc_p)
dyncall_addr = SYMBOL_VALUE_ADDRESS (msymbol);
/* FUN could be a procedure label, in which case we have to get
its real address and the value of its GOT/DP. */
if (fun & 0x2)
{
/* Get the GOT/DP value for the target function. It's
at *(fun+4). Note the call dummy is *NOT* allowed to
trash %r19 before calling the target function. */
write_register (19, read_memory_integer ((fun & ~0x3) + 4, 4));
/* Now get the real address for the function we are calling, it's
at *fun. */
fun = (CORE_ADDR) read_memory_integer (fun & ~0x3, 4);
}
/* If we are calling an import stub (eg calling into a dynamic library)
then have sr4export call the magic __d_plt_call routine which is linked
in from end.o. (You can't use _sr4export to call the import stub as