1 Index: libgcc/ChangeLog
2 ===================================================================
3 --- libgcc/ChangeLog (.../tags/gcc_4_7_3_release) (revision 197943)
4 +++ libgcc/ChangeLog (.../branches/gcc-4_7-branch) (revision 197943)
6 +2013-04-11 Julian Brown <julian@codesourcery.com>
8 + * config/arm/linux-atomic.c (SUBWORD_SYNC_OP, SUBWORD_VAL_CAS)
9 + (SUBWORD_TEST_AND_SET): Use signed char/short types instead of
10 + unsigned char/unsigned short.
11 + (__sync_val_compare_and_swap_{1,2}): Handle signed argument.
13 2013-04-11 Release Manager
16 Index: libgcc/config/arm/linux-atomic.c
17 ===================================================================
18 --- libgcc/config/arm/linux-atomic.c (.../tags/gcc_4_7_3_release) (revision 197943)
19 +++ libgcc/config/arm/linux-atomic.c (.../branches/gcc-4_7-branch) (revision 197943)
21 return (RETURN & mask) >> shift; \
24 -SUBWORD_SYNC_OP (add, , +, unsigned short, 2, oldval)
25 -SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, oldval)
26 -SUBWORD_SYNC_OP (or, , |, unsigned short, 2, oldval)
27 -SUBWORD_SYNC_OP (and, , &, unsigned short, 2, oldval)
28 -SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, oldval)
29 -SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, oldval)
30 +SUBWORD_SYNC_OP (add, , +, short, 2, oldval)
31 +SUBWORD_SYNC_OP (sub, , -, short, 2, oldval)
32 +SUBWORD_SYNC_OP (or, , |, short, 2, oldval)
33 +SUBWORD_SYNC_OP (and, , &, short, 2, oldval)
34 +SUBWORD_SYNC_OP (xor, , ^, short, 2, oldval)
35 +SUBWORD_SYNC_OP (nand, ~, &, short, 2, oldval)
37 -SUBWORD_SYNC_OP (add, , +, unsigned char, 1, oldval)
38 -SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, oldval)
39 -SUBWORD_SYNC_OP (or, , |, unsigned char, 1, oldval)
40 -SUBWORD_SYNC_OP (and, , &, unsigned char, 1, oldval)
41 -SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, oldval)
42 -SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, oldval)
43 +SUBWORD_SYNC_OP (add, , +, signed char, 1, oldval)
44 +SUBWORD_SYNC_OP (sub, , -, signed char, 1, oldval)
45 +SUBWORD_SYNC_OP (or, , |, signed char, 1, oldval)
46 +SUBWORD_SYNC_OP (and, , &, signed char, 1, oldval)
47 +SUBWORD_SYNC_OP (xor, , ^, signed char, 1, oldval)
48 +SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, oldval)
50 #define OP_AND_FETCH_WORD(OP, PFX_OP, INF_OP) \
53 OP_AND_FETCH_WORD (xor, , ^)
54 OP_AND_FETCH_WORD (nand, ~, &)
56 -SUBWORD_SYNC_OP (add, , +, unsigned short, 2, newval)
57 -SUBWORD_SYNC_OP (sub, , -, unsigned short, 2, newval)
58 -SUBWORD_SYNC_OP (or, , |, unsigned short, 2, newval)
59 -SUBWORD_SYNC_OP (and, , &, unsigned short, 2, newval)
60 -SUBWORD_SYNC_OP (xor, , ^, unsigned short, 2, newval)
61 -SUBWORD_SYNC_OP (nand, ~, &, unsigned short, 2, newval)
62 +SUBWORD_SYNC_OP (add, , +, short, 2, newval)
63 +SUBWORD_SYNC_OP (sub, , -, short, 2, newval)
64 +SUBWORD_SYNC_OP (or, , |, short, 2, newval)
65 +SUBWORD_SYNC_OP (and, , &, short, 2, newval)
66 +SUBWORD_SYNC_OP (xor, , ^, short, 2, newval)
67 +SUBWORD_SYNC_OP (nand, ~, &, short, 2, newval)
69 -SUBWORD_SYNC_OP (add, , +, unsigned char, 1, newval)
70 -SUBWORD_SYNC_OP (sub, , -, unsigned char, 1, newval)
71 -SUBWORD_SYNC_OP (or, , |, unsigned char, 1, newval)
72 -SUBWORD_SYNC_OP (and, , &, unsigned char, 1, newval)
73 -SUBWORD_SYNC_OP (xor, , ^, unsigned char, 1, newval)
74 -SUBWORD_SYNC_OP (nand, ~, &, unsigned char, 1, newval)
75 +SUBWORD_SYNC_OP (add, , +, signed char, 1, newval)
76 +SUBWORD_SYNC_OP (sub, , -, signed char, 1, newval)
77 +SUBWORD_SYNC_OP (or, , |, signed char, 1, newval)
78 +SUBWORD_SYNC_OP (and, , &, signed char, 1, newval)
79 +SUBWORD_SYNC_OP (xor, , ^, signed char, 1, newval)
80 +SUBWORD_SYNC_OP (nand, ~, &, signed char, 1, newval)
83 __sync_val_compare_and_swap_4 (int *ptr, int oldval, int newval)
85 actual_oldval = *wordptr; \
87 if (__builtin_expect (((actual_oldval & mask) >> shift) != \
88 - (unsigned int) oldval, 0)) \
89 + ((unsigned int) oldval & MASK_##WIDTH), 0)) \
90 return (actual_oldval & mask) >> shift; \
92 actual_newval = (actual_oldval & ~mask) \
97 -SUBWORD_VAL_CAS (unsigned short, 2)
98 -SUBWORD_VAL_CAS (unsigned char, 1)
99 +SUBWORD_VAL_CAS (short, 2)
100 +SUBWORD_VAL_CAS (signed char, 1)
102 typedef unsigned char bool;
105 return (oldval == actual_oldval); \
108 -SUBWORD_BOOL_CAS (unsigned short, 2)
109 -SUBWORD_BOOL_CAS (unsigned char, 1)
110 +SUBWORD_BOOL_CAS (short, 2)
111 +SUBWORD_BOOL_CAS (signed char, 1)
114 __sync_synchronize (void)
116 return (oldval & mask) >> shift; \
119 -SUBWORD_TEST_AND_SET (unsigned short, 2)
120 -SUBWORD_TEST_AND_SET (unsigned char, 1)
121 +SUBWORD_TEST_AND_SET (short, 2)
122 +SUBWORD_TEST_AND_SET (signed char, 1)
124 #define SYNC_LOCK_RELEASE(TYPE, WIDTH) \
127 ===================================================================
128 --- gcc/DATESTAMP (.../tags/gcc_4_7_3_release) (revision 197943)
129 +++ gcc/DATESTAMP (.../branches/gcc-4_7-branch) (revision 197943)