void fpu_clear_exceptions(void)
{
- struct __attribute__((packed)) {
+ struct QEMU_PACKED {
uint16_t fpuc;
uint16_t dummy1;
uint16_t fpus;
"fstsw %%ax\n"
: "=a" (fpus)
: "t" (a), "u" (b));
- printf("fcom(%f %f)=%04lx \n",
+ printf("fcom(%f %f)=%04lx\n",
a, b, fpus & (0x4500 | FPUS_EMASK));
fpu_clear_exceptions();
asm("fucom %2\n"
void test_fenv(void)
{
- struct __attribute__((packed)) {
+ struct QEMU_PACKED {
uint16_t fpuc;
uint16_t dummy1;
uint16_t fpus;
uint32_t ignored[4];
long double fpregs[8];
} float_env32;
- struct __attribute__((packed)) {
+ struct QEMU_PACKED {
uint16_t fpuc;
uint16_t fpus;
uint16_t fptag;
struct {
uint32_t offset;
uint16_t seg;
- } __attribute__((packed)) segoff;
+ } QEMU_PACKED segoff;
ldt.entry_number = 1;
ldt.base_addr = (unsigned long)&seg_data1;
/* XXX: see if Intel Core2 and AMD64 behavior really
differ. Here we implemented the Intel way which is not
compatible yet with QEMU. */
- static struct __attribute__((packed)) {
+ static struct QEMU_PACKED {
uint64_t offset;
uint16_t seg;
} desc;
#define RBP "%%ebp"
#endif
+#if !defined(__x86_64__)
+/* causes an infinite loop, disable it for now. */
+#define TEST_ENTER(size, stack_type, level)
+#else
#define TEST_ENTER(size, stack_type, level)\
{\
long esp_save, esp_val, ebp_val, ebp_save, i;\
for(ptr = (stack_type *)esp_val; ptr < stack_end; ptr++)\
printf(FMTLX "\n", (long)ptr[0]);\
}
+#endif
static void test_enter(void)
{
}
/* Force %xmm0 usage to avoid the case where both register index are 0
- to test intruction decoding more extensively */
+ to test instruction decoding more extensively */
#define CVT_OP_XMM2MMX(op)\
{\
asm volatile (#op " %1, %0" : "=y" (r.q[0]) : "x" (a.dq) \