Commit b39bc503c171a1f1f39fe2958ddbf2ce75bbcc16

Authored by blueswir1
1 parent 8e853dc7

Make bitmask tables static const

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5425 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user/syscall.c
@@ -2230,7 +2230,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg) @@ -2230,7 +2230,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
2230 return ret; 2230 return ret;
2231 } 2231 }
2232 2232
2233 -bitmask_transtbl iflag_tbl[] = { 2233 +static const bitmask_transtbl iflag_tbl[] = {
2234 { TARGET_IGNBRK, TARGET_IGNBRK, IGNBRK, IGNBRK }, 2234 { TARGET_IGNBRK, TARGET_IGNBRK, IGNBRK, IGNBRK },
2235 { TARGET_BRKINT, TARGET_BRKINT, BRKINT, BRKINT }, 2235 { TARGET_BRKINT, TARGET_BRKINT, BRKINT, BRKINT },
2236 { TARGET_IGNPAR, TARGET_IGNPAR, IGNPAR, IGNPAR }, 2236 { TARGET_IGNPAR, TARGET_IGNPAR, IGNPAR, IGNPAR },
@@ -2248,7 +2248,7 @@ bitmask_transtbl iflag_tbl[] = { @@ -2248,7 +2248,7 @@ bitmask_transtbl iflag_tbl[] = {
2248 { 0, 0, 0, 0 } 2248 { 0, 0, 0, 0 }
2249 }; 2249 };
2250 2250
2251 -bitmask_transtbl oflag_tbl[] = { 2251 +static const bitmask_transtbl oflag_tbl[] = {
2252 { TARGET_OPOST, TARGET_OPOST, OPOST, OPOST }, 2252 { TARGET_OPOST, TARGET_OPOST, OPOST, OPOST },
2253 { TARGET_OLCUC, TARGET_OLCUC, OLCUC, OLCUC }, 2253 { TARGET_OLCUC, TARGET_OLCUC, OLCUC, OLCUC },
2254 { TARGET_ONLCR, TARGET_ONLCR, ONLCR, ONLCR }, 2254 { TARGET_ONLCR, TARGET_ONLCR, ONLCR, ONLCR },
@@ -2276,7 +2276,7 @@ bitmask_transtbl oflag_tbl[] = { @@ -2276,7 +2276,7 @@ bitmask_transtbl oflag_tbl[] = {
2276 { 0, 0, 0, 0 } 2276 { 0, 0, 0, 0 }
2277 }; 2277 };
2278 2278
2279 -bitmask_transtbl cflag_tbl[] = { 2279 +static const bitmask_transtbl cflag_tbl[] = {
2280 { TARGET_CBAUD, TARGET_B0, CBAUD, B0 }, 2280 { TARGET_CBAUD, TARGET_B0, CBAUD, B0 },
2281 { TARGET_CBAUD, TARGET_B50, CBAUD, B50 }, 2281 { TARGET_CBAUD, TARGET_B50, CBAUD, B50 },
2282 { TARGET_CBAUD, TARGET_B75, CBAUD, B75 }, 2282 { TARGET_CBAUD, TARGET_B75, CBAUD, B75 },
@@ -2311,7 +2311,7 @@ bitmask_transtbl cflag_tbl[] = { @@ -2311,7 +2311,7 @@ bitmask_transtbl cflag_tbl[] = {
2311 { 0, 0, 0, 0 } 2311 { 0, 0, 0, 0 }
2312 }; 2312 };
2313 2313
2314 -bitmask_transtbl lflag_tbl[] = { 2314 +static const bitmask_transtbl lflag_tbl[] = {
2315 { TARGET_ISIG, TARGET_ISIG, ISIG, ISIG }, 2315 { TARGET_ISIG, TARGET_ISIG, ISIG, ISIG },
2316 { TARGET_ICANON, TARGET_ICANON, ICANON, ICANON }, 2316 { TARGET_ICANON, TARGET_ICANON, ICANON, ICANON },
2317 { TARGET_XCASE, TARGET_XCASE, XCASE, XCASE }, 2317 { TARGET_XCASE, TARGET_XCASE, XCASE, XCASE },
@@ -249,9 +249,9 @@ const argtype *thunk_convert(void *dst, const void *src, @@ -249,9 +249,9 @@ const argtype *thunk_convert(void *dst, const void *src,
249 * between X86 and Alpha formats... 249 * between X86 and Alpha formats...
250 */ 250 */
251 unsigned int target_to_host_bitmask(unsigned int x86_mask, 251 unsigned int target_to_host_bitmask(unsigned int x86_mask,
252 - bitmask_transtbl * trans_tbl) 252 + const bitmask_transtbl * trans_tbl)
253 { 253 {
254 - bitmask_transtbl * btp; 254 + const bitmask_transtbl *btp;
255 unsigned int alpha_mask = 0; 255 unsigned int alpha_mask = 0;
256 256
257 for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) { 257 for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) {
@@ -263,9 +263,9 @@ unsigned int target_to_host_bitmask(unsigned int x86_mask, @@ -263,9 +263,9 @@ unsigned int target_to_host_bitmask(unsigned int x86_mask,
263 } 263 }
264 264
265 unsigned int host_to_target_bitmask(unsigned int alpha_mask, 265 unsigned int host_to_target_bitmask(unsigned int alpha_mask,
266 - bitmask_transtbl * trans_tbl) 266 + const bitmask_transtbl * trans_tbl)
267 { 267 {
268 - bitmask_transtbl * btp; 268 + const bitmask_transtbl *btp;
269 unsigned int x86_mask = 0; 269 unsigned int x86_mask = 0;
270 270
271 for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) { 271 for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) {
@@ -155,8 +155,8 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host) @@ -155,8 +155,8 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
155 #endif /* NO_THUNK_TYPE_SIZE */ 155 #endif /* NO_THUNK_TYPE_SIZE */
156 156
157 unsigned int target_to_host_bitmask(unsigned int x86_mask, 157 unsigned int target_to_host_bitmask(unsigned int x86_mask,
158 - bitmask_transtbl * trans_tbl); 158 + const bitmask_transtbl * trans_tbl);
159 unsigned int host_to_target_bitmask(unsigned int alpha_mask, 159 unsigned int host_to_target_bitmask(unsigned int alpha_mask,
160 - bitmask_transtbl * trans_tbl); 160 + const bitmask_transtbl * trans_tbl);
161 161
162 #endif 162 #endif