Re: Intel vs AMD x86-64

Timothy Miller
2004-02-25T17:09:24Z

H. Peter Anvin wrote:
> Followup to: <403CCBE0.7050100@techsource.com>
> By author: Timothy Miller <miller@techsource.com>
> In newsgroup: linux.dev.kernel
>
>>
>>Nakajima, Jun wrote:
>>
>>>No, it's not a problem. Branches with 16-bit operand size are not useful
>>>for compilers.
>>
>> From AMD's documentation, I got the impression that 66H caused near
>>branches to be 32 bits in long mode (default is 64).
>>
>>So, Intel makes it 16 bits, and AMD makes it 32 bits?
>>
>>Either way, I don't see much use for either one.
>>
>
>
> Both claims are pretty bogus. Shorter branches are quite nice for
> intraprocedural jumps; it reduces the cache footprint.

I think we were talking about absolute branches when referring to "near
branches". For absolute branches, having a 32-bit address restricts you
to the lower 4G of the address space.

For long mode on AMD64, default operand size for _relative_ branch is 32
bits. I get the impression that the size of the relative branch operand
is handled differently from the "segment default word size".