« Previous | Next » 

Revision c2e3dee6

IDc2e3dee6e03527baf8698698cce76b1a3174969a

Added by Laurent Vivier about 10 years ago

linux-user: Define target alignment size

Datatype alignment can be found using following application:

int main(void) {
printf("alignof(short) %ld\n", alignof(short));
printf("alignof(int) %ld\n", alignof(int));
printf("alignof(long) %ld\n", alignof(long));
printf("alignof(long long) %ld\n", alignof(long long));
}

This patch includes following alignments:

i386

alignof(short) 2
alignof(int) 4
alignof(long) 4
alignof(long long) 8
x86_64
alignof(short) 2
alignof(int) 4
alignof(long) 8
alignof(long long) 8
arm
alignof(short) 2
alignof(int) 4
alignof(long) 4
alignof(long long) 4
m68k (680x0)
alignof(short) 2
alignof(int) 2
alignof(long) 2
alignof(long long) 2
mips
alignof(short) 2
alignof(int) 4
alignof(long) 4
alignof(long long) 8
ppc
alignof(short) 2
alignof(int) 4
alignof(long) 4
alignof(long long) 8

for other targets, use by default (2,4,4,8).

Please, update for your favorite target...

Signed-off-by: Laurent Vivier <>
Signed-off-by: Riku Voipio <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences