History

Implement alloca for RV64

Aleksi Hannula committed 11 months ago

Commit 3c631fd1 parent e7be7b12 files · +19 −5Browse files

Showing the changes to lib (2 of 2 files). Show all

Unified · Split

2 files
  1. lib/Makefile +5 −5
  2. lib/alloca.S +14 −0
lib/Makefile+5−5
@@ -35,12 +35,12 @@ endif · 34 unmodified lines
35 35
36XFLAGS += -I$(TOP)36XFLAGS += -I$(TOP)
37 37
38I386_O = libtcc1.o alloca.o alloca-bt.o $(COMMON_O)38I386_O = libtcc1.o alloca-bt.o $(COMMON_O)
39X86_64_O = libtcc1.o alloca.o alloca-bt.o $(COMMON_O)39X86_64_O = libtcc1.o alloca-bt.o $(COMMON_O)
40ARM_O = libtcc1.o armeabi.o alloca.o armflush.o $(COMMON_O)40ARM_O = libtcc1.o armeabi.o armflush.o $(COMMON_O)
41ARM64_O = lib-arm64.o alloca.o $(COMMON_O)41ARM64_O = lib-arm64.o $(COMMON_O)
42RISCV64_O = lib-arm64.o $(COMMON_O)42RISCV64_O = lib-arm64.o $(COMMON_O)
43COMMON_O = stdatomic.o atomic.o builtin.o43COMMON_O = stdatomic.o atomic.o builtin.o alloca.o
44WIN_O = crt1.o crt1w.o wincrt1.o wincrt1w.o dllcrt1.o dllmain.o44WIN_O = crt1.o crt1w.o wincrt1.o wincrt1w.o dllcrt1.o dllmain.o
45LIN_O = dsohandle.o45LIN_O = dsohandle.o
46OSX_O =46OSX_O =
lib/alloca.S+14−0
@@ -142,4 +142,18 @@ p100: · 141 unmodified lines
142#endif142#endif
143 .size alloca, .-alloca143 .size alloca, .-alloca
144/* ---------------------------------------------- */144/* ---------------------------------------------- */
145#elif defined __riscv
146
147 .text
148 .align 2
149 .global alloca
150 .type alloca, %function
151alloca:
152 sub sp, sp, a0
153 addi sp, sp, -15
154 andi sp, sp, -16
155 add a0, sp, zero
156 ret
157 .size alloca, .-alloca
158/* ---------------------------------------------- */
145#endif159#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t