mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-04-23 13:27:29 -04:00
Fixed g++ newlib, still fixing _start
This commit is contained in:
commit
4049f314b0
11 changed files with 81179 additions and 81461 deletions
|
@ -42,6 +42,7 @@ void vx_resetStack(void);
|
|||
|
||||
#define __endif vx_join();
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
|
||||
#include "vx_io.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void vx_print_hex(unsigned f)
|
||||
{
|
||||
// vx_print_str(hextoa[f]);
|
||||
|
@ -27,4 +31,8 @@ void vx_printf(char * c, unsigned f)
|
|||
vx_print_str(c);
|
||||
vx_print_hex(f);
|
||||
vx_print_str("\n");
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -3,14 +3,13 @@
|
|||
|
||||
#include <stdbool.h>
|
||||
|
||||
static char * hextoa[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
|
||||
void vx_print_hex(unsigned);
|
||||
void vx_printf(char *, unsigned);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
static char * hextoa[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
|
||||
void vx_print_hex(unsigned);
|
||||
void vx_printf(char *, unsigned);
|
||||
|
||||
void vx_print_str(char *);
|
||||
void vx_printc(unsigned, char c);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
COMP = ~/dev/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-g++
|
||||
# CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostdlib
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding
|
||||
CC_FLAGS = -march=rv32im -mabi=ilp32 -O0 -Wl,-Bstatic,-T,linker.ld -ffreestanding -nostartfiles
|
||||
|
||||
DMP = ~/dev/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objdump
|
||||
CPY = ~/dev/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
||||
|
@ -9,8 +9,9 @@ CPY = ~/dev/riscv-gnu-toolchain/drops/bin/riscv32-unknown-elf-objcopy
|
|||
# VX_STR = ../../startup/vx_start.s
|
||||
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c ../../newlib/newlib_notimp.c ../../newlib/newlib.s
|
||||
VX_STR =
|
||||
|
||||
NEWLIB = ../../newlib/newlib.c
|
||||
VX_STR = ../../startup/vx_start.s
|
||||
VX_INT = ../../intrinsics/vx_intrinsics.s
|
||||
VX_IO = ../../io/vx_io.s ../../io/vx_io.c
|
||||
VX_API = ../../vx_api/vx_api.c
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -18,6 +18,9 @@
|
|||
#define FILE_IO_WRITE 0x71000000
|
||||
#define FILE_IO_READ 0x72000000
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*funct_t)(void);
|
||||
|
||||
|
@ -257,3 +260,6 @@ void _link()
|
|||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
|
@ -1,182 +0,0 @@
|
|||
|
||||
|
||||
|
||||
# .type __lttf2, @function
|
||||
# .global __lttf2
|
||||
# __lttf2:
|
||||
# ret
|
||||
|
||||
|
||||
# .type __extenddftf2, @function
|
||||
# .global __extenddftf2
|
||||
# __extenddftf2:
|
||||
# ret
|
||||
|
||||
|
||||
# .type __trunctfdf2, @function
|
||||
# .global __trunctfdf2
|
||||
# __trunctfdf2:
|
||||
# ret
|
||||
|
||||
|
||||
# .type __multf3, @function
|
||||
# .global __multf3
|
||||
# __multf3:
|
||||
# ret
|
||||
|
||||
|
||||
# .type __fixtfsi, @function
|
||||
# .global __fixtfsi
|
||||
# __fixtfsi:
|
||||
# ret
|
||||
|
||||
# .type __floatsitf, @function
|
||||
# .global __floatsitf
|
||||
# __floatsitf:
|
||||
# ret
|
||||
|
||||
# .type __subtf3, @function
|
||||
# .global __subtf3
|
||||
# __subtf3:
|
||||
# ret
|
||||
|
||||
# .type __gttf2, @function
|
||||
# .global __gttf2
|
||||
# __gttf2:
|
||||
# ret
|
||||
|
||||
|
||||
# .type __eqtf2, @function
|
||||
# .global __eqtf2
|
||||
# __eqtf2:
|
||||
# ret
|
||||
|
||||
# .type __netf2, @function
|
||||
# .global __netf2
|
||||
# __netf2:
|
||||
# ret
|
||||
|
||||
# define __udivdi3 __udivsi3
|
||||
# define __umoddi3 __umodsi3
|
||||
# define __divdi3 __divsi3
|
||||
# define __moddi3 __modsi3
|
||||
|
||||
# .type __udivsi3, @function
|
||||
# .global __udivsi3
|
||||
# __udivsi3:
|
||||
# move t0, ra
|
||||
# jal __udivdi3
|
||||
# jr t0
|
||||
|
||||
|
||||
# .type __umodsi3, @function
|
||||
# .global __umodsi3
|
||||
# __umodsi3:
|
||||
# move t0, ra
|
||||
# jal __udivdi3
|
||||
# mv a0, a1
|
||||
# jr t0
|
||||
|
||||
|
||||
|
||||
# .type __divsi3, @function
|
||||
# .global __divsi3
|
||||
# __divsi3:
|
||||
# ret
|
||||
# #endif
|
||||
|
||||
# .type __divdi3, @function
|
||||
# .global __divdi3
|
||||
# __divdi3:
|
||||
# bltz a0, .L10
|
||||
# bltz a1, .L11
|
||||
# /* Since the quotient is positive, fall into __udivdi3. */
|
||||
|
||||
|
||||
# .type __udivdi3, @function
|
||||
# .global __udivdi3
|
||||
# __udivdi3:
|
||||
# mv a2, a1
|
||||
# mv a1, a0
|
||||
# li a0, -1
|
||||
# beqz a2, .L5
|
||||
# li a3, 1
|
||||
# bgeu a2, a1, .L2
|
||||
# .L1:
|
||||
# blez a2, .L2
|
||||
# slli a2, a2, 1
|
||||
# slli a3, a3, 1
|
||||
# bgtu a1, a2, .L1
|
||||
# .L2:
|
||||
# li a0, 0
|
||||
# .L3:
|
||||
# bltu a1, a2, .L4
|
||||
# sub a1, a1, a2
|
||||
# or a0, a0, a3
|
||||
# .L4:
|
||||
# srli a3, a3, 1
|
||||
# srli a2, a2, 1
|
||||
# bnez a3, .L3
|
||||
# .L5:
|
||||
# ret
|
||||
|
||||
# .type __umoddi3, @function
|
||||
# .global __umoddi3
|
||||
# __umoddi3:
|
||||
# move t0, ra
|
||||
# jal __udivdi3
|
||||
# move a0, a1
|
||||
# jr t0
|
||||
|
||||
# .L10:
|
||||
# neg a0, a0
|
||||
# bgez a1, .L12 /* Compute __udivdi3(-a0, a1), then negate the result. */
|
||||
# neg a1, a1
|
||||
# j __udivdi3 /* Compute __udivdi3(-a0, -a1). */
|
||||
# .L11: /* Compute __udivdi3(a0, -a1), then negate the result. */
|
||||
# neg a1, a1
|
||||
# .L12:
|
||||
# move t0, ra
|
||||
# jal __udivdi3
|
||||
# neg a0, a0
|
||||
# jr t0
|
||||
|
||||
|
||||
# .type __moddi3, @function
|
||||
# .global __moddi3
|
||||
# __moddi3:
|
||||
# move t0, ra
|
||||
# bltz a1, .L31
|
||||
# bltz a0, .L32
|
||||
# .L30:
|
||||
# jal __udivdi3 /* The dividend is not negative. */
|
||||
# move a0, a1
|
||||
# jr t0
|
||||
# .L31:
|
||||
# neg a1, a1
|
||||
# bgez a0, .L30
|
||||
# .L32:
|
||||
# neg a0, a0
|
||||
# jal __udivdi3 /* The dividend is hella negative. */
|
||||
# neg a0, a1
|
||||
# jr t0
|
||||
|
||||
# .type __modsi3, @function
|
||||
# .global __modsi3
|
||||
# __modsi3:
|
||||
# move t0, ra
|
||||
# bltz a1, .L34
|
||||
# bltz a0, .L35
|
||||
# .L33:
|
||||
# jal __udivdi3 /* The dividend is not negative. */
|
||||
# move a0, a1
|
||||
# jr t0
|
||||
# .L34:
|
||||
# neg a1, a1
|
||||
# bgez a0, .L30
|
||||
# .L35:
|
||||
# neg a0, a0
|
||||
# jal __udivdi3 /* The dividend is hella negative. */
|
||||
# neg a0, a1
|
||||
# jr t0
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
#include "../intrinsics/vx_intrinsics.h"
|
||||
#include "vx_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
func_t global_function_pointer;
|
||||
|
@ -36,7 +39,9 @@ void vx_spawnWarps(unsigned numWarps, unsigned numThreads, func_t func_ptr, void
|
|||
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
// void vx_cl_spawnWarps(char * args, char * pocl_context, long group_x, long group_y, long group_z)
|
||||
// {
|
||||
// if (group_z != 1)
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
|
||||
#define VX_API_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef void (*func_t)(void *);
|
||||
|
||||
|
@ -15,7 +18,9 @@ void vx_cl_spawnWarps (char * /* args */,
|
|||
long /* group_y */,
|
||||
long /* group_z */);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue