Mail Archives: djgpp/1995/11/03/11:37:15
From what I have read, it seems that if a function returns a struct value, the
value has to be 1 or 2 or 4 or 8 bytes long for it to be able to be returned
in registers, else it will have to use the longer method of copying the value
via a temporary store. I see no reason why structs 3 or 5 or 6 or 7 bytes long
can't also be returned in registers:-
bytes example of which registers used to hold value
1 AL
2 AX
3 AX and BL
4 EAX
5 EAX and BL
6 EAX and BX
7 bytes 0 1 2 3 in EAX, bytes 3 4 5 6 in EBX
8 EAX and EBX
- Raw text -