Deleted Added
full compact
swtch.S (281494) swtch.S (285271)
1/*-
2 * Copyright (c) 2014 Andrew Turner
3 * Copyright (c) 2014 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * This software was developed by Andrew Turner under sponsorship from
7 * the FreeBSD Foundation.
8 *

--- 19 unchanged lines hidden (view full) ---

28 * SUCH DAMAGE.
29 *
30 */
31
32#include "assym.s"
33
34#include <machine/asm.h>
35
1/*-
2 * Copyright (c) 2014 Andrew Turner
3 * Copyright (c) 2014 The FreeBSD Foundation
4 * All rights reserved.
5 *
6 * This software was developed by Andrew Turner under sponsorship from
7 * the FreeBSD Foundation.
8 *

--- 19 unchanged lines hidden (view full) ---

28 * SUCH DAMAGE.
29 *
30 */
31
32#include "assym.s"
33
34#include <machine/asm.h>
35
36__FBSDID("$FreeBSD: head/sys/arm64/arm64/swtch.S 281494 2015-04-13 14:43:10Z andrew $");
36__FBSDID("$FreeBSD: head/sys/arm64/arm64/swtch.S 285271 2015-07-08 14:07:06Z andrew $");
37
38/*
39 * void cpu_throw(struct thread *old, struct thread *new)
40 */
41ENTRY(cpu_throw)
42#ifdef SMP
43#error cpu_throw needs to be ported to support SMP
44#endif

--- 196 unchanged lines hidden (view full) ---

241 * No need for interrupts reenabling since PSR
242 * will be set to the desired value anyway.
243 */
244 eret
245
246END(fork_trampoline)
247
248ENTRY(savectx)
37
38/*
39 * void cpu_throw(struct thread *old, struct thread *new)
40 */
41ENTRY(cpu_throw)
42#ifdef SMP
43#error cpu_throw needs to be ported to support SMP
44#endif

--- 196 unchanged lines hidden (view full) ---

241 * No need for interrupts reenabling since PSR
242 * will be set to the desired value anyway.
243 */
244 eret
245
246END(fork_trampoline)
247
248ENTRY(savectx)
249 adr x0, .Lsavectx_panic_str
250 bl panic
249 /* Store the callee-saved registers */
250 stp x8, x9, [x0, #PCB_REGS + 8 * 8]
251 stp x10, x11, [x0, #PCB_REGS + 10 * 8]
252 stp x12, x13, [x0, #PCB_REGS + 12 * 8]
253 stp x14, x15, [x0, #PCB_REGS + 14 * 8]
254 stp x16, x17, [x0, #PCB_REGS + 16 * 8]
255 stp x18, x19, [x0, #PCB_REGS + 18 * 8]
256 stp x20, x21, [x0, #PCB_REGS + 20 * 8]
257 stp x22, x23, [x0, #PCB_REGS + 22 * 8]
258 stp x24, x25, [x0, #PCB_REGS + 24 * 8]
259 stp x26, x27, [x0, #PCB_REGS + 26 * 8]
260 stp x28, x29, [x0, #PCB_REGS + 28 * 8]
261 str x30, [x0, #PCB_REGS + 30 * 8]
262 /* And the old stack pointer */
263 mov x5, sp
264 mrs x6, tpidr_el0
265 stp x5, x6, [x0, #PCB_SP]
266
267 /* Store the VFP registers */
268#ifdef VFP
269 mov x29, lr
270 bl vfp_save_state
271 mov lr, x29
272#endif
273
251 ret
274 ret
252.Lsavectx_panic_str:
253 .asciz "savectx"
254END(savectx)
255
275END(savectx)
276