summaryrefslogtreecommitdiff
path: root/other/shellkit/mips_irix/execvesh.s
diff options
context:
space:
mode:
authorRoot THC2026-02-24 12:42:47 +0000
committerRoot THC2026-02-24 12:42:47 +0000
commitc9cbeced5b3f2bdd7407e29c0811e65954132540 (patch)
treeaefc355416b561111819de159ccbd86c3004cf88 /other/shellkit/mips_irix/execvesh.s
parent073fe4bf9fca6bf40cef2886d75df832ef4b6fca (diff)
initial
Diffstat (limited to 'other/shellkit/mips_irix/execvesh.s')
-rw-r--r--other/shellkit/mips_irix/execvesh.s36
1 files changed, 36 insertions, 0 deletions
diff --git a/other/shellkit/mips_irix/execvesh.s b/other/shellkit/mips_irix/execvesh.s
new file mode 100644
index 0000000..89fd45b
--- /dev/null
+++ b/other/shellkit/mips_irix/execvesh.s
@@ -0,0 +1,36 @@
1/* MIPS/IRIX PIC execve code
2 *
3 * -sc.
4 */
5
6#include <sgidefs.h>
7#include <sys/regdef.h>
8#include <sys/asm.h>
9#include <sys.s>
10#include <sys/syscall.h>
11
12 .section .text
13
14 .globl cbegin
15 .globl cend
16
17cbegin:
18 .set noreorder
19 .set nomacro
20
21 sw zero, -4(sp)
22foo: bltzal zero, foo
23 lw a2, -4(sp)
24
25 addu ra, ra, 0x0124 /* add 36 + 0x0100 */
26
27 add a0, ra, -(8 + 0x100)
28 sb zero, -(1 + 0x100)(ra)
29 sw a0, -8(sp)
30 subu a1, sp, 8
31 li v0, SYS_execve
32 syscall
33
34 .end cbegin
35cend:
36