----- Ursprüngliche Nachricht ----- Von: Peter Bigot Gesendet am: 16 Feb 2012 16:22:53
>> I think (even though we both didn't try) that an instruction >> with symbolic mode for source and destination, would have the source >> off by 4 and the destination off by 2. > Verification of this already on the list to be part of the regression > suite, since I don't accept "I think" as evidence. Neither do I. Suspicions like this are jsut a starting point for further investigation/confirmation. Or serve, if confirmed, as additonal proof for the theoretical analysis result of the problem. > The existing inconsistency between jmp 0/jmp $+0 and jmp 2/jmp $+2 will > also be preserved in the regression suite. What inconsistency do you mean? Well, both instruciton look like you give a symbolic mode argument. However, jmp does not know addressing modes. The offset to (PC+2) is directly stored in the instruction. It's a shortened add #(x-2),PC instruction. With the (range limited) immediate argument being part of the instruction. However, the jmp x leaves it to the assembler to calculate the offset from the current distance between the two (or may even leave it to the linker to generate the final opcode), while JMP $+x explicitely gives the offset. Since a 'jump on place' is 0x3fff and equals jmp $+0, the PC increment must be subtracted from the given offset by the assembler and added again on disassembly. I agree It's an inconsistency in the notation scheme. jmp 0 won't load the target address from 0x0000 through symbolic mode. br 0/call 0, however, will. But what other notation should have been used? '#' would imply a fixed target address, but jmp is always relative. But then, the jmp parameter simply is not a value, it's an offset. And since offsets are difficult to determine at code write time, the assembler calculates it from a given symbol/address, except if you explicitely provide an offset value by adding $. P.s.: jmp $+2 is a NOP that takes an additional (wasted) clock cycle. JMGross ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users
