Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(856)

Unified Diff: fusl/arch/mips/crt_arch.h

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fusl/arch/mips/bits/user.h ('k') | fusl/arch/mips/ksigaction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/arch/mips/crt_arch.h
diff --git a/fusl/arch/mips/crt_arch.h b/fusl/arch/mips/crt_arch.h
new file mode 100644
index 0000000000000000000000000000000000000000..f4ba02aeafc49a190db4e188db5fc77ae06bc373
--- /dev/null
+++ b/fusl/arch/mips/crt_arch.h
@@ -0,0 +1,32 @@
+__asm__(
+".set push\n"
+".set noreorder\n"
+".text \n"
+".global _" START "\n"
+".global " START "\n"
+".global " START "_data\n"
+".type _" START ", @function\n"
+".type " START ", @function\n"
+".type " START "_data, @function\n"
+"_" START ":\n"
+"" START ":\n"
+" bal 1f \n"
+" move $fp, $0 \n"
+"" START "_data: \n"
+" .gpword " START "_data \n"
+" .gpword " START "_c \n"
+".weak _DYNAMIC \n"
+".hidden _DYNAMIC \n"
+" .gpword _DYNAMIC \n"
+"1: lw $gp, 0($ra) \n"
+" subu $gp, $ra, $gp \n"
+" move $4, $sp \n"
+" lw $5, 8($ra) \n"
+" addu $5, $5, $gp \n"
+" lw $25, 4($ra) \n"
+" addu $25, $25, $gp \n"
+" and $sp, $sp, -8 \n"
+" jalr $25 \n"
+" subu $sp, $sp, 16 \n"
+".set pop \n"
+);
« no previous file with comments | « fusl/arch/mips/bits/user.h ('k') | fusl/arch/mips/ksigaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698