ARM port work

This commit is contained in:
jet 2009-10-29 10:12:30 -06:00
parent c1e16482ba
commit e00fc5d91a
6 changed files with 466 additions and 509 deletions

View File

@ -144,7 +144,7 @@ ifeq ($(arch),arm)
lflags := -L/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/lib -L$(root)/arm/lib $(lflags)
cflags := -I/opt/crosstool/gcc-4.1.0-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include -I$(root)/arm/include $(cflags)
asm = arm
asm = arm
object-arch = arm
object-format = elf32-littlearm
pointer-size = 4

File diff suppressed because it is too large Load Diff

View File

@ -780,6 +780,8 @@ class Context {
case Divide:
if (size == 8) {
return local::getThunk(t, divideLongThunk);
} else if (size == 4) {
return local::getThunk(t, divideIntThunk);
}
break;
@ -1996,6 +1998,12 @@ divideLong(int64_t b, int64_t a)
return a / b;
}
int64_t
divideInt(int32_t b, int32_t a)
{
return a / b;
}
int64_t
moduloLong(int64_t b, int64_t a)
{

View File

@ -24,7 +24,7 @@
#include "unistd.h"
#include "pthread.h"
#include "signal.h"
#include "ucontext.h"
#include "sys/ucontext.h"
#include "stdint.h"
#include "dirent.h"

View File

@ -990,10 +990,7 @@ load(Context* c, unsigned srcSize, int base, int offset, int index,
break;
case 8: {
if (srcSize == 4 and dstSize == 8) {
load(c, 4, base, offset, NoRegister, 1, 4, dst, false, false);
moveRR(c, 4, dst, 8, dst);
} else if (srcSize == 8 and dstSize == 8) {
if (dstSize == 8) {
Assembler::Register dstHigh(dst->high);
load(c, 4, base, offset, NoRegister, 1, 4, &dstHigh, false, false);
load(c, 4, base, offset + 4, NoRegister, 1, 4, dst, false, false);

View File

@ -20,6 +20,7 @@ THUNK(divideFloat)
THUNK(moduloFloat)
THUNK(negateFloat)
THUNK(divideLong)
THUNK(divideInt)
THUNK(moduloLong)
THUNK(floatToDouble)
THUNK(floatToInt)