Differences From Artifact [b0d88583f9]:
- File src/OFSystemInfo.m — part of check-in [9723036211] at 2018-10-06 18:39:06 on branch trunk — OFSystemInfo: Fix signedness in comparison (user: js, size: 14915) [annotate] [blame] [check-ins using]
To Artifact [f32302ffd0]:
- File
src/OFSystemInfo.m
— part of check-in
[2fc1016631]
at
2018-12-02 20:11:04
on branch trunk
— OFSystemInfo: Work around GCC picking ebx for "=r"
Newer GCC versions on Windows use ebx for "=r", which results in a
movl %ebx, %ebx. %ebx is then destroyed by the popl %ebx that follows.
To work around this, force the use of %edi instead ("=D"). (user: js, size: 14919) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
244 245 246 247 248 249 250 | __asm__ ( "cpuid" : "=a"(regs.eax), "=b"(regs.ebx), "=c"(regs.ecx), "=d"(regs.edx) : "a"(eax), "c"(ecx) ); # elif defined(OF_X86_ASM) /* | | | | | | < | | | 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 | __asm__ ( "cpuid" : "=a"(regs.eax), "=b"(regs.ebx), "=c"(regs.ecx), "=d"(regs.edx) : "a"(eax), "c"(ecx) ); # elif defined(OF_X86_ASM) /* * This workaround is required by older GCC versions when using -fPIC, * as ebx is a special register in PIC code. Yes, GCC is indeed not * able to just push a register onto the stack before the __asm__ block * and to pop it afterwards. */ __asm__ ( "xchgl %%ebx, %%edi\n\t" "cpuid\n\t" "xchgl %%edi, %%ebx" : "=a"(regs.eax), "=D"(regs.ebx), "=c"(regs.ecx), "=d"(regs.edx) : "a"(eax), "c"(ecx) ); # else memset(®s, 0, sizeof(regs)); # endif return regs; |
︙ | ︙ |