Skip to content
Browse files

common: Changes for amd64 host. Switch to clang and freely available …

…version of Modelsim.
  • Loading branch information...
1 parent 648d7fc commit b534510d2e8c9854e29e27e2f8a9c981b6ac9454 @jeuneS2 committed
View
2 Makefile
@@ -1,7 +1,7 @@
PROJECT_DIR=examples/helloworld
PROJECT_NAME=helloworld
-SERDEV=/dev/ttyS0
+SERDEV=/dev/ttyUSB0
FPGACABLE="UsbBlaster ftdi 9fb:6001"
# RAW=RAW
View
1 examples/helloworld/Makefile
@@ -2,7 +2,6 @@ include /usr/local/lemberg/etc/Makefile.rules
CFLAGS=-O3
OPTFLAGS=-O3
-LIBLLSYMS=
LLCFLAGS=-O3 -code-model=small
all: helloworld.bin helloworld.dat
View
4 hw/sim/sim.sh
@@ -1,6 +1,6 @@
#! /bin/sh
-OPTIONS="-93 -quiet +acc +cover=bcesfx -coveropt 1"
+OPTIONS="-93 -quiet"
rm -rf rtl_work
vlib rtl_work
@@ -60,4 +60,4 @@ vcom $OPTIONS gen_utils.vhd
vcom $OPTIONS sim_ssram_512x36.vhd
vcom $OPTIONS cpu_tb.vhd
-vsim -coverage -voptargs="+cover=bcesfx" -i -do sim.do cpu_tb
+vsim -i -do sim.do cpu_tb
View
2 tools/asm/Makefile
@@ -1,4 +1,4 @@
-CFLAGS=-ansi -pedantic -Wall -g -Wno-long-long -D_XOPEN_SOURCE=600
+CFLAGS=-ansi -pedantic -Wall -g -Wno-long-long -D_XOPEN_SOURCE=600 -O2
YFLAGS=-d
LFLAGS=
View
2 tools/etc/Makefile.rules
@@ -9,7 +9,7 @@ LLVM_LD=llvm-ld -b $@ $^ \
-internalize-public-api-list=${LIBLLSYMS},main
%.bc : %.c
- llvm-gcc -U__i386__ -D__lemberg__ ${CFLAGS} --emit-llvm -c -I ${PREFIX}/include -o $@ $<
+ llvm-clang -ccc-host-triple i386-unknown-none -U__i386__ -D__lemberg__ ${CFLAGS} -emit-llvm -c -I ${PREFIX}/include -o $@ $<
%.opt.bc : %.linked.bc
opt -disable-simplify-libcalls ${OPTFLAGS} -o $@ $<
View
2 tools/libc/src/configure_lemberg
@@ -3,6 +3,6 @@
export AR_FOR_TARGET="llvm-ar"
export RANLIB_FOR_TARGET="llvm-ranlib"
export AS_FOR_TARGET="llvm-as"
-export CC_FOR_TARGET="llvm-gcc -emit-llvm -U__i386__ -D__lemberg__"
+export CC_FOR_TARGET="llvm-clang -ccc-host-triple i386-unknown-none -U__i386__ -D__lemberg__ -emit-llvm"
export LD_FOR_TARGET="llvm-ld"
./configure --target=lemberg
View
2 tools/libll/Makefile
@@ -2,7 +2,7 @@ all: libll.a
PREFIX=/usr/local/lemberg
-CC = llvm-gcc -emit-llvm -O3
+CC = llvm-clang -ccc-host-triple i386-unknown-none -U__i386__ -D__lemberg__ -O3 -emit-llvm
AS = llvm-as
OBJS = divsi3.o modsi3.o udivsi3.o umodsi3.o \
View
3 tools/libll/extendsfdf2.c
@@ -38,8 +38,7 @@
//
//===----------------------------------------------------------------------===//
-#include <stdint.h>
-#include <limits.h>
+#include "int_lib.h"
typedef float src_t;
typedef uint32_t src_rep_t;
View
4 tools/libll/fp_lib.h
@@ -21,9 +21,7 @@
#ifndef FP_LIB_HEADER
#define FP_LIB_HEADER
-#include <stdint.h>
-#include <stdbool.h>
-#include <limits.h>
+#include "int_lib.h"
#if defined SINGLE_PRECISION
View
13 tools/libll/int_lib.h
@@ -19,9 +19,18 @@
/* Assumption: signed integral is 2's complement */
/* Assumption: right shift of signed negative is arithmetic shift */
-#include <limits.h>
+#define CHAR_BIT 8
+#define UINT32_C(c) c ## U
+#define UINT64_C(c) c ## ULL
+
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+typedef int bool;
+
#include "endianness.h"
-#include <math.h>
/* If compiling for kernel use, call panic() instead of abort(). */
#ifdef KERNEL_USE
View
2 tools/libll/libllsyms.s
@@ -1,5 +1,5 @@
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-linux-gnu"
+target triple = "i386-unknown-none"
declare i64 @__divdi3(i64 %a, i64 %b) nounwind
declare i64 @__moddi3(i64 %a, i64 %b) nounwind
View
3 tools/libll/modsi3.c
@@ -14,6 +14,9 @@
#include "int_lib.h"
+si_int
+__divsi3(si_int a, si_int b);
+
/* Returns: a % b */
si_int
View
4 tools/libll/truncdfsf2.c
@@ -37,9 +37,7 @@
//
//===----------------------------------------------------------------------===//
-#include <stdint.h>
-#include <limits.h>
-#include <stdbool.h>
+#include "int_lib.h"
typedef double src_t;
typedef uint64_t src_rep_t;

0 comments on commit b534510

Please sign in to comment.
Something went wrong with that request. Please try again.