Skip to content

Commit

Permalink
Change __loongarch__ to __loongarch64, for 64bits only.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Aug 6, 2022
1 parent 6eb176b commit 8c8a0c5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion md.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
#define MD_USE_BUILTIN_SETJMP
#define MD_GET_SP(_t) *((long *)&((_t)->context[0].__jmpbuf[0]))

#elif defined(__loongarch__)
#elif defined(__loongarch64)
/* https://github.com/ossrs/state-threads/issues/24 */
#define MD_USE_BUILTIN_SETJMP
#define MD_GET_SP(_t) *((long *)&((_t)->context[0].__jmpbuf[0]))
Expand Down
2 changes: 1 addition & 1 deletion md_linux.S
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@



#elif defined(__loongarch__)
#elif defined(__loongarch64)

/****************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions tools/porting/porting.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ int main(int argc, char** argv)
#ifdef __x86_64__
printf("__x86_64__: %d\n", __x86_64__);
#endif
#ifdef __loongarch__
printf("__loongarch__: %d, __loongarch64 :%d\n", __loongarch__, __loongarch64);
#ifdef __loongarch64
printf("__loongarch64 :%d\n", __loongarch64);
#endif
#ifdef __riscv
printf("__riscv: %d\n", __riscv);
Expand Down Expand Up @@ -127,7 +127,7 @@ void print_jmpbuf()
unsigned char* p = (unsigned char*)ctx[0].__jb;
print_buf(p, nn_jb);
}
#elif __loongarch__
#elif __loongarch64
void print_jmpbuf()
{
// https://github.com/ossrs/state-threads/issues/24#porting
Expand Down
2 changes: 1 addition & 1 deletion tools/verify/verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void verify_jmpbuf()
unsigned char* p = (unsigned char*)ctx[0].__jb;
print_buf(p, nn_jb);
}
#elif __loongarch__
#elif __loongarch64
void verify_jmpbuf()
{
// https://github.com/ossrs/state-threads/issues/24#porting
Expand Down

0 comments on commit 8c8a0c5

Please sign in to comment.