Skip to content

Instantly share code, notes, and snippets.

diff -ruN gcc-1.27.orig/Makefile gcc-1.27/Makefile
--- gcc-1.27.orig/Makefile 1988-09-01 23:37:53.000000000 +0200
+++ gcc-1.27/Makefile 2019-01-26 18:40:26.378486900 +0100
@@ -19,7 +19,8 @@
#and this notice must be preserved on all copies.
-CFLAGS = -g
+CCLIBFLAGS = -m32
+CFLAGS = -g -m32
;; Zero page variables
sprite_x_idx = $03
sprite_y_idx = $04
sprite_skip_counter = $05
tmp1 = $10
irq_saved_a = $20
irq_saved_x = $21
irq_saved_y = $22
irq_color_addr_lo = $22
irq_color_addr_hi = $23
#include <benchmark/benchmark.h>
unsigned char *init_test_memset(int);
unsigned char *init_test_random(int);
void run_test(unsigned char *, int);
void release_test(unsigned char *);
static void BM_cleared(benchmark::State &state)
{
const int len = state.range(0);
#include <vector>
long run_forloop(std::vector<int> const &vec, long to_find)
{
long len = vec.end() - vec.begin();
const int *p = &vec[0];
long i, acc = 0;
for (i = 0; i < len; i++) {
acc += p[i];
if (to_find < acc)
@kristerw
kristerw / build-gcc-offload-nvptx.sh
Last active May 2, 2023 08:48
Build GCC with support for offloading to NVIDIA GPUs
#!/bin/sh
#
# Build GCC with support for offloading to NVIDIA GPUs.
#
work_dir=$HOME/offload/wrk
install_dir=$HOME/offload/install
# Location of the installed CUDA toolkit