|
8 | 8 | #include "go_tls.h"
|
9 | 9 | #include "funcdata.h"
|
10 | 10 | #include "textflag.h"
|
| 11 | +#include "asm_ppc64x.h" |
11 | 12 |
|
12 | 13 | // The following functions allow calling the clang-compiled race runtime directly
|
13 | 14 | // from Go code without going all the way through cgo.
|
@@ -101,7 +102,7 @@ TEXT runtime·racereadrangepc1(SB), NOSPLIT, $0-24
|
101 | 102 | MOVD $__tsan_read_range(SB), R8
|
102 | 103 | BR racecalladdr<>(SB)
|
103 | 104 |
|
104 |
| -TEXT runtime·RaceReadRange(SB), NOSPLIT, $0-24 |
| 105 | +TEXT runtime·RaceReadRange(SB), NOSPLIT, $0-16 |
105 | 106 | BR runtime·racereadrange(SB)
|
106 | 107 |
|
107 | 108 | // func runtime·RaceWriteRange(addr, size uintptr)
|
@@ -467,9 +468,9 @@ rest:
|
467 | 468 | MOVD R10, 16(R1)
|
468 | 469 | MOVW CR, R10
|
469 | 470 | MOVW R10, 8(R1)
|
470 |
| - MOVDU R1, -336(R1) // Allocate frame needed for register save area |
| 471 | + MOVDU R1, -336(R1) // Allocate frame needed for outargs and register save area |
471 | 472 |
|
472 |
| - MOVD R14, 40(R1) |
| 473 | + MOVD R14, 328(R1) |
473 | 474 | MOVD R15, 48(R1)
|
474 | 475 | MOVD R16, 56(R1)
|
475 | 476 | MOVD R17, 64(R1)
|
@@ -511,16 +512,16 @@ rest:
|
511 | 512 |
|
512 | 513 | MOVD g_m(g), R7
|
513 | 514 | MOVD m_g0(R7), g // set g = m-> g0
|
514 |
| - MOVD R3, cmd+0(FP) // can't use R1 here ?? use input args and assumer caller expects those? |
515 |
| - MOVD R4, ctx+8(FP) // can't use R1 here ?? |
| 515 | + MOVD R3, FIXED_FRAME+0(R1) |
| 516 | + MOVD R4, FIXED_FRAME+8(R1) |
516 | 517 | BL runtime·racecallback(SB)
|
517 | 518 | // All registers are clobbered after Go code, reload.
|
518 | 519 | MOVD runtime·tls_g(SB), R10
|
519 | 520 | MOVD 0(R13)(R10*1), g
|
520 | 521 |
|
521 | 522 | MOVD g_m(g), R7
|
522 | 523 | MOVD m_curg(R7), g // restore g = m->curg
|
523 |
| - MOVD 40(R1), R14 |
| 524 | + MOVD 328(R1), R14 |
524 | 525 | MOVD 48(R1), R15
|
525 | 526 | MOVD 56(R1), R16
|
526 | 527 | MOVD 64(R1), R17
|
|
0 commit comments