Skip to content

Commit e278022

Browse files
htv04WinterMute
andcommitted
Remove deprecated use of register keyword
Based on devkitPro/libogc@ed2f0bb Co-Authored-By: Dave Murphy <[email protected]>
1 parent 83bd94f commit e278022

File tree

6 files changed

+97
-97
lines changed

6 files changed

+97
-97
lines changed

gc/mad.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
267267

268268
# elif defined(FPM_ARM)
269269

270-
/*
270+
/*
271271
* This ARM V4 version is as accurate as FPM_64BIT but much faster. The
272272
* least significant bit is properly rounded at no CPU cycle cost!
273273
*/
@@ -476,8 +476,8 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
476476

477477
# if !defined(mad_f_mul)
478478
# define mad_f_mul(x, y) \
479-
({ register mad_fixed64hi_t __hi; \
480-
register mad_fixed64lo_t __lo; \
479+
({ mad_fixed64hi_t __hi; \
480+
mad_fixed64lo_t __lo; \
481481
MAD_F_MLX(__hi, __lo, (x), (y)); \
482482
mad_f_scale64(__hi, __lo); \
483483
})

gc/ogc/cast.h

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,37 +53,37 @@ static inline void CAST_Init(void)
5353

5454
static inline void CAST_SetGQR2(u32 type,s32 scale)
5555
{
56-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
56+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
5757
__set_gqr(GQR2,val);
5858
}
5959

6060
static inline void CAST_SetGQR3(u32 type,s32 scale)
6161
{
62-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
62+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
6363
__set_gqr(GQR3,val);
6464
}
6565

6666
static inline void CAST_SetGQR4(u32 type,s32 scale)
6767
{
68-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
68+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
6969
__set_gqr(GQR4,val);
7070
}
7171

7272
static inline void CAST_SetGQR5(u32 type,s32 scale)
7373
{
74-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
74+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
7575
__set_gqr(GQR5,val);
7676
}
7777

7878
static inline void CAST_SetGQR6(u32 type,s32 scale)
7979
{
80-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
80+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
8181
__set_gqr(GQR6,val);
8282
}
8383

8484
static inline void CAST_SetGQR7(u32 type,s32 scale)
8585
{
86-
register u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
86+
u32 val = ((((((scale)<<8)&GQR_SCALE_MASK)|(type))<<16)|((((scale)<<8)&GQR_SCALE_MASK)|(type)));
8787
__set_gqr(GQR7,val);
8888
}
8989

@@ -94,58 +94,58 @@ static inline void CAST_SetGQR7(u32 type,s32 scale)
9494
/* */
9595
/******************************************************************/
9696

97-
static inline f32 __castu8f32(register u8 *in)
97+
static inline f32 __castu8f32( u8 *in)
9898
{
99-
register f32 rval;
99+
f32 rval;
100100
__asm__ __volatile__ (
101101
"psq_l %[rval],0(%[in]),1,2" : [rval]"=f"(rval) : [in]"r"(in)
102102
);
103103
return rval;
104104
}
105105

106-
static inline f32 __castu16f32(register u16 *in)
106+
static inline f32 __castu16f32( u16 *in)
107107
{
108-
register f32 rval;
108+
f32 rval;
109109
__asm__ __volatile__ (
110110
"psq_l %[rval],0(%[in]),1,3" : [rval]"=f"(rval) : [in]"r"(in)
111111
);
112112
return rval;
113113
}
114114

115-
static inline f32 __casts8f32(register s8 *in)
115+
static inline f32 __casts8f32( s8 *in)
116116
{
117-
register f32 rval;
117+
f32 rval;
118118
__asm__ __volatile__ (
119119
"psq_l %[rval],0(%[in]),1,4" : [rval]"=f"(rval) : [in]"r"(in)
120120
);
121121
return rval;
122122
}
123123

124-
static inline f32 __casts16f32(register s16 *in)
124+
static inline f32 __casts16f32( s16 *in)
125125
{
126-
register f32 rval;
126+
f32 rval;
127127
__asm__ __volatile__ (
128128
"psq_l %[rval],0(%[in]),1,5" : [rval]"=f"(rval) : [in]"r"(in)
129129
);
130130
return rval;
131131
}
132132

133-
static inline void castu8f32(register u8 *in,register volatile f32 *out)
133+
static inline void castu8f32( u8 *in, volatile f32 *out)
134134
{
135135
*out = __castu8f32(in);
136136
}
137137

138-
static inline void castu16f32(register u16 *in,register volatile f32 *out)
138+
static inline void castu16f32( u16 *in, volatile f32 *out)
139139
{
140140
*out = __castu16f32(in);
141141
}
142142

143-
static inline void casts8f32(register s8 *in,register volatile f32 *out)
143+
static inline void casts8f32( s8 *in, volatile f32 *out)
144144
{
145145
*out = __casts8f32(in);
146146
}
147147

148-
static inline void casts16f32(register s16 *in,register volatile f32 *out)
148+
static inline void casts16f32( s16 *in, volatile f32 *out)
149149
{
150150
*out = __casts16f32(in);
151151
}
@@ -156,11 +156,11 @@ static inline void casts16f32(register s16 *in,register volatile f32 *out)
156156
/* */
157157
/******************************************************************/
158158

159-
static inline u8 __castf32u8(register f32 in)
159+
static inline u8 __castf32u8( f32 in)
160160
{
161161
f32 a;
162-
register u8 rval;
163-
register f32 *ptr = &a;
162+
u8 rval;
163+
f32 *ptr = &a;
164164

165165
__asm__ __volatile__ (
166166
"psq_st %[in],0(%[ptr]),1,2\n"
@@ -170,11 +170,11 @@ static inline u8 __castf32u8(register f32 in)
170170
return rval;
171171
}
172172

173-
static inline u16 __castf32u16(register f32 in)
173+
static inline u16 __castf32u16( f32 in)
174174
{
175175
f32 a;
176-
register u16 rval;
177-
register f32 *ptr = &a;
176+
u16 rval;
177+
f32 *ptr = &a;
178178

179179
__asm__ __volatile__ (
180180
"psq_st %[in],0(%[ptr]),1,3\n"
@@ -184,11 +184,11 @@ static inline u16 __castf32u16(register f32 in)
184184
return rval;
185185
}
186186

187-
static inline s8 __castf32s8(register f32 in)
187+
static inline s8 __castf32s8( f32 in)
188188
{
189189
f32 a;
190-
register s8 rval;
191-
register f32 *ptr = &a;
190+
s8 rval;
191+
f32 *ptr = &a;
192192

193193
__asm__ __volatile__ (
194194
"psq_st %[in],0(%[ptr]),1,4\n"
@@ -198,11 +198,11 @@ static inline s8 __castf32s8(register f32 in)
198198
return rval;
199199
}
200200

201-
static inline s16 __castf32s16(register f32 in)
201+
static inline s16 __castf32s16( f32 in)
202202
{
203203
f32 a;
204-
register s16 rval;
205-
register f32 *ptr = &a;
204+
s16 rval;
205+
f32 *ptr = &a;
206206

207207
__asm__ __volatile__ (
208208
"psq_st %[in],0(%[ptr]),1,5\n"
@@ -212,22 +212,22 @@ static inline s16 __castf32s16(register f32 in)
212212
return rval;
213213
}
214214

215-
static inline void castf32u8(register f32 *in,register vu8 *out)
215+
static inline void castf32u8( f32 *in, vu8 *out)
216216
{
217217
*out = __castf32u8(*in);
218218
}
219219

220-
static inline void castf32u16(register f32 *in,register vu16 *out)
220+
static inline void castf32u16( f32 *in, vu16 *out)
221221
{
222222
*out = __castf32u16(*in);
223223
}
224224

225-
static inline void castf32s8(register f32 *in,register vs8 *out)
225+
static inline void castf32s8( f32 *in, vs8 *out)
226226
{
227227
*out = __castf32s8(*in);
228228
}
229229

230-
static inline void castf32s16(register f32 *in,register vs16 *out)
230+
static inline void castf32s16( f32 *in, vs16 *out)
231231
{
232232
*out = __castf32s16(*in);
233233
}

gc/ogc/gu.h

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ void guLookAt(Mtx mt,guVector *camPos,guVector *camUp,guVector *target);
333333
* surface to the general viewing direction.
334334
*
335335
* \a a and \a b do not have to be unit vectors. Both of these vectors are assumed to be pointing towards the surface from the
336-
* light or viewer, respectively. Local copies of these vectors are negated, normalized and added head to tail.
336+
* light or viewer, respectively. Local copies of these vectors are negated, normalized and added head to tail.
337337
*
338338
* \a half is computed as a unit vector that points from the surface to halfway between the light and the viewing direction.
339339
*
@@ -355,14 +355,14 @@ void c_guVecMultiplySR(Mtx mt,guVector *src,guVector *dst);
355355
f32 c_guVecDotProduct(guVector *a,guVector *b);
356356

357357
#ifdef GEKKO
358-
void ps_guVecAdd(register guVector *a,register guVector *b,register guVector *ab);
359-
void ps_guVecSub(register guVector *a,register guVector *b,register guVector *ab);
360-
void ps_guVecScale(register guVector *src,register guVector *dst,f32 scale);
361-
void ps_guVecNormalize(register guVector *v);
362-
void ps_guVecCross(register guVector *a,register guVector *b,register guVector *axb);
363-
void ps_guVecMultiply(register Mtx mt,register guVector *src,register guVector *dst);
364-
void ps_guVecMultiplySR(register Mtx mt,register guVector *src,register guVector *dst);
365-
f32 ps_guVecDotProduct(register guVector *a,register guVector *b);
358+
void ps_guVecAdd( guVector *a, guVector *b, guVector *ab);
359+
void ps_guVecSub( guVector *a, guVector *b, guVector *ab);
360+
void ps_guVecScale( guVector *src, guVector *dst,f32 scale);
361+
void ps_guVecNormalize( guVector *v);
362+
void ps_guVecCross( guVector *a, guVector *b, guVector *axb);
363+
void ps_guVecMultiply( Mtx mt, guVector *src, guVector *dst);
364+
void ps_guVecMultiplySR( Mtx mt, guVector *src, guVector *dst);
365+
f32 ps_guVecDotProduct( guVector *a, guVector *b);
366366
#endif //GEKKO
367367

368368
void c_guQuatAdd(guQuaternion *a,guQuaternion *b,guQuaternion *ab);
@@ -373,11 +373,11 @@ void c_guQuatInverse(guQuaternion *a,guQuaternion *d);
373373
void c_guQuatMtx(guQuaternion *a,Mtx m);
374374

375375
#ifdef GEKKO
376-
void ps_guQuatAdd(register guQuaternion *a,register guQuaternion *b,register guQuaternion *ab);
377-
void ps_guQuatSub(register guQuaternion *a,register guQuaternion *b,register guQuaternion *ab);
378-
void ps_guQuatMultiply(register guQuaternion *a,register guQuaternion *b,register guQuaternion *ab);
379-
void ps_guQuatNormalize(register guQuaternion *a,register guQuaternion *d);
380-
void ps_guQuatInverse(register guQuaternion *a,register guQuaternion *d);
376+
void ps_guQuatAdd( guQuaternion *a, guQuaternion *b, guQuaternion *ab);
377+
void ps_guQuatSub( guQuaternion *a, guQuaternion *b, guQuaternion *ab);
378+
void ps_guQuatMultiply( guQuaternion *a, guQuaternion *b, guQuaternion *ab);
379+
void ps_guQuatNormalize( guQuaternion *a, guQuaternion *d);
380+
void ps_guQuatInverse( guQuaternion *a, guQuaternion *d);
381381
#endif
382382

383383
void c_guMtxIdentity(Mtx mt);
@@ -399,22 +399,22 @@ void c_guMtxReflect(Mtx m,guVector *p,guVector *n);
399399
void c_guMtxQuat(Mtx m,guQuaternion *a);
400400

401401
#ifdef GEKKO
402-
void ps_guMtxIdentity(register Mtx mt);
403-
void ps_guMtxCopy(register Mtx src,register Mtx dst);
404-
void ps_guMtxConcat(register Mtx a,register Mtx b,register Mtx ab);
405-
void ps_guMtxTranspose(register Mtx src,register Mtx xPose);
406-
u32 ps_guMtxInverse(register Mtx src,register Mtx inv);
407-
u32 ps_guMtxInvXpose(register Mtx src,register Mtx xPose);
408-
void ps_guMtxScale(register Mtx mt,register f32 xS,register f32 yS,register f32 zS);
409-
void ps_guMtxScaleApply(register Mtx src,register Mtx dst,register f32 xS,register f32 yS,register f32 zS);
410-
void ps_guMtxApplyScale(register Mtx src,register Mtx dst,register f32 xS,register f32 yS,register f32 zS);
411-
void ps_guMtxTrans(register Mtx mt,register f32 xT,register f32 yT,register f32 zT);
412-
void ps_guMtxTransApply(register Mtx src,register Mtx dst,register f32 xT,register f32 yT,register f32 zT);
413-
void ps_guMtxApplyTrans(register Mtx src,register Mtx dst,register f32 xT,register f32 yT,register f32 zT);
414-
void ps_guMtxRotRad(register Mtx mt,register const char axis,register f32 rad);
415-
void ps_guMtxRotTrig(register Mtx mt,register const char axis,register f32 sinA,register f32 cosA);
416-
void ps_guMtxRotAxisRad(register Mtx mt,register guVector *axis,register f32 tmp0);
417-
void ps_guMtxReflect(register Mtx m,register guVector *p,register guVector *n);
402+
void ps_guMtxIdentity( Mtx mt);
403+
void ps_guMtxCopy( Mtx src, Mtx dst);
404+
void ps_guMtxConcat( Mtx a, Mtx b, Mtx ab);
405+
void ps_guMtxTranspose( Mtx src, Mtx xPose);
406+
u32 ps_guMtxInverse( Mtx src, Mtx inv);
407+
u32 ps_guMtxInvXpose( Mtx src, Mtx xPose);
408+
void ps_guMtxScale( Mtx mt, f32 xS, f32 yS, f32 zS);
409+
void ps_guMtxScaleApply( Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS);
410+
void ps_guMtxApplyScale( Mtx src, Mtx dst, f32 xS, f32 yS, f32 zS);
411+
void ps_guMtxTrans( Mtx mt, f32 xT, f32 yT, f32 zT);
412+
void ps_guMtxTransApply( Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT);
413+
void ps_guMtxApplyTrans( Mtx src, Mtx dst, f32 xT, f32 yT, f32 zT);
414+
void ps_guMtxRotRad( Mtx mt, const char axis, f32 rad);
415+
void ps_guMtxRotTrig( Mtx mt, const char axis, f32 sinA, f32 cosA);
416+
void ps_guMtxRotAxisRad( Mtx mt, guVector *axis, f32 tmp0);
417+
void ps_guMtxReflect( Mtx m, guVector *p, guVector *n);
418418
#endif //GEKKO
419419

420420
void guMtx44Identity(Mtx44 mt);

0 commit comments

Comments
 (0)