1
0
mirror of https://github.com/golang/go synced 2024-09-29 19:24:33 -06:00

runtime/cgo: rename crosscall_arm1 to crosscall1

This reduces inconsistency with other architectures and will allow
for further code deduplication.

Change-Id: Icf0d02f765546c3193cccaa22c79e632e12d6bba
Reviewed-on: https://go-review.googlesource.com/c/go/+/518616
Run-TryBot: Joel Sing <joel@sing.id.au>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Joel Sing 2023-08-11 19:49:38 +10:00
parent 5feb8b60e7
commit a91931d692
5 changed files with 12 additions and 12 deletions

View File

@ -5,14 +5,14 @@
.file "gcc_arm.S"
/*
* void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
* void crosscall1(void (*fn)(void), void (*setg_gcc)(void *g), void *g)
*
* Calling into the 5c tool chain, where all registers are caller save.
* Calling into the gc tool chain, where all registers are caller save.
* Called from standard ARM EABI, where r4-r11 are callee-save, so they
* must be saved explicitly.
*/
.globl crosscall_arm1
crosscall_arm1:
.globl crosscall1
crosscall1:
push {r4, r5, r6, r7, r8, r9, r10, r11, ip, lr}
mov r4, r0
mov r5, r1

View File

@ -56,7 +56,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
}
}
extern void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
static void*
threadentry(void *v)
{
@ -65,6 +65,6 @@ threadentry(void *v)
ts = *(ThreadStart*)v;
free(v);
crosscall_arm1(ts.fn, setg_gcc, (void*)ts.g);
crosscall1(ts.fn, setg_gcc, (void*)ts.g);
return nil;
}

View File

@ -38,7 +38,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
}
}
extern void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
static void*
threadentry(void *v)
{
@ -47,7 +47,7 @@ threadentry(void *v)
ts = *(ThreadStart*)v;
free(v);
crosscall_arm1(ts.fn, setg_gcc, (void*)ts.g);
crosscall1(ts.fn, setg_gcc, (void*)ts.g);
return nil;
}

View File

@ -46,7 +46,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
}
}
extern void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
static void*
threadentry(void *v)
{
@ -67,6 +67,6 @@ threadentry(void *v)
ss.ss_flags = SS_DISABLE;
sigaltstack(&ss, nil);
crosscall_arm1(ts.fn, setg_gcc, (void*)ts.g);
crosscall1(ts.fn, setg_gcc, (void*)ts.g);
return nil;
}

View File

@ -45,7 +45,7 @@ _cgo_sys_thread_start(ThreadStart *ts)
}
}
extern void crosscall_arm1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
static void*
threadentry(void *v)
@ -55,6 +55,6 @@ threadentry(void *v)
ts = *(ThreadStart*)v;
free(v);
crosscall_arm1(ts.fn, setg_gcc, (void*)ts.g);
crosscall1(ts.fn, setg_gcc, (void*)ts.g);
return nil;
}