Port-vax archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: VAX addressing modes
> Duh, somehow I failed to copy & paste big parts of the data I
> collected into the original message - sorry.
:-( I've done such things often enough.
> In objdump -dR output, the code looks like:
> 5ca00: 31 de db brw 5a5e1 <Perl_yylex+0x2e6f>
> 5ca03: cf 50 00 0a casel r0,$0x0,$0xa
> 5ca07: 27 11 38 45 divp $0x11,$0x38,$0x14[r5],*0xffffd214(r2),*0x46
> (r0),*0x46(r0)
> 5ca0b: 14 d2 14 d2
> 5ca0f: b0 46 b0 46
This is pretty obviously not code (that divp makes no sense). The
disassembler is defective; it is failing to understand that casel is
followed by a jump table, not ordinary code. This should be
disassembled as something more like this (this is what my disassembler
produced when fed the relevant binary; I've manually reinserted the
relocation line and the hex memory contents):
5ca03: cf 50 00 0a casel r0,$0,$a
5ca07: 27 11 case -> 0x5db2e
5ca09: 38 45 case -> 0x60f3f
5ca0b: 14 d2 case -> 0x59c1b
5ca0d: 14 d2 case -> 0x59c1b
5ca0f: b0 46 case -> 0x610b7
5ca11: b0 46 case -> 0x610b7
5ca13: 95 12 case -> 0x5dc9c
5ca15: 95 12 case -> 0x5dc9c
5ca17: 19 00 case -> 0x5ca20
5ca19: 14 d2 case -> 0x59c1b
5ca1b: 38 45 case -> 0x60f3f
5ca1d: 31 06 00 brw 0x5ca26
5ca20: 17 9f cf 76 jmp *$000676cf
06 00
5ca22: R_VAX_RELATIVE *ABS*+0x676cf
5ca26: dd 5a pushl r10
> (and I don't want to think about the duplicate tstb $0x12 right now)
That's explained by their not being tstb instructions at all. Those
are the case displacements to 0x5dc9c.
The relocation also makes a whole lot more sense now, at least to me.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index