Skip to content

Instantly share code, notes, and snippets.

@aprell
Created December 17, 2012 14:55
Show Gist options
  • Save aprell/4318861 to your computer and use it in GitHub Desktop.
Save aprell/4318861 to your computer and use it in GitHub Desktop.
MIPS: making sure the stack pointer is double-word aligned
.data
array: .double 1.0 2.0 3.0
.text
.globl main
main:
andi $sp, 0xfffffff8
addi $sp, $sp, -24
l.d $f0, array+0
l.d $f2, array+8
l.d $f4, array+16
s.d $f0, 16($sp)
s.d $f2, 8($sp)
s.d $f4, 0($sp)
li $v0, 10
syscall # exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment