Skip to content

Commit d536440

Browse files
authored
No fastcall attribute in POWER platform (#35083)
1 parent 995ca49 commit d536440

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

pandas/_libs/src/ujson/lib/ultrajson.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef __int64 JSLONG;
9494
#define EXPORTFUNCTION __declspec(dllexport)
9595

9696
#define FASTCALL_MSVC __fastcall
97-
#define FASTCALL_ATTR
97+
9898
#define INLINE_PREFIX static __inline
9999

100100
#else
@@ -108,12 +108,6 @@ typedef uint32_t JSUINT32;
108108

109109
#define FASTCALL_MSVC
110110

111-
#if !defined __x86_64__ && !defined __aarch64__
112-
#define FASTCALL_ATTR __attribute__((fastcall))
113-
#else
114-
#define FASTCALL_ATTR
115-
#endif
116-
117111
#define INLINE_PREFIX static inline
118112

119113
typedef uint8_t JSUINT8;

pandas/_libs/src/ujson/lib/ultrajsondec.c

+11-11
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct DecoderState {
6868
JSONObjectDecoder *dec;
6969
};
7070

71-
JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds) FASTCALL_ATTR;
71+
JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds);
7272
typedef JSOBJ (*PFN_DECODER)(struct DecoderState *ds);
7373

7474
static JSOBJ SetError(struct DecoderState *ds, int offset,
@@ -99,7 +99,7 @@ double createDouble(double intNeg, double intValue, double frcValue,
9999
return (intValue + (frcValue * g_pow10[frcDecimalCount])) * intNeg;
100100
}
101101

102-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds) {
102+
JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds) {
103103
char *end;
104104
double value;
105105
errno = 0;
@@ -114,7 +114,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decodePreciseFloat(struct DecoderState *ds) {
114114
return ds->dec->newDouble(ds->prv, value);
115115
}
116116

117-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
117+
JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
118118
int intNeg = 1;
119119
int mantSize = 0;
120120
JSUINT64 intValue;
@@ -340,7 +340,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_numeric(struct DecoderState *ds) {
340340
pow(10.0, expValue * expNeg));
341341
}
342342

343-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true(struct DecoderState *ds) {
343+
JSOBJ FASTCALL_MSVC decode_true(struct DecoderState *ds) {
344344
char *offset = ds->start;
345345
offset++;
346346

@@ -356,7 +356,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_true(struct DecoderState *ds) {
356356
return SetError(ds, -1, "Unexpected character found when decoding 'true'");
357357
}
358358

359-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false(struct DecoderState *ds) {
359+
JSOBJ FASTCALL_MSVC decode_false(struct DecoderState *ds) {
360360
char *offset = ds->start;
361361
offset++;
362362

@@ -373,7 +373,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_false(struct DecoderState *ds) {
373373
return SetError(ds, -1, "Unexpected character found when decoding 'false'");
374374
}
375375

376-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null(struct DecoderState *ds) {
376+
JSOBJ FASTCALL_MSVC decode_null(struct DecoderState *ds) {
377377
char *offset = ds->start;
378378
offset++;
379379

@@ -389,7 +389,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_null(struct DecoderState *ds) {
389389
return SetError(ds, -1, "Unexpected character found when decoding 'null'");
390390
}
391391

392-
FASTCALL_ATTR void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds) {
392+
void FASTCALL_MSVC SkipWhitespace(struct DecoderState *ds) {
393393
char *offset;
394394

395395
for (offset = ds->start; (ds->end - offset) > 0; offset++) {
@@ -677,7 +677,7 @@ static const JSUINT8 g_decoderLookup[256] = {
677677
DS_UTFLENERROR,
678678
};
679679

680-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string(struct DecoderState *ds) {
680+
JSOBJ FASTCALL_MSVC decode_string(struct DecoderState *ds) {
681681
JSUTF16 sur[2] = {0};
682682
int iSur = 0;
683683
int index;
@@ -957,7 +957,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_string(struct DecoderState *ds) {
957957
}
958958
}
959959

960-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds) {
960+
JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds) {
961961
JSOBJ itemValue;
962962
JSOBJ newObj;
963963
int len;
@@ -1021,7 +1021,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_array(struct DecoderState *ds) {
10211021
}
10221022
}
10231023

1024-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object(struct DecoderState *ds) {
1024+
JSOBJ FASTCALL_MSVC decode_object(struct DecoderState *ds) {
10251025
JSOBJ itemName;
10261026
JSOBJ itemValue;
10271027
JSOBJ newObj;
@@ -1104,7 +1104,7 @@ FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_object(struct DecoderState *ds) {
11041104
}
11051105
}
11061106

1107-
FASTCALL_ATTR JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds) {
1107+
JSOBJ FASTCALL_MSVC decode_any(struct DecoderState *ds) {
11081108
for (;;) {
11091109
switch (*ds->start) {
11101110
case '\"':

pandas/_libs/src/ujson/lib/ultrajsonenc.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void Buffer_Realloc(JSONObjectEncoder *enc, size_t cbNeeded) {
393393
enc->end = enc->start + newSize;
394394
}
395395

396-
FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC
396+
INLINE_PREFIX void FASTCALL_MSVC
397397
Buffer_AppendShortHexUnchecked(char *outputOffset, unsigned short value) {
398398
*(outputOffset++) = g_hexChars[(value & 0xf000) >> 12];
399399
*(outputOffset++) = g_hexChars[(value & 0x0f00) >> 8];
@@ -722,7 +722,7 @@ int Buffer_EscapeStringValidated(JSOBJ obj, JSONObjectEncoder *enc,
722722

723723
#define Buffer_AppendCharUnchecked(__enc, __chr) *((__enc)->offset++) = __chr;
724724

725-
FASTCALL_ATTR INLINE_PREFIX void FASTCALL_MSVC strreverse(char *begin,
725+
INLINE_PREFIX void FASTCALL_MSVC strreverse(char *begin,
726726
char *end) {
727727
char aux;
728728
while (end > begin) aux = *end, *end-- = *begin, *begin++ = aux;

0 commit comments

Comments
 (0)