~melchizedek6809/WolkenWelten

ref: e910bd82e598d6f560b8899dd1d88fb3ed554cd3 WolkenWelten/common/src/asm/aarch64.s -rw-r--r-- 2.2 KiB
e910bd82Ben (X13/Arch) Updated contact info 11 months ago
                                                                                
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
.text
.global  particlePosUpdateNEON
.type    particlePosUpdateNEON, @function
.global sparticlePosUpdateNEON
.type   sparticlePosUpdateNEON, @function
.global      rainPosUpdateNEON
.type        rainPosUpdateNEON, @function

rainPosUpdateNEON:
  ldr x10,=rainCount
  ldr w9,[x10]
  lsr x9,x9,#1
  add w9,w9,#1

  ldr x10,=rainVel
  ld1 {v4.4s},[x10]

  ldr x10,=glRainDrops
  ldr x11,=rainDrops
.rainPosUpdateLoopNEON:
  ld1 {v0.4s},[x10]
  ld1 {v1.4s},[x11]
  fadd v0.4s,v0.4s,v1.4s
  st1 {v0.4s},[x10],#16
  fadd v1.4s,v1.4s,v4.4s
  st1 {v1.4s},[x11],#16

  ld1 {v2.4s},[x10]
  ld1 {v3.4s},[x11]
  fadd v2.4s,v2.4s,v3.4s
  st1 {v2.4s},[x10],#16
  fadd v3.4s,v3.4s,v4.4s
  st1 {v3.4s},[x11],#16

  subs w9,w9,#1
  bne .rainPosUpdateLoopNEON
  ret

particlePosUpdateNEON:
  ldr x10,=particleCount
  ldr w9,[x10]
  lsr x9,x9,#2
  add w9,w9,#1
  ldr x10,=glParticles
  ldr x11,=particles
.particlePosUpdateLoopNEON:

  ld1 {v0.4s},[x10]
  ld1 {v1.4s},[x11],#16
  fadd v0.4s,v0.4s,v1.4s
  st1 {v0.4s},[x10],#16

  ld1 {v2.4s},[x10]
  ld1 {v3.4s},[x11],#16
  fadd v2.4s,v2.4s,v3.4s
  st1 {v2.4s},[x10],#16

  ld1 {v4.4s},[x10]
  ld1 {v5.4s},[x11],#16
  fadd v4.4s,v4.4s,v5.4s
  st1 {v4.4s},[x10],#16

  ld1 {v6.4s},[x10]
  ld1 {v7.4s},[x11],#16
  fadd v6.4s,v6.4s,v7.4s
  st1 {v6.4s},[x10],#16

  subs w9,w9,#1
  bne .particlePosUpdateLoopNEON
  ret


sparticlePosUpdateNEON:
  ldr x10,=sparticleCount
  ldr w9,[x10]
  lsr x9,x9,#2
  add w9,w9,#1

  ldr x10,=sparticleVV
  ld1 { v8.4s},[x10],#16
  ld1 { v9.4s},[x10],#16
  ld1 {v10.4s},[x10],#16
  ld1 {v11.4s},[x10],#16

  ldr x10,=glSparticles
  ldr x11,=sparticles
.sparticlePosUpdateLoopNEON:

  ld1 {v0.4s},[x10]
  ld1 {v1.4s},[x11]
  fadd v0.4s,v0.4s,v1.4s
  fadd v1.4s,v8.4s,v1.4s
  st1 {v0.4s},[x10],#16
  st1 {v1.4s},[x11],#16

  ld1 {v2.4s},[x10]
  ld1 {v3.4s},[x11]
  fadd v2.4s,v2.4s,v3.4s
  fadd v3.4s,v9.4s,v3.4s
  st1 {v2.4s},[x10],#16
  st1 {v3.4s},[x11],#16

  ld1 {v4.4s},[x10]
  ld1 {v5.4s},[x11]
  fadd v4.4s,v4.4s,v5.4s
  fadd v5.4s,v10.4s,v5.4s
  st1 {v4.4s},[x10],#16
  st1 {v5.4s},[x11],#16

  ld1 {v6.4s},[x10]
  ld1 {v7.4s},[x11]
  fadd v6.4s,v6.4s,v7.4s
  fadd v7.4s,v11.4s,v7.4s
  st1 {v6.4s},[x10],#16
  st1 {v7.4s},[x11],#16

  subs w9,w9,#1
  bne .sparticlePosUpdateLoopNEON
  ret