View Single Post
Old 08 August 2016, 21:24   #26
Mrs Beanbag
Glastonbridge Software
 
Mrs Beanbag's Avatar
 
Join Date: Jan 2012
Location: Edinburgh/Scotland
Posts: 2,243
Quote:
Originally Posted by matthey View Post
It is no more difficult to use an absolute location than a PC relative one.
Well that depends. If you are loading your code into an AMOS memory bank or writing an AMOS extension, it is impossible to use relocation. I'm sure this is a shortcoming in AMOS. Nevertheless i do have to work with it sometimes! Or i have in the past.

Quote:
The 68020 addressing modes are very versatile and can do what you want.
Code:
    jmp ([d16,An])
    jsr ([d16,An])
[/quote]
True but they result in a bigger encoding (not taking any other supporting code into account).

In my own code i just jump into a table of branches. I know it is not top for performance but it is great for flexibility, and sometimes i just really want to be able to do that sort of thing.

Quote:
The 68k designers probably had OCD because most data in encodings is well organized and commonly 8, 16 or 32 bits. Data extensions are in multiples of 16 bits as the variable length encodings are multiples of 16 bits.
now i'm not suggesting they "should" have done any differently but i did comment elsewhere about how a byte-sized immediate instruction wastes a whole byte.

As for the whole branch prediction subject, i did wonder if different condition codes have different branch frequencies. Does a BNE get taken more often than a BEQ? Or a BVS?
Mrs Beanbag is offline  
 
Page generated in 0.04324 seconds with 11 queries