From 8dc1d08d0c3a5abe3856b04a5a864227fe0ba62d Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 2 Feb 2002 19:03:57 +0000 Subject: Add in support for the Hitach H8/300H architecture, contributed by Yoshinori Sato --- libc/sysdeps/linux/h8300/setjmp.S | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 libc/sysdeps/linux/h8300/setjmp.S (limited to 'libc/sysdeps/linux/h8300/setjmp.S') diff --git a/libc/sysdeps/linux/h8300/setjmp.S b/libc/sysdeps/linux/h8300/setjmp.S new file mode 100644 index 000000000..97b91e204 --- /dev/null +++ b/libc/sysdeps/linux/h8300/setjmp.S @@ -0,0 +1,43 @@ +.h8300h +.text + +.global __setjmp +.global _longjmp + +__setjmp: + add.l #20,er0 + mov.l er6,@er0 + mov.l er5,@-er0 + mov.l er4,@-er0 + mov.l er3,@-er0 + mov.l er2,@-er0 + mov.l er1,@-er0 + mov.l sp,@(24,er0) + mov.l @sp,er1 + mov.l er1,@(28,er0) + sub.l er0,er0 + rts + +_longjmp: + mov.l er1,er1 + bne 1f + sub.l er1,er1 + inc.l #1,er1 +1: + adds #4,er0 + adds #4,er0 + mov.l @er0+,er3 + mov.l @er0+,er4 + mov.l @er0+,er5 + mov.l @er0+,er6 + mov.l @er0+,sp + mov.l @er0,er2 + mov.l er2,@sp + mov.l er1,er2 + mov.l er0,er1 + mov.l er2,er0 + sub.l #28,er1 + mov.l @(4,er1),er2 + mov.l @er1,er1 + rts + -- cgit v1.2.3