|
10 | 10 | package codegen
|
11 | 11 |
|
12 | 12 | func zeroAllocNew1() *struct{} {
|
13 |
| - // 386:-`CALL\truntime\.newobject` |
14 |
| - // amd64:-`CALL\truntime\.newobject` |
15 |
| - // arm:-`CALL\truntime\.newobject` |
16 |
| - // arm64:-`CALL\truntime\.newobject` |
| 13 | + // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase` |
| 14 | + // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase` |
| 15 | + // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase` |
| 16 | + // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase` |
| 17 | + // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase` |
17 | 18 | return new(struct{})
|
18 | 19 | }
|
19 | 20 |
|
20 | 21 | func zeroAllocNew2() *[0]int {
|
21 |
| - // 386:-`CALL\truntime\.newobject` |
22 |
| - // amd64:-`CALL\truntime\.newobject` |
23 |
| - // arm:-`CALL\truntime\.newobject` |
24 |
| - // arm64:-`CALL\truntime\.newobject` |
| 22 | + // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase` |
| 23 | + // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase` |
| 24 | + // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase` |
| 25 | + // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase` |
| 26 | + // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase` |
25 | 27 | return new([0]int)
|
26 | 28 | }
|
27 | 29 |
|
28 | 30 | func zeroAllocSliceLit() []int {
|
29 |
| - // 386:-`CALL\truntime\.newobject` |
30 |
| - // amd64:-`CALL\truntime\.newobject` |
31 |
| - // arm:-`CALL\truntime\.newobject` |
32 |
| - // arm64:-`CALL\truntime\.newobject` |
| 31 | + // 386:-`CALL\truntime\.newobject`, `LEAL\truntime.zerobase` |
| 32 | + // amd64:-`CALL\truntime\.newobject`, `LEAQ\truntime.zerobase` |
| 33 | + // arm:-`CALL\truntime\.newobject`, `MOVW\t[$]runtime.zerobase` |
| 34 | + // arm64:-`CALL\truntime\.newobject`, `MOVD\t[$]runtime.zerobase` |
| 35 | + // riscv64:-`CALL\truntime\.newobject`, `MOV\t[$]runtime.zerobase` |
33 | 36 | return []int{}
|
34 | 37 | }
|
0 commit comments