Skip to content

Commit effc69d

Browse files
committed
regenerated with omit-frame-pointer
1 parent c2d3721 commit effc69d

7 files changed

Lines changed: 27 additions & 34 deletions

File tree

‎internal/cosine/cosine_apple.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ void f32_cosine_distance(const float *x, const float *y, double *result, const u
1313
#pragma clang loop vectorize(enable) interleave_count(4)
1414
for (uint64_t i = 0; i < size; i++) {
1515
sum_xy += x[i] * y[i]; // Sum of x * y
16-
sum_xx += x[i] * x[i]; // Sum of x * x
17-
sum_yy += y[i] * y[i]; // Sum of y * y
16+
sum_xx += x[i] * x[i]; // Sum of x * x
17+
sum_yy += y[i] * y[i]; // Sum of y * y
1818
}
1919

2020
// Calculate the final result

‎internal/cosine/cosine_neon.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ void f32_cosine_distance(const float *x, const float *y, double *result, const u
1313
#pragma clang loop vectorize(enable) interleave_count(4)
1414
for (uint64_t i = 0; i < size; i++) {
1515
sum_xy += x[i] * y[i]; // Sum of x * y
16-
sum_xx += x[i] * x[i]; // Sum of x * x
17-
sum_yy += y[i] * y[i]; // Sum of y * y
16+
sum_xx += x[i] * x[i]; // Sum of x * x
17+
sum_yy += y[i] * y[i]; // Sum of y * y
1818
}
1919

2020
// Calculate the final result
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
//go:build !noasm && darwin && arm64
2+
23
// AUTO-GENERATED BY GOCC -- DO NOT EDIT
34

45
package simd
56

67
import "unsafe"
78

8-
//go:noescape,nosplit
9+
//go:nosplit
10+
//go:noescape
911
func f32_cosine_distance(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)
1012

11-
//go:noescape,nosplit
13+
//go:nosplit
14+
//go:noescape
1215
func f32_dot_product(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)

‎internal/cosine/simd/cosine_apple.s‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ TEXT ·f32_cosine_distance(SB), $0-32
66
MOVD y+8(FP), R1
77
MOVD result+16(FP), R2
88
MOVD size+24(FP), R3
9-
WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
10-
WORD $0x910003fd // mov x29, sp
119
WORD $0x2f00e400 // movi d0, #0000000000000000
1210
WORD $0xb4000103 // cbz x3, LBB0_3
1311
WORD $0xf100407f // cmp x3, #16
@@ -24,7 +22,7 @@ BB0_3:
2422
WORD $0x1e21c042 // fsqrt s2, s2
2523
WORD $0x1e202048 // fcmp s2, #0.0
2624
WORD $0x540008a0 // b.eq LBB0_10
27-
WORD $0x14000047 // b LBB0_11
25+
WORD $0x14000046 // b LBB0_11
2826

2927
BB0_4:
3028
WORD $0x6f00e401 // movi.2d v1, #0000000000000000
@@ -101,38 +99,33 @@ BB0_9:
10199
WORD $0x1e22c021 // fcvt d1, s1
102100
WORD $0x1e21c042 // fsqrt s2, s2
103101
WORD $0x1e202048 // fcmp s2, #0.0
104-
WORD $0x54000081 // b.ne LBB0_11
102+
WORD $0x54000061 // b.ne LBB0_11
105103

106104
BB0_10:
107105
WORD $0xfd000040 // str d0, [x2]
108-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
109106
WORD $0xd65f03c0 // ret
110107

111108
BB0_11:
112109
WORD $0x1e22c040 // fcvt d0, s2
113110
WORD $0x1e601820 // fdiv d0, d1, d0
114111
WORD $0xfd000040 // str d0, [x2]
115-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
116112
WORD $0xd65f03c0 // ret
117113

118114
TEXT ·f32_dot_product(SB), $0-32
119115
MOVD x+0(FP), R0
120116
MOVD y+8(FP), R1
121117
MOVD result+16(FP), R2
122118
MOVD size+24(FP), R3
123-
WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]! ; 16-byte Folded Spill
124-
WORD $0x910003fd // mov x29, sp
125119
WORD $0xb40000c3 // cbz x3, LBB1_3
126120
WORD $0xf100207f // cmp x3, #8
127-
WORD $0x54000102 // b.hs LBB1_4
121+
WORD $0x540000e2 // b.hs LBB1_4
128122
WORD $0xd2800008 // mov x8, #0
129123
WORD $0x2f00e400 // movi d0, #0000000000000000
130-
WORD $0x14000018 // b LBB1_7
124+
WORD $0x14000017 // b LBB1_7
131125

132126
BB1_3:
133127
WORD $0x2f00e400 // movi d0, #0000000000000000
134128
WORD $0xfd000040 // str d0, [x2]
135-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
136129
WORD $0xd65f03c0 // ret
137130

138131
BB1_4:
@@ -174,5 +167,4 @@ BB1_8:
174167
BB1_9:
175168
WORD $0x1e22c000 // fcvt d0, s0
176169
WORD $0xfd000040 // str d0, [x2]
177-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16 ; 16-byte Folded Reload
178170
WORD $0xd65f03c0 // ret

‎internal/cosine/simd/cosine_avx.go‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
//go:build !noasm && amd64
2+
23
// AUTO-GENERATED BY GOCC -- DO NOT EDIT
34

45
package simd
56

67
import "unsafe"
78

8-
//go:noescape,nosplit
9+
//go:nosplit
10+
//go:noescape
911
func f32_cosine_distance(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)
1012

11-
//go:noescape,nosplit
13+
//go:nosplit
14+
//go:noescape
1215
func f32_dot_product(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
//go:build !noasm && !darwin && arm64
2+
23
// AUTO-GENERATED BY GOCC -- DO NOT EDIT
34

45
package simd
56

67
import "unsafe"
78

8-
//go:noescape,nosplit
9+
//go:nosplit
10+
//go:noescape
911
func f32_cosine_distance(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)
1012

11-
//go:noescape,nosplit
13+
//go:nosplit
14+
//go:noescape
1215
func f32_dot_product(x unsafe.Pointer, y unsafe.Pointer, result unsafe.Pointer, size uint64)

‎internal/cosine/simd/cosine_neon.s‎

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ TEXT ·f32_cosine_distance(SB), $0-32
66
MOVD y+8(FP), R1
77
MOVD result+16(FP), R2
88
MOVD size+24(FP), R3
9-
WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]!
109
WORD $0x2f00e400 // movi d0, #0000000000000000
11-
WORD $0x910003fd // mov x29, sp
1210
WORD $0xb4000103 // cbz x3, .LBB0_3
1311
WORD $0xf100407f // cmp x3, #16
1412
WORD $0x54000182 // b.hs .LBB0_4
@@ -24,7 +22,7 @@ LBB0_3:
2422
WORD $0x1e21c042 // fsqrt s2, s2
2523
WORD $0x1e202048 // fcmp s2, #0.0
2624
WORD $0x540008a0 // b.eq .LBB0_10
27-
WORD $0x14000047 // b .LBB0_11
25+
WORD $0x14000046 // b .LBB0_11
2826

2927
LBB0_4:
3028
WORD $0x927cec68 // and x8, x3, #0xfffffffffffffff0
@@ -101,38 +99,33 @@ LBB0_9:
10199
WORD $0x1e22c021 // fcvt d1, s1
102100
WORD $0x1e21c042 // fsqrt s2, s2
103101
WORD $0x1e202048 // fcmp s2, #0.0
104-
WORD $0x54000081 // b.ne .LBB0_11
102+
WORD $0x54000061 // b.ne .LBB0_11
105103

106104
LBB0_10:
107105
WORD $0xfd000040 // str d0, [x2]
108-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16
109106
WORD $0xd65f03c0 // ret
110107

111108
LBB0_11:
112109
WORD $0x1e22c040 // fcvt d0, s2
113110
WORD $0x1e601820 // fdiv d0, d1, d0
114111
WORD $0xfd000040 // str d0, [x2]
115-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16
116112
WORD $0xd65f03c0 // ret
117113

118114
TEXT ·f32_dot_product(SB), $0-32
119115
MOVD x+0(FP), R0
120116
MOVD y+8(FP), R1
121117
MOVD result+16(FP), R2
122118
MOVD size+24(FP), R3
123-
WORD $0xa9bf7bfd // stp x29, x30, [sp, #-16]!
124-
WORD $0x910003fd // mov x29, sp
125119
WORD $0xb40000c3 // cbz x3, .LBB1_3
126120
WORD $0xf100207f // cmp x3, #8
127-
WORD $0x54000102 // b.hs .LBB1_4
121+
WORD $0x540000e2 // b.hs .LBB1_4
128122
WORD $0x2f00e400 // movi d0, #0000000000000000
129123
WORD $0xaa1f03e8 // mov x8, xzr
130-
WORD $0x14000018 // b .LBB1_7
124+
WORD $0x14000017 // b .LBB1_7
131125

132126
LBB1_3:
133127
WORD $0x2f00e400 // movi d0, #0000000000000000
134128
WORD $0xfd000040 // str d0, [x2]
135-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16
136129
WORD $0xd65f03c0 // ret
137130

138131
LBB1_4:
@@ -174,5 +167,4 @@ LBB1_8:
174167
LBB1_9:
175168
WORD $0x1e22c000 // fcvt d0, s0
176169
WORD $0xfd000040 // str d0, [x2]
177-
WORD $0xa8c17bfd // ldp x29, x30, [sp], #16
178170
WORD $0xd65f03c0 // ret

0 commit comments

Comments
 (0)