Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-12-12 14:16:41 +0300
committerNathan Sidwell <nathan@codesourcery.com>2005-12-12 14:16:41 +0300
commitad83f0cc13928b8d465e7bc39edb28666570dc18 (patch)
tree3cc4fb0ac26e32a66b645e7055890a6640ab5946 /libgloss/mt/trap.S
parent2193d02b4ddfc329e0817258093a40050b2d582a (diff)
Rename ms1 files to mt files (part 1 -- renames only)
Diffstat (limited to 'libgloss/mt/trap.S')
-rw-r--r--libgloss/mt/trap.S34
1 files changed, 34 insertions, 0 deletions
diff --git a/libgloss/mt/trap.S b/libgloss/mt/trap.S
new file mode 100644
index 000000000..9fca7204e
--- /dev/null
+++ b/libgloss/mt/trap.S
@@ -0,0 +1,34 @@
+;;
+;; The errno will be in r5 if r11 is -1.
+;;
+ .text
+ .global __trap0
+__trap0:
+ ;; non-leaf function so need to create stack frame to
+ ;; store ra and fp
+ subi sp, sp, #16
+ stw ra, sp, #12
+ or r0, r0, r0 ;; nop
+ stw fp, sp, #8
+ or fp, sp, sp
+ stw r5, sp, #4
+ or r0, r0, r0 ;; nop
+ stw r6, sp, #0
+ addi r6, r0, #$-1
+ si r14
+ or r0, r0, r0 ;; nop
+ brne r11, r6, .L0
+ ldui r6, #%hi16(errno)
+ addui r6, r6, #%lo16(errno)
+ stw r5, r6, #0
+ or r0, r0, r0 ;; nop
+.L0:
+ ldw r6, sp, #0
+ or r0, r0, r0 ;; nop
+ ldw r5, sp, #4
+ or r0, r0, r0 ;; nop
+ ldw ra, sp, #12
+ or r0, r0, r0 ;; nop
+ ldw fp, sp, #8
+ jal r0, r14
+ addi sp, sp, #16