File: memory_neon_arm64.s

package info (click to toggle)
golang-github-apache-arrow-go 18.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 32,200 kB
  • sloc: asm: 477,547; ansic: 5,369; cpp: 759; sh: 585; makefile: 319; python: 190; sed: 5
file content (49 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//+build !noasm !appengine

// ARROW-15320:
// (C2GOASM doesn't work correctly for Arm64)
// Partly GENERATED BY asm2plan9s.

// func _memset_neon(buf unsafe.Pointer, len, c uintptr)
TEXT ยท_memset_neon(SB), $0-24

	MOVD	buf+0(FP), R0
	MOVD	len+8(FP), R1
	MOVD	c+16(FP), R2

	// The Go ABI saves the frame pointer register one word below the 
	// caller's frame. Make room so we don't overwrite it. Needs to stay 
	// 16-byte aligned 
	SUB $16, RSP
	WORD $0xa9bf7bfd // stp    x29, x30, [sp, #-16]!
	WORD $0x8b010008 // add    x8, x0, x1
	WORD $0xeb00011f // cmp    x8, x0
	WORD $0x910003fd // mov    x29, sp
	BLS	LBB0_7

	WORD $0xf100803f // cmp    x1, #32
	BHS	LBB0_3
	WORD $0xaa0003e9 // mov    x9, x0
	JMP	LBB0_6
LBB0_3:
	WORD $0x927be82a // and    x10, x1, #0xffffffffffffffe0
	WORD $0x4e010c40 // dup    v0.16b, w2
	WORD $0x8b0a0009 // add    x9, x0, x10
	WORD $0x9100400b // add    x11, x0, #16
	WORD $0xaa0a03ec // mov    x12, x10
LBB0_4:
	WORD $0xad3f8160 // stp    q0, q0, [x11, #-16]
	WORD $0xf100818c // subs    x12, x12, #32
	WORD $0x9100816b // add    x11, x11, #32
	BNE	LBB0_4
	WORD $0xeb01015f // cmp    x10, x1
	BEQ	LBB0_7
LBB0_6:
	WORD $0x38001522 // strb    w2, [x9], #1
	WORD $0xeb09011f // cmp    x8, x9
	BNE	LBB0_6
LBB0_7:
	WORD $0xa8c17bfd // ldp    x29, x30, [sp], #16
	// Put the stack pointer back where it was 
	ADD $16, RSP
	RET