[comitted] bitint: Fix testism where __seg_gs was being used for all targets
Checks
Commit Message
Replaced uses of __seg_gs with the MACRO SEG defined in the testcase to
pick (if any) the right __seg_{gs,fs} keyword based on target.
gcc/testsuite/ChangeLog:
* gcc.dg/bitint-86.c (__seg_gs): Replace with SEG MACRO.
Comments
On Mon, Feb 19, 2024 at 04:13:29PM +0000, Andre Vieira (lists) wrote:
> Replaced uses of __seg_gs with the MACRO SEG defined in the testcase to pick
> (if any) the right __seg_{gs,fs} keyword based on target.
>
> gcc/testsuite/ChangeLog:
>
> * gcc.dg/bitint-86.c (__seg_gs): Replace with SEG MACRO.
ChangeLog should be
* gcc.dg/bitint-86.c (foo, bar, baz): Replace __seg_gs with SEG.
Otherwise, LGTM.
Sorry for forgetting to do that myself.
Jakub
On 19/02/2024 16:17, Jakub Jelinek wrote:
> On Mon, Feb 19, 2024 at 04:13:29PM +0000, Andre Vieira (lists) wrote:
>> Replaced uses of __seg_gs with the MACRO SEG defined in the testcase to pick
>> (if any) the right __seg_{gs,fs} keyword based on target.
>>
>> gcc/testsuite/ChangeLog:
>>
>> * gcc.dg/bitint-86.c (__seg_gs): Replace with SEG MACRO.
>
> ChangeLog should be
> * gcc.dg/bitint-86.c (foo, bar, baz): Replace __seg_gs with SEG.
> Otherwise, LGTM.
> Sorry for forgetting to do that myself.
>
>
> Jakub
>
That makes sense ... but I already pushed it upstream, thought it was
obvious. Apologies for the ChangeLog mistake :(
@@ -15,14 +15,14 @@ struct T { struct S b[4]; };
#endif
void
-foo (__seg_gs struct T *p)
+foo (SEG struct T *p)
{
struct S s;
p->b[0] = s;
}
void
-bar (__seg_gs struct T *p, _BitInt(710) x, int y, double z)
+bar (SEG struct T *p, _BitInt(710) x, int y, double z)
{
p->b[0].a = x + 42;
p->b[1].a = x << y;
@@ -31,7 +31,7 @@ bar (__seg_gs struct T *p, _BitInt(710) x, int y, double z)
}
int
-baz (__seg_gs struct T *p, _BitInt(710) x, _BitInt(710) y)
+baz (SEG struct T *p, _BitInt(710) x, _BitInt(710) y)
{
return __builtin_add_overflow (x, y, &p->b[1].a);
}