chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-hackers] apply-hack mipsel32


From: Brad Pitt
Subject: [Chicken-hackers] apply-hack mipsel32
Date: Tue, 02 Apr 2013 20:03:34 +0400

Hello,

I have tested this on my embedded device.
Didnt yet make any performance tests and not sure that this would works on other gcc versions. 

OS: Linux 2.6.19, little endian, 32bits
GCC: (Sourcery G++ Lite 4.3-51) 4.3.2
CPU: MIPS 24Kf

## file configuration.sh ##

make ARCH=mips32 \
PREFIX=/usr \
PLATFORM=linux \
HOSTSYSTEM=mips-linux-gnu \
TARGET_FEATURES="-no-feature x86 -feature mips" \
LINKER_OPTIONS="-EL" \
ASSEMBLER_OPTIONS="-EL"\
DESTDIR=`pwd`/../hacked-target/ \
C_COMPILER_OPTIMIZATION_OPTIONS="-g -EL -fomit-frame-pointer -Wa,-mips32r2 -march=24kf -mtune=24kf" \
install

## file configuration.sh ##

/* file apply-hack.mips32.S */

.text
.align 2
.abicalls
.option pic0
.globl _C_do_apply_hack
.ent _C_do_apply_hack

_C_do_apply_hack:
/*MAGIC: mips-o32 abi prologue */
.set nomips16
.frame $sp,32,$31
.mask 0x80000000,-4
.fmask 0x00000000,0
.set noreorder
.cpload $25
.set nomacro
addiu $sp,$sp,-32
sw $31,28($sp)
.cprestore 16
/*MAGIC: end of magic code */

move $25,$4 /* save proc */
move $sp,$5 /* change stack pointer to buf */
lw $a0,0($sp) /* $a0 = buf[0] */
lw $a1,4($sp) /* $a1 = buf[1] */
lw $a2,8($sp) /* $a2 = buf[2] */
lw $a3,12($sp) /* $a3 = buf[3] */
jalr $25
nop
.end _C_do_apply_hack

/* file apply-hack.mips32.S */


reply via email to

[Prev in Thread] Current Thread [Next in Thread]