Revision be98f1f8

b/tests/test-i386.c
703 703
    uint64_t l;
704 704
};
705 705

  
706
union float64u q_nan = { .l = 0xFFF8000000000000 };
707
union float64u s_nan = { .l = 0xFFF0000000000000 };
706
union float64u q_nan = { .l = 0xFFF8000000000000LL };
707
union float64u s_nan = { .l = 0xFFF0000000000000LL };
708 708

  
709 709
void test_fops(double a, double b)
710 710
{
......
819 819
    /* test all roundings */
820 820
    asm volatile ("fstcw %0" : "=m" (fpuc));
821 821
    for(i=0;i<4;i++) {
822
        asm volatile ("fldcw %0" : : "m" ((fpuc & ~0x0c00) | (i << 10)));
822
        uint16_t val16;
823
        val16 = (fpuc & ~0x0c00) | (i << 10);
824
        asm volatile ("fldcw %0" : : "m" (val16));
823 825
        asm volatile ("fist %0" : "=m" (wa) : "t" (a));
824 826
        asm volatile ("fistl %0" : "=m" (ia) : "t" (a));
825 827
        asm volatile ("fistpll %0" : "=m" (lla) : "t" (a) : "st");
......
976 978
    test_fcvt(1.0/0.0);
977 979
    test_fcvt(q_nan.d);
978 980
    test_fconst();
979
    test_fbcd(1234567890123456);
980
    test_fbcd(-123451234567890);
981
    test_fbcd(1234567890123456.0);
982
    test_fbcd(-123451234567890.0);
981 983
    test_fenv();
982 984
    if (TEST_CMOV) {
983 985
        test_fcmov();
......
1151 1153
        long i, eflags;
1152 1154

  
1153 1155
        for(i = 0; i < 2; i++) {
1154
            op0 = 0x123456789abcd;
1156
            op0 = 0x123456789abcdLL;
1155 1157
            if (i == 0)
1156
                op1 = 0xfbca765423456;
1158
                op1 = 0xfbca765423456LL;
1157 1159
            else
1158 1160
                op1 = op0;
1159
            op2 = 0x6532432432434;
1161
            op2 = 0x6532432432434LL;
1160 1162
            asm("cmpxchg8b %1\n"
1161 1163
                "pushf\n"
1162 1164
                "pop %2\n"
......
1172 1174
/**********************************************/
1173 1175
/* segmentation tests */
1174 1176

  
1177
#include <sys/syscall.h>
1178
#include <unistd.h>
1175 1179
#include <asm/ldt.h>
1176
#include <linux/unistd.h>
1177 1180
#include <linux/version.h>
1178 1181

  
1179
_syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount)
1182
static inline int modify_ldt(int func, void * ptr, unsigned long bytecount)
1183
{
1184
    return syscall(__NR_modify_ldt, func, ptr, bytecount);
1185
}
1180 1186

  
1181 1187
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66)
1182 1188
#define modify_ldt_ldt_s user_desc
......
1505 1511
    *(uint16_t *)seg_to_linear(r->ss, r->esp) = val;
1506 1512
}
1507 1513

  
1508
#undef __syscall_return
1509
#define __syscall_return(type, res) \
1510
do { \
1511
	return (type) (res); \
1512
} while (0)
1513

  
1514
_syscall2(int, vm86, int, func, struct vm86plus_struct *, v86)
1514
static inline int vm86(int func, struct vm86plus_struct *v86)
1515
{
1516
    return syscall(__NR_vm86, func, v86);
1517
}
1515 1518

  
1516 1519
extern char vm86_code_start;
1517 1520
extern char vm86_code_end;

Also available in: Unified diff