Skip to content

Commit b9d1f49

Browse files
irixxxxqueueRAM
authored andcommitted
fixes for building on 32 bit host systems
1 parent 4cb644d commit b9d1f49

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6836,6 +6836,7 @@ case "$target_name" in
68366836
solaris)
68376837
TARGET_ARCH=sparc
68386838
TARGET_ABI_DIR=solaris
6839+
TARGET_BASE_ARCH=sparc
68396840
echo "TARGET_ABI_SOLARIS=y" >> $config_target_mak
68406841
;;
68416842
solaris64)

linux-user/elfload.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2067,6 +2067,8 @@ abi_ulong sgi_map_elf_image(int image_fd, struct elf_phdr *phdr, int phnum)
20672067
}
20682068
}
20692069

2070+
mmap_lock();
2071+
20702072
/* The image indicates that it can be loaded anywhere. Find a
20712073
location that can hold the memory space required. If the
20722074
image is pre-linked, LOADDR will be non-zero. Since we do
@@ -2113,9 +2115,13 @@ abi_ulong sgi_map_elf_image(int image_fd, struct elf_phdr *phdr, int phnum)
21132115
}
21142116
}
21152117

2118+
mmap_unlock();
2119+
21162120
return load_bias + phdr[0].p_vaddr;
21172121

21182122
exit_perror:
2123+
mmap_unlock();
2124+
21192125
errmsg = strerror(errno);
21202126
fprintf(stderr, "error in syssgi elfmap: %s\n", errmsg);
21212127
return -ENOEXEC;

linux-user/syscall_defs.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ struct target_stat {
16221622
abi_long target_st_ctime;
16231623
abi_ulong __unused3;
16241624
abi_int st_blksize;
1625-
int64_t st_blocks;
1625+
abi_llong st_blocks;
16261626
char st_fstype[16];
16271627
abi_long __unused4[8];
16281628
};
@@ -1631,22 +1631,22 @@ struct target_stat {
16311631
struct target_stat64 {
16321632
abi_ulong st_dev;
16331633
abi_long st_pad1[3];
1634-
uint64_t st_ino;
1634+
abi_ullong st_ino;
16351635
abi_uint st_mode;
16361636
abi_uint st_nlink;
16371637
abi_int st_uid;
16381638
abi_int st_gid;
16391639
abi_ulong st_rdev;
16401640
abi_long st_pad2[2];
1641-
int64_t st_size;
1641+
abi_llong st_size;
16421642
abi_long target_st_atime;
16431643
abi_ulong __unused1;
16441644
abi_long target_st_mtime;
16451645
abi_ulong __unused2;
16461646
abi_long target_st_ctime;
16471647
abi_ulong __unused3;
16481648
abi_int st_blksize;
1649-
int64_t st_blocks;
1649+
abi_llong st_blocks;
16501650
char st_fstype[16];
16511651
abi_long __unused4[8];
16521652
};
@@ -1977,7 +1977,7 @@ struct target_stat {
19771977
struct target_stat64 {
19781978
uint32_t st_dev;
19791979
abi_long st_pad0[3]; /* Reserved for st_dev expansion */
1980-
uint64_t st_ino;
1980+
abi_ullong st_ino;
19811981

19821982
uint32_t st_mode;
19831983
uint32_t st_nlink;
@@ -1987,7 +1987,7 @@ struct target_stat64 {
19871987

19881988
uint32_t st_rdev;
19891989
abi_long st_pad1[2]; /* Reserved for st_rdev expansion */
1990-
int64_t st_size;
1990+
abi_llong st_size;
19911991
abi_long st_pad2;
19921992

19931993
/*
@@ -2004,7 +2004,7 @@ struct target_stat64 {
20042004
abi_long target_st_ctime_nsec;
20052005

20062006
abi_long st_blksize;
2007-
int64_t st_blocks;
2007+
abi_llong st_blocks;
20082008
char st_fstype[16];
20092009
abi_long st_projid;
20102010
abi_long st_pad[7];

tcg/i386/tcg-target.inc.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2696,6 +2696,12 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode opc,
26962696
case INDEX_op_x86_packus_vec:
26972697
insn = packus_insn[vece];
26982698
goto gen_simd;
2699+
#if TCG_TARGET_REG_BITS == 32
2700+
case INDEX_op_dup2_vec:
2701+
/* Constraints have already placed both 32-bit inputs in xmm regs. */
2702+
insn = OPC_PUNPCKLDQ;
2703+
goto gen_simd;
2704+
#endif
26992705
gen_simd:
27002706
tcg_debug_assert(insn != OPC_UD2);
27012707
if (type == TCG_TYPE_V256) {
@@ -3045,6 +3051,9 @@ static const TCGTargetOpDef *tcg_target_op_def(TCGOpcode op)
30453051
case INDEX_op_x86_vperm2i128_vec:
30463052
case INDEX_op_x86_punpckl_vec:
30473053
case INDEX_op_x86_punpckh_vec:
3054+
#if TCG_TARGET_REG_BITS == 32
3055+
case INDEX_op_dup2_vec:
3056+
#endif
30483057
return &x_x_x;
30493058
case INDEX_op_dup_vec:
30503059
case INDEX_op_shli_vec:

0 commit comments

Comments
 (0)