Switching from make to shell script for test building.
This commit is contained in:
parent
7a81a08486
commit
4d59e081b3
|
@ -42,6 +42,7 @@ tmtags
|
|||
|
||||
*.py[co]
|
||||
.coverage
|
||||
*.o
|
||||
|
||||
# ==============================================================================
|
||||
# Logs and dumps
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
BINUTILS=../../../../../third_party/binutils/bin/
|
||||
PPC_AS=$(BINUTILS)/powerpc-none-elf-as
|
||||
PPC_LD=$(BINUTILS)/powerpc-none-elf-ld
|
||||
PPC_OBJDUMP=$(BINUTILS)/powerpc-none-elf-objdump
|
||||
PPC_NM=$(BINUTILS)/powerpc-none-elf-nm
|
||||
|
||||
SRCS=$(wildcard *.s)
|
||||
BINS=$(SRCS:.s=.bin)
|
||||
DISASMS=$(SRCS:.s=.dis)
|
||||
MAPS=$(SRCS:.s=.map)
|
||||
|
||||
%.o: %.s
|
||||
$(PPC_AS) \
|
||||
-a64 \
|
||||
-be \
|
||||
-mregnames \
|
||||
-mpower7 \
|
||||
-maltivec \
|
||||
-mvsx \
|
||||
-mvmx128 \
|
||||
-R \
|
||||
-o $@ \
|
||||
$<
|
||||
|
||||
%.dis: %.o
|
||||
$(PPC_OBJDUMP) --adjust-vma=0x100000 -Mpower7 -Mvmx128 -D -EB $< > $@
|
||||
|
||||
%.bin: %.o
|
||||
$(PPC_LD) \
|
||||
-A powerpc:common64 \
|
||||
-melf64ppc \
|
||||
-EB \
|
||||
-nostdlib \
|
||||
--oformat binary \
|
||||
-Ttext 0x100000 \
|
||||
-e 0x100000 \
|
||||
-o $@ \
|
||||
$<
|
||||
%.map: %.o
|
||||
$(PPC_NM) \
|
||||
--numeric-sort \
|
||||
$< \
|
||||
> $@
|
||||
|
||||
all: $(BINS) $(DISASMS) $(MAPS)
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
instr_add.o: file format elf64-powerpc
|
||||
/cygdrive/d/dev/xenia/src/alloy/frontend/ppc/test/bin//instr_add.o: file format elf64-powerpc
|
||||
|
||||
|
||||
Disassembly of section .text:
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
instr_extrwi.o: file format elf64-powerpc
|
||||
/cygdrive/d/dev/xenia/src/alloy/frontend/ppc/test/bin//instr_extrwi.o: file format elf64-powerpc
|
||||
|
||||
|
||||
Disassembly of section .text:
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
instr_ori.o: file format elf64-powerpc
|
||||
/cygdrive/d/dev/xenia/src/alloy/frontend/ppc/test/bin//instr_ori.o: file format elf64-powerpc
|
||||
|
||||
|
||||
Disassembly of section .text:
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
instr_rlwimi.o: file format elf64-powerpc
|
||||
/cygdrive/d/dev/xenia/src/alloy/frontend/ppc/test/bin//instr_rlwimi.o: file format elf64-powerpc
|
||||
|
||||
|
||||
Disassembly of section .text:
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
instr_subfe.o: file format elf64-powerpc
|
||||
/cygdrive/d/dev/xenia/src/alloy/frontend/ppc/test/bin//instr_subfe.o: file format elf64-powerpc
|
||||
|
||||
|
||||
Disassembly of section .text:
|
Binary file not shown.
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
THIS_SCRIPT_DIR=$( cd "$( dirname "$0" )" && pwd )
|
||||
|
||||
BINUTILS=$THIS_SCRIPT_DIR/../../../../../third_party/binutils/bin/
|
||||
PPC_AS=$BINUTILS/powerpc-none-elf-as
|
||||
PPC_LD=$BINUTILS/powerpc-none-elf-ld
|
||||
PPC_OBJDUMP=$BINUTILS/powerpc-none-elf-objdump
|
||||
PPC_NM=$BINUTILS/powerpc-none-elf-nm
|
||||
|
||||
BIN=$THIS_SCRIPT_DIR/bin/
|
||||
|
||||
if [ -d "$BIN" ]; then
|
||||
rm -f $BIN/*.o
|
||||
rm -f $BIN/*.dis
|
||||
rm -f $BIN/*.bin
|
||||
rm -f $BIN/*.map
|
||||
else
|
||||
mkdir -p $BIN
|
||||
fi
|
||||
|
||||
SRCS=$THIS_SCRIPT_DIR/*.s
|
||||
for SRC in $SRCS
|
||||
do
|
||||
SRC_NAME=$(basename $SRC)
|
||||
OBJ_FILE=$BIN/${SRC_NAME%.*}.o
|
||||
|
||||
$PPC_AS \
|
||||
-a64 \
|
||||
-be \
|
||||
-mregnames \
|
||||
-mpower7 \
|
||||
-maltivec \
|
||||
-mvsx \
|
||||
-mvmx128 \
|
||||
-R \
|
||||
-o $OBJ_FILE \
|
||||
$SRC
|
||||
|
||||
$PPC_OBJDUMP \
|
||||
--adjust-vma=0x100000 \
|
||||
-Mpower7 \
|
||||
-Mvmx128 \
|
||||
-D \
|
||||
-EB \
|
||||
$OBJ_FILE \
|
||||
> $BIN/${SRC_NAME%.*}.dis
|
||||
|
||||
$PPC_LD \
|
||||
-A powerpc:common64 \
|
||||
-melf64ppc \
|
||||
-EB \
|
||||
-nostdlib \
|
||||
--oformat binary \
|
||||
-Ttext 0x100000 \
|
||||
-e 0x100000 \
|
||||
-o $BIN/${SRC_NAME%.*}.bin \
|
||||
$OBJ_FILE
|
||||
|
||||
$PPC_NM \
|
||||
--numeric-sort \
|
||||
$OBJ_FILE \
|
||||
> $BIN/${SRC_NAME%.*}.map
|
||||
|
||||
done
|
|
@ -472,7 +472,7 @@ class TestCommand(Command):
|
|||
print('WARNING: test files not updated!');
|
||||
else:
|
||||
print('Updating test files...')
|
||||
result = shell_call('make -C src/alloy/frontend/ppc/')
|
||||
result = shell_call('./src/alloy/frontend/ppc/test/update.sh')
|
||||
print('')
|
||||
if result != 0:
|
||||
return result
|
||||
|
|
Loading…
Reference in New Issue