File: call_apsr.S

package info (click to toggle)
pico-sdk 2.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 26,552 kB
  • sloc: ansic: 146,841; asm: 13,423; python: 2,417; cpp: 2,171; yacc: 381; lex: 270; makefile: 32; sh: 13; javascript: 13
file content (38 lines) | stat: -rw-r--r-- 818 bytes parent folder | download | duplicates (2)
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
//===-- call_apsr.S - Helpers for ARM EABI floating point tests -----------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements helpers for ARM EABI floating point tests for the
// compiler_rt library.
//
//===-

#include "pico/asm_helper.S"

pico_default_asm_setup

.align 2

.global call_apsr_f
.type call_apsr_f,%function
.thumb_func
call_apsr_f:
    push {lr}
    blx r2
    mrs r0, apsr
    pop {pc}

.global call_apsr_d
.type call_apsr_d,%function
.thumb_func
call_apsr_d:
    push {r4, lr}
    ldr r4, [sp, #8]
    blx r4
    mrs r0, apsr
    pop {r4, pc}