Compare commits

..

3 Commits

Author SHA1 Message Date
b0e4ec52da „.gitignore“ ändern 2023-10-15 16:48:41 +00:00
nplk84
f3804334d9 deleated some shit 2023-10-15 18:46:22 +02:00
nplk84
c53c58fb5c Branch fuer aufgebe 1 2023-10-12 12:17:54 +02:00
118 changed files with 4140 additions and 3906 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,2 @@
.idea
cmake-build-debug
njvm
njvm.dSYM
njvm.exe
njvm2

View File

@@ -2,8 +2,11 @@ cmake_minimum_required(VERSION 3.0)
project(ninja LANGUAGES C)
set(CMAKE_C_STANDARD 99)
add_compile_options(-g -Wall -pedantic)
add_executable(ninja njvm.c
SDA.c)
set(PROJECT_VERSION 0)
configure_file(
${CMAKE_SOURCE_DIR}/config.h.in
${CMAKE_BINARY_DIR}/config.h
)
include_directories(${CMAKE_BINARY_DIR})
add_executable(ninja
njvm.c config.h.in)

View File

@@ -1,43 +0,0 @@
# Makefile for a simple C program
# Compiler
CC = gcc
# program to Run
F = prog.bin
# Compiler flags
CFLAGS = -g -Wall -Ibigint/build/include
LDFLAGS = -g -Wall -Lbigint/build/lib
# Source file
SRC = njvm.c
# Executable name
TARGET = njvm
njvm.o:
$(CC) $(CFLAGS) -o njvm.o -c njvm.c
support.o:
$(CC) $(CFLAGS) -o support.o -c support.c
# Default target
all: njvm.o support.o
$(CC) $(LDFLAGS) -o $(TARGET) njvm.o support.o -lbigint
# Clean up
clean:
rm -f $(OBJ) $(TARGET)
debug: all
./$(TARGET) --debug $(F)
run: all
./$(TARGET) $(F)
nja: ./nja/nja$(V)
./nja/nja$(V) $(IN) $(OUT)
njc: ./njc/njc$(V)
./njc/njc$(V) $(IN) $(OUT)

27
SDA.c
View File

@@ -1,27 +0,0 @@
//
// Created by Nils on 03.12.2023
//
#ifndef SDA
#define SDA
#include <stdio.h>
#include "stackslot.c"
struct sda {
int *size;
ObjRef *sda;
};
ObjRef getSDA(int i, struct sda s) {
return s.sda[i];
}
void setSDA(int point, ObjRef val, struct sda s) {
s.sda[point] = val;
}
void printSDA(struct sda s) {
for (int i = 0; i < *s.size; i++) {
printf("%i\n", *(int *)getSDA(i, s)->data);
}
}
#endif

BIN
a.out

Binary file not shown.

View File

@@ -1,22 +0,0 @@
#
# Makefile for big integer library and test
#
DIRS = src tst
all:
for i in $(DIRS) ; do \
$(MAKE) -C $$i install ; \
done
clean:
for i in $(DIRS) ; do \
$(MAKE) -C $$i clean ; \
done
rm -rf ./build
rm -f *~
dist: clean
(cd .. ; \
tar -cvf bigint.tar bigint ; \
gzip -f bigint.tar)

View File

@@ -1,92 +0,0 @@
The "bigint" Package
====================
1. What is it?
--------------
This package implements a multiple-precision integer arithmetic package,
i.e., a collection of functions which can calculate with integers having
arbitrarily many digits. The algorithms are taken from [D. Knuth: The
Art of Computer Programming, Vol. 2, Seminumerical Algorithms], the
implementation language is C.
2. "Multiple Precision" - how does it work?
-------------------------------------------
Each integer number is represented as an array of digits. The array
is large enough to hold the number of digits necessary to represent
the number. Each digit occupies a single byte, so the number base of
this representation is 256. Addition, subtraction, and multiplication
work as we all have learned it: perform the desired operation digit
by digit, starting from the least significant digit, and observing
any "carries" from one place to the next higher one. Division is a
little bit more complicated because there is a certain amount of
guesswork involved. Knuth gives a formal treatment of this guesswork.
3. How do I use it?
-------------------
Because every big integer may have a differently sized array to hold
its digits, these structures are dynamically allocated on the heap of
the C runtime system, and accessed by pointers. If you want to perform
an arithmetic operation on one or two big integers, you have to load
the corresponding pointers into a structure called BIP ("Big Integer
Processor"), and call the arithmetic function. When the function has
returned, the pointer to the result of the operation can be found in
another component of the BIP. The following functions are available:
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer */
Some of these functions accept or return ordinary integers. For the
exact definition of each function's interface, please see the comments
in the function's source.
4. What else is needed?
-----------------------
The library tries to detect fatal errors in using its functions (e.g.,
null pointers to operands) as well as internal errors (which "cannot
happen"). In either case a user-supplied error routine is called, which
is supposed to print an error message and then to terminate the program.
The library does not attempt to manage memory. For this purpose, it
relies on a user-supplied function "void* newPrimObject(int dataSize)",
which should allocate sufficiently many bytes and return a pointer to
a created object. In addition, the library needs to access a data field
- that implements the size-as-needed cocept - within the created object,
to actualy manage the data structures that represent the values of the
integer number. For this, the following function can be used:
void * getPrimObjectDataPointer(void * obj){
ObjRef oo = ((ObjRef) (obj));
return oo->data;
}
This function must also be a user-supplied function that must be
implemented by the program that wants to use this library.
For details about these three user-supplied functions take a look in
the file "support.c" in the directory "tst".
5. What is in the directory "tst"?
----------------------------------
Well, you may have guessed it already: these are test cases for the
library. You can learn how to link against the library by inspecting
the "Makefile" for the tests, and you can find a simple implementation
of the support library.

Binary file not shown.

View File

@@ -1,60 +0,0 @@
/*
* bigint.h -- big integer library
*/
#ifndef _BIGINT_H_
#define _BIGINT_H_
/* object representation */
typedef void* BigObjRef;
#include <stdio.h>
typedef struct {
int nd; /* number of digits; array may be bigger */
/* nd = 0 exactly when number = 0 */
unsigned char sign; /* one of BIG_NEGATIVE or BIG_POSITIVE */
/* zero always has BIG_POSITIVE here */
unsigned char digits[1]; /* the digits proper; number base is 256 */
/* LS digit first; MS digit is not zero */
} Big;
#include "support.h"
/* big integer processor registers */
typedef struct {
BigObjRef op1; /* first (or single) operand */
BigObjRef op2; /* second operand (if present) */
BigObjRef res; /* result of operation */
BigObjRef rem; /* remainder in case of division */
} BIP;
extern BIP bip; /* registers of the processor */
/* big integer processor functions */
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer object */
#endif /* _BIGINT_H_ */

View File

@@ -1,15 +0,0 @@
/*
* support.h -- object representation and support functions
*/
#ifndef _SUPPORT_H_
#define _SUPPORT_H_
/* support functions */
void fatalError(char *msg); /* print a message and exit */
void * newPrimObject(int dataSize); /* create a new primitive object */
void * getPrimObjectDataPointer(void * primObject);
#endif /* _SUPPORT_H_ */

Binary file not shown.

View File

@@ -1,26 +0,0 @@
#
# Makefile for big integer library
#
BUILD = ../build
CC = gcc
CFLAGS = -g -Wall
all: support.h bigint.h libbigint.a
install: all
mkdir -p $(BUILD)/include
cp support.h $(BUILD)/include
cp bigint.h $(BUILD)/include
mkdir -p $(BUILD)/lib
cp libbigint.a $(BUILD)/lib
libbigint.a: bigint.o
ar -crs libbigint.a bigint.o
bigint.o: bigint.c bigint.h support.h
$(CC) $(CFLAGS) -o bigint.o -c bigint.c
clean:
rm -f *~ bigint.o libbigint.a

View File

@@ -1,987 +0,0 @@
/*
* bigint.c -- big integer library
*/
#include <stdio.h>
#include <ctype.h>
#include "bigint.h"
/**************************************************************/
/* debugging */
#define DIV_CHK_01 0
#define DIV_CHK_02 0
#define DIV_CHK_03 0
#define DIV_CHK_04 0
#define DIV_CHK_05 0
#define DIV_CHK_06 0
#define DIV_CHK_07 0
#define DIV_CHK_08 0
#define DIV_CHK_09 0
#define DIV_CHK_10 0
#define DIV_CHK_11 0
/**************************************************************/
/* big integer representation */
#define BIG_NEGATIVE ((unsigned char) 0)
#define BIG_POSITIVE ((unsigned char) 1)
#define BIG_PTR(bigObjRef) ((Big *) (getPrimObjectDataPointer(bigObjRef)))
#define GET_ND(bigObjRef) (BIG_PTR(bigObjRef)->nd)
#define SET_ND(bigObjRef, val) (BIG_PTR(bigObjRef)->nd = (val))
#define GET_SIGN(bigObjRef) (BIG_PTR(bigObjRef)->sign)
#define SET_SIGN(bigObjRef, val) (BIG_PTR(bigObjRef)->sign = (val))
#define GET_DIGIT(bigObjRef, i) (BIG_PTR(bigObjRef)->digits[i])
#define SET_DIGIT(bigObjRef, i, val) (BIG_PTR(bigObjRef)->digits[i] = (val))
/**************************************************************/
/* global data */
/*
* registers of the big integer processor
*/
BIP bip = {
NULL, /* op1 */
NULL, /* op2 */
NULL, /* res */
NULL, /* rem */
};
/**************************************************************/
/*
* construct a new big integer object
*
* number of digits is given by parameter
* a reference to a proper object is returned
* but no component of the big integer is set
*
* ATTENTION: All object references stored in
* places other than the bip registers may become
* invalid as soon as this function is called!
*/
static BigObjRef newBig(int nd) {
int dataSize;
BigObjRef bigObjRef;
dataSize = sizeof(int) + 1 + nd;
bigObjRef = newPrimObject(dataSize);
return bigObjRef;
}
/**************************************************************/
/* big integer unsigned arithmetic */
/*
* exchange bip.op1 and bip.op2
*/
static void bigXchg(void) {
BigObjRef tmp;
tmp = bip.op1;
bip.op1 = bip.op2;
bip.op2 = tmp;
}
/*
* big integer unsigned comparison
*
* operands in bip.op1 and bip.op2
* result is < 0, = 0, or > 0 if and only if the
* same relation holds for bip.op1 and bip.op2
*/
static int bigUcmp(void) {
int nd1;
int nd2;
int diff;
/* compare sizes */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 != nd2) {
/* sizes are different: we know the bigger number */
return nd1 - nd2;
}
/* sizes are equal: we must look at the digits */
while (nd1--) {
diff = (int) GET_DIGIT(bip.op1, nd1) -
(int) GET_DIGIT(bip.op2, nd1);
if (diff != 0) {
return diff;
}
}
/* the numbers are equal */
return 0;
}
/*
* big integer unsigned addition
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
static void bigUadd(void) {
int nd1;
int nd2;
int i;
unsigned short carry;
unsigned short aux;
int xchgFlag;
/* make sure op1 has at least as many digits as op2 */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 < nd2) {
/* exchange operands */
bigXchg();
i = nd1;
nd1 = nd2;
nd2 = i;
xchgFlag = 1;
} else {
/* don't exchange operands */
xchgFlag = 0;
}
/* allocate result */
bip.res = newBig(nd1 + 1);
/* copy op2 to result */
for (i = 0; i < nd2; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op2, i));
}
/* fill result with 0 up to size of op1 */
for (; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 + res */
carry = 0x00;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) +
(unsigned short) GET_DIGIT(bip.res, i) +
carry;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.res, i, carry);
/* determine actual size of result */
i = nd1 + 1;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
/* restore operands */
if (xchgFlag) {
bigXchg();
}
}
/*
* big integer unsigned subtraction
*
* operands in bip.op1 and bip.op2
* result in bip.res, must not be negative
*/
static void bigUsub(void) {
int nd1;
int nd2;
int i;
unsigned short carry;
unsigned short aux;
/* op1 must have at least as many digits as op2 */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
if (nd1 < nd2) {
/* unsigned subtraction would yield negative result */
fatalError("internal library error #1 - THIS SHOULD NEVER HAPPEN!");
}
/* allocate result */
bip.res = newBig(nd1);
/* copy op2 to result */
for (i = 0; i < nd2; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op2, i));
}
/* fill result with 0 up to size of op1 */
for (; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 - res */
carry = 0x01;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) -
(unsigned short) GET_DIGIT(bip.res, i) +
carry + 0xFF;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
if (carry != 0x01) {
/* unsigned subtraction would yield negative result */
fatalError("internal library error #2 - THIS SHOULD NEVER HAPPEN!");
}
/* determine actual size of result */
i = nd1;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* big integer unsigned multiplication
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
static void bigUmul(void) {
int nd1;
int nd2;
int i, j, k;
unsigned short carry;
unsigned short aux;
/* get sizes of operands */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
/* allocate result */
bip.res = newBig(nd1 + nd2);
/* reset lower nd1 digits of result */
for (i = 0; i < nd1; i++) {
SET_DIGIT(bip.res, i, 0);
}
/* res = op1 * op2 */
for (j = 0; j < nd2; j++) {
carry = 0x00;
for (k = j, i = 0; i < nd1; k++, i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) *
(unsigned short) GET_DIGIT(bip.op2, j) +
(unsigned short) GET_DIGIT(bip.res, k) +
carry;
SET_DIGIT(bip.res, k, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.res, k, carry);
}
/* determine actual size of result */
i = nd1 + nd2;
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* big integer unsigned division by single digit divisor
*
* dividend in bip.rem, divisor in parameter
* quotient in bip.rem, remainder is returned
*/
static unsigned char bigUdiv1(unsigned char divisor) {
BigObjRef tmp;
int nd;
int i;
unsigned short d, r;
unsigned short aux;
/* get size of dividend */
nd = GET_ND(bip.rem);
/* check for division by zero */
d = (unsigned short) divisor;
if (d == 0) {
fatalError("internal library error #3 - THIS SHOULD NEVER HAPPEN!");
}
/* allocate result */
tmp = newBig(nd);
/* tmp = dividend / divisor, r = dividend % divisor */
r = 0;
for (i = nd - 1; i >= 0; i--) {
aux = (r << 8) | (unsigned short) GET_DIGIT(bip.rem, i);
SET_DIGIT(tmp, i, aux / d);
r = aux % d;
}
/* determine actual size of quotient */
i = nd;
while (--i >= 0 && GET_DIGIT(tmp, i) == 0) ;
SET_ND(tmp, i + 1);
/* store quotient */
bip.rem = tmp;
/* return remainder */
return (unsigned char) r;
}
/*
* big integer unsigned division
*
* dividend in bip.op1, divisor in bip.op2
* quotient in bip.res, remainder in bip.rem
*/
static void bigUdiv(void) {
BigObjRef tmp;
int nd1;
int nd2;
int nd3;
int i, j, k, l;
unsigned char r;
unsigned short scale;
unsigned short carry;
unsigned short aux;
unsigned short qhat;
unsigned short v1, v2;
unsigned short uj0, uj1, uj2, two;
/* get sizes of operands */
nd1 = GET_ND(bip.op1);
nd2 = GET_ND(bip.op2);
/* check for division by zero */
if (nd2 == 0) {
fatalError("division by zero");
}
/* check for small dividend */
if (bigUcmp() < 0) {
/* res = 0 */
bip.res = newBig(0);
SET_ND(bip.res, 0);
/* rem = op1; BUT THIS HAS TO BE A COPY! */
bip.rem = newBig(nd1);
for (i = 0; i < nd1; i++) {
SET_DIGIT(bip.rem, i, GET_DIGIT(bip.op1, i));
}
SET_ND(bip.rem, nd1);
return;
}
/* check for single digit divisor */
if (nd2 == 1) {
/* yes - use simple division by single digit divisor */
bip.rem = bip.op1;
r = bigUdiv1(GET_DIGIT(bip.op2, 0));
bip.res = bip.rem;
if (r == 0) {
bip.rem = newBig(0);
SET_ND(bip.rem, 0);
} else {
bip.rem = newBig(1);
SET_ND(bip.rem, 1);
SET_DIGIT(bip.rem, 0, r);
}
return;
}
/*
* now for the general case
*/
#if DIV_CHK_01
printf("div_chk #01: division, general case\n");
printf(" dividend = ");
bigDump(stdout, bip.op1);
printf("\n");
printf(" divisor = ");
bigDump(stdout, bip.op2);
printf("\n");
#endif
/* determine scale factor for normalization */
scale = (unsigned short) 256 /
((unsigned short) GET_DIGIT(bip.op2, nd2 - 1) + 1);
#if DIV_CHK_02
printf("div_chk #02: scale factor = %02X\n", scale);
#endif
/* normalize dividend, result is in bip.rem */
bip.rem = newBig(nd1 + 1);
carry = 0x00;
for (i = 0; i < nd1; i++) {
aux = (unsigned short) GET_DIGIT(bip.op1, i) * scale +
carry;
SET_DIGIT(bip.rem, i, aux & 0xFF);
carry = aux >> 8;
}
SET_DIGIT(bip.rem, i, carry);
SET_ND(bip.rem, nd1 + 1);
#if DIV_CHK_03
printf("div_chk #03: normalized dividend = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
/* normalize divisor, result is in bip.res */
bip.res = newBig(nd2);
carry = 0x00;
for (i = 0; i < nd2; i++) {
aux = (unsigned short) GET_DIGIT(bip.op2, i) * scale +
carry;
SET_DIGIT(bip.res, i, aux & 0xFF);
carry = aux >> 8;
}
if (carry != 0x00) {
/* overflow in divisor normalization */
fatalError("internal library error #4 - THIS SHOULD NEVER HAPPEN!");
}
SET_ND(bip.res, nd2);
#if DIV_CHK_04
printf("div_chk #04: normalized divisor = ");
bigDump(stdout, bip.res);
printf("\n");
#endif
/* allocate quotient */
nd3 = nd1 - nd2 + 1;
tmp = newBig(nd3);
/* extract the two most significand digits of divisor */
v1 = (unsigned short) GET_DIGIT(bip.res, nd2 - 1);
v2 = (unsigned short) GET_DIGIT(bip.res, nd2 - 2);
/* loop on digits of dividend and compute digits of quotient */
/* j is index into dividend, k is index into quotient */
for (j = nd1, k = nd3 - 1; k >= 0; j--, k--) {
#if DIV_CHK_05
printf("div_chk #05: j = %d, k = %d\n", j, k);
#endif
/* calculate qhat */
uj0 = (unsigned short) GET_DIGIT(bip.rem, j);
uj1 = (unsigned short) GET_DIGIT(bip.rem, j - 1);
uj2 = (unsigned short) GET_DIGIT(bip.rem, j - 2);
two = (uj0 << 8) | uj1;
if (uj0 == v1) {
qhat = (unsigned short) 255;
#if DIV_CHK_06
printf("div_chk #06a: qhat = %02X\n", qhat);
#endif
} else {
qhat = two / v1;
#if DIV_CHK_06
printf("div_chk #06b: qhat = %02X\n", qhat);
#endif
}
while (qhat * v2 > (((two - qhat * v1) << 8) | uj2)) {
qhat--;
#if DIV_CHK_07
printf("div_chk #07: qhat decremented, is now %02X\n", qhat);
#endif
}
/* multiply and subtract */
/* l is index into dividend, i is index into divisor */
carry = 0xFF;
for (l = j - nd2, i = 0; i < nd2; l++, i++) {
aux = (unsigned short) GET_DIGIT(bip.rem, l) -
(unsigned short) GET_DIGIT(bip.res, i) * qhat +
carry + 0xFE01;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
}
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
carry + 0xFE01;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
#if DIV_CHK_08
printf("div_chk #08: remainder = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
/* test remainder and possibly add back */
if (carry != 0xFF) {
/* qhat is one too large */
qhat--;
#if DIV_CHK_09
printf("div_chk #09: qhat final correction, is now %02X\n", qhat);
#endif
/* add back */
/* l is index into dividend, i is index into divisor */
carry = 0x00;
for (l = j - nd2, i = 0; i < nd2; l++, i++) {
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
(unsigned short) GET_DIGIT(bip.res, i) +
carry;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
}
aux = (unsigned short) GET_DIGIT(bip.rem, l) +
carry;
SET_DIGIT(bip.rem, l, aux & 0xFF);
carry = aux >> 8;
if (carry != 0x01) {
/* missing carry in add-back sum */
fatalError("internal library error #5 - THIS SHOULD NEVER HAPPEN!");
}
#if DIV_CHK_10
printf("div_chk #10: remainder = ");
bigDump(stdout, bip.rem);
printf("\n");
#endif
}
/* store quotient digit */
SET_DIGIT(tmp, k, qhat);
#if DIV_CHK_11
printf("div_chk #11: quotient digit = %02X\n", qhat);
#endif
}
/* finish quotient */
i = nd3;
while (--i >= 0 && GET_DIGIT(tmp, i) == 0) ;
SET_ND(tmp, i + 1);
bip.res = tmp;
/* finish and unnormalize remainder */
i = nd1 + 1;
while (--i >= 0 && GET_DIGIT(bip.rem, i) == 0) ;
SET_ND(bip.rem, i + 1);
r = bigUdiv1(scale);
if (r != 0) {
/* non-zero remainder in unnormalization */
fatalError("internal library error #6 - THIS SHOULD NEVER HAPPEN!");
}
}
/**************************************************************/
/* nil reference exception */
static void nilRefException(void) {
fatalError("big integer library detected illegal nil reference");
}
/**************************************************************/
/* big integer arithmetic */
/*
* big integer sign
*
* operand in bip.op1
* result is < 0, = 0, or > 0 if and only if
* the same relation holds for bip.op1
*/
int bigSgn(void) {
if (bip.op1 == NULL) {
nilRefException();
}
if (GET_ND(bip.op1) == 0) {
return 0;
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
return 1;
} else {
return -1;
}
}
/*
* big integer comparison
*
* operands in bip.op1 and bip.op2
* result is < 0, = 0, or > 0 if and only if the
* same relation holds for bip.op1 and bip.op2
*/
int bigCmp(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
return bigUcmp();
} else {
/* op1 >= 0 and op2 < 0 */
return 1;
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
return -1;
} else {
/* op1 < 0 and op2 < 0 */
return -bigUcmp();
}
}
}
/*
* big integer negation
*
* operand in bip.op1
* result in bip.res
*/
void bigNeg(void) {
int nd;
int i;
if (bip.op1 == NULL) {
nilRefException();
}
/* make copy of operand */
nd = GET_ND(bip.op1);
bip.res = newBig(nd);
for (i = 0; i < nd; i++) {
SET_DIGIT(bip.res, i, GET_DIGIT(bip.op1, i));
}
SET_ND(bip.res, nd);
/* store inverted sign */
if (GET_SIGN(bip.op1) == BIG_NEGATIVE || nd == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* big integer addition
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigAdd(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
bigUadd();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* op1 >= 0 and op2 < 0 */
if (bigUcmp() >= 0) {
/* |op1| >= |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* |op1| < |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
bigXchg();
}
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
if (bigUcmp() <= 0) {
/* |op1| <= |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
bigXchg();
} else {
/* |op1| > |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
} else {
/* op1 < 0 and op2 < 0 */
bigUadd();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
}
/*
* big integer subtraction
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigSub(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE) {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 >= 0 and op2 >= 0 */
if (bigUcmp() >= 0) {
/* |op1| >= |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
/* |op1| < |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
bigXchg();
}
} else {
/* op1 >= 0 and op2 < 0 */
bigUadd();
SET_SIGN(bip.res, BIG_POSITIVE);
}
} else {
if (GET_SIGN(bip.op2) == BIG_POSITIVE) {
/* op1 < 0 and op2 >= 0 */
bigUadd();
SET_SIGN(bip.res, BIG_NEGATIVE);
} else {
/* op1 < 0 and op2 < 0 */
if (bigUcmp() <= 0) {
/* |op1| <= |op2| */
bigXchg();
bigUsub();
SET_SIGN(bip.res, BIG_POSITIVE);
bigXchg();
} else {
/* |op1| > |op2| */
bigUsub();
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
}
}
/*
* big integer multiplication
*
* operands in bip.op1 and bip.op2
* result in bip.res
*/
void bigMul(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
bigUmul();
if (GET_SIGN(bip.op1) == GET_SIGN(bip.op2) || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* big integer division, truncating towards zero
*
* dividend in bip.op1, divisor in bip.op2
* quotient in bip.res, remainder in bip.rem
*/
void bigDiv(void) {
if (bip.op1 == NULL ||
bip.op2 == NULL) {
nilRefException();
}
bigUdiv();
if (GET_SIGN(bip.op1) == GET_SIGN(bip.op2) || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
if (GET_SIGN(bip.op1) == BIG_POSITIVE || GET_ND(bip.rem) == 0) {
SET_SIGN(bip.rem, BIG_POSITIVE);
} else {
SET_SIGN(bip.rem, BIG_NEGATIVE);
}
}
/**************************************************************/
/* big integer conversions */
/*
* conversion int --> big
*
* operand in parameter
* result in bip.res
*/
void bigFromInt(int n) {
int i;
bip.res = newBig(sizeof(int));
if (n < 0) {
n = -n;
SET_SIGN(bip.res, BIG_NEGATIVE);
} else {
SET_SIGN(bip.res, BIG_POSITIVE);
}
for (i = 0; i < sizeof(int); i++) {
SET_DIGIT(bip.res, i, n & 0xFF);
n >>= 8;
}
while (--i >= 0 && GET_DIGIT(bip.res, i) == 0) ;
SET_ND(bip.res, i + 1);
}
/*
* conversion big --> int
*
* operand in bip.op1
* result is returned
*/
int bigToInt(void) {
int nd;
int i;
int res;
if (bip.op1 == NULL) {
nilRefException();
}
nd = GET_ND(bip.op1);
if (nd > 4 ||
(nd == 4 && GET_DIGIT(bip.op1, 3) >= 0x80)) {
fatalError("big integer too big for conversion to int");
}
res = 0;
for (i = nd - 1; i >= 0; i--) {
res <<= 8;
res |= (unsigned int) GET_DIGIT(bip.op1, i);
}
if (GET_SIGN(bip.op1) == BIG_NEGATIVE) {
res = -res;
}
return res;
}
/**************************************************************/
/* big integer I/O */
/*
* read a big integer
*
* stream to read from in parameter
* result in bip.res
*/
void bigRead(FILE *in) {
int c;
int positive;
c = fgetc(in);
while (isspace(c)) {
c = fgetc(in);
}
if (c == '-') {
positive = 0;
c = fgetc(in);
} else {
positive = 1;
if (c == '+') {
c = fgetc(in);
}
}
if (!isdigit(c)) {
fatalError("no digits in input");
}
bigFromInt(10);
bip.rem = bip.res;
bigFromInt(0);
while (isdigit(c)) {
bip.op1 = bip.res;
bip.op2 = bip.rem;
bigUmul();
bip.op1 = bip.res;
bigFromInt(c - '0');
bip.op2 = bip.res;
bigUadd();
c = fgetc(in);
}
ungetc(c, in);
if (positive || GET_ND(bip.res) == 0) {
SET_SIGN(bip.res, BIG_POSITIVE);
} else {
SET_SIGN(bip.res, BIG_NEGATIVE);
}
}
/*
* print a big integer
*
* stream to write to in parameter
* number to print in bip.op1
*/
void bigPrint(FILE *out) {
int nd;
unsigned char r;
int skipZero;
if (bip.op1 == NULL) {
nilRefException();
}
nd = GET_ND(bip.op1);
if (nd == 0) {
fprintf(out, "0");
return;
}
if (GET_SIGN(bip.op1) == BIG_NEGATIVE) {
fprintf(out, "-");
}
/* number of digits in base 10 = number of digits
in base 256 * log10(256), and log10(256) < 2.5 */
nd = 2 * nd + nd / 2;
bip.rem = bip.op1;
bigFromInt(10);
bip.op2 = bip.res;
bigFromInt(1);
while (nd != 0) {
bip.op1 = bip.res;
bigUmul();
nd--;
}
bip.op1 = bip.rem;
bip.op2 = bip.res;
skipZero = 1;
do {
bigUdiv();
if (GET_ND(bip.res) == 0) {
if (!skipZero) {
fprintf(out, "0");
}
} else {
if (GET_ND(bip.res) != 1) {
fatalError("internal library error #7 - THIS SHOULD NEVER HAPPEN!");
}
fprintf(out, "%c", GET_DIGIT(bip.res, 0) + '0');
skipZero = 0;
}
bip.op1 = bip.rem;
bip.rem = bip.op2;
r = bigUdiv1(10);
bip.op2 = bip.rem;
} while (r == 0);
}
/**************************************************************/
/* debugging */
/*
* dump a big integer object
*/
void bigDump(FILE *out, BigObjRef bigObjRef) {
int nd;
unsigned char sign;
int i;
if (bigObjRef == NULL) {
nilRefException();
}
nd = GET_ND(bigObjRef);
sign = GET_SIGN(bigObjRef);
fprintf(out, "[%d %c", nd, sign == BIG_POSITIVE ? '+' : '-');
for (i = 0; i < nd; i++) {
fprintf(out, " %02X", GET_DIGIT(bigObjRef, i));
}
fprintf(out, "]");
}

View File

@@ -1,60 +0,0 @@
/*
* bigint.h -- big integer library
*/
#ifndef _BIGINT_H_
#define _BIGINT_H_
/* object representation */
typedef void* BigObjRef;
#include <stdio.h>
typedef struct {
int nd; /* number of digits; array may be bigger */
/* nd = 0 exactly when number = 0 */
unsigned char sign; /* one of BIG_NEGATIVE or BIG_POSITIVE */
/* zero always has BIG_POSITIVE here */
unsigned char digits[1]; /* the digits proper; number base is 256 */
/* LS digit first; MS digit is not zero */
} Big;
#include "support.h"
/* big integer processor registers */
typedef struct {
BigObjRef op1; /* first (or single) operand */
BigObjRef op2; /* second operand (if present) */
BigObjRef res; /* result of operation */
BigObjRef rem; /* remainder in case of division */
} BIP;
extern BIP bip; /* registers of the processor */
/* big integer processor functions */
int bigSgn(void); /* sign */
int bigCmp(void); /* comparison */
void bigNeg(void); /* negation */
void bigAdd(void); /* addition */
void bigSub(void); /* subtraction */
void bigMul(void); /* multiplication */
void bigDiv(void); /* division */
void bigFromInt(int n); /* conversion int --> big */
int bigToInt(void); /* conversion big --> int */
void bigRead(FILE *in); /* read a big integer */
void bigPrint(FILE *out); /* print a big integer */
void bigDump(FILE *out, BigObjRef bigObjRef); /* dump a big integer object */
#endif /* _BIGINT_H_ */

Binary file not shown.

Binary file not shown.

View File

@@ -1,15 +0,0 @@
/*
* support.h -- object representation and support functions
*/
#ifndef _SUPPORT_H_
#define _SUPPORT_H_
/* support functions */
void fatalError(char *msg); /* print a message and exit */
void * newPrimObject(int dataSize); /* create a new primitive object */
void * getPrimObjectDataPointer(void * primObject);
#endif /* _SUPPORT_H_ */

View File

@@ -1,28 +0,0 @@
#
# Makefile for big integer test
#
BUILD = ../build
CC = gcc
CFLAGS = -g -Wall -I$(BUILD)/include
LDFLAGS = -g -Wall -L$(BUILD)/lib
LDLIBS = -lbigint
all: testbip
install: all
mkdir -p $(BUILD)/bin
cp testbip $(BUILD)/bin
testbip: testbip.o support.o
$(CC) $(LDFLAGS) -o testbip testbip.o support.o $(LDLIBS)
testbip.o: testbip.c
$(CC) $(CFLAGS) -o testbip.o -c testbip.c
support.o: support.c
$(CC) $(CFLAGS) -o support.o -c support.c
clean:
rm -f *~ testbip.o support.o testbip

View File

@@ -1,55 +0,0 @@
/*
* support.c -- support functions for big integer library
*/
#include <stdio.h>
#include <stdlib.h>
#include "support.h"
typedef struct {
unsigned int size; /* byte count of payload data */
unsigned char data[1]; /* payload data, size as needed */
} *ObjRef;
/*
* This routine is called in case a fatal error has occurred.
* It should print the error message and terminate the program.
*/
void fatalError(char *msg) {
printf("Fatal error: %s\n", msg);
exit(1);
}
/*
* This function is called whenever a new primitive object with
* a certain amount of internal memory is needed. It should return
* an object reference to a regular object, which contains a freely
* usable memory area of at least the requested size (measured in
* bytes). The memory area need not be initialized in any way.
*
* Note that this function may move all objects in memory at will
* (due to, e.g., garbage collection), as long as the pointers in
* the global "bip" structure point to the correct objects when
* the function returns.
*/
void * newPrimObject(int dataSize) {
ObjRef bigObjRef;
bigObjRef = malloc(sizeof(unsigned int) +
dataSize * sizeof(unsigned char));
if (bigObjRef == NULL) {
fatalError("newPrimObject() got no memory");
}
bigObjRef->size = dataSize;
return bigObjRef;
}
void * getPrimObjectDataPointer(void * obj){
ObjRef oo = ((ObjRef) (obj));
return oo->data;
}

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,134 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
},
{
"isGenerated" : true,
"path" : "cmake-build-debug/CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"path" : "config.h.in"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 1,
"minor" : 0
}
}

View File

@@ -0,0 +1,60 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"jsonFile" : "directory-.-Debug-d0094a50bb2071803777.json",
"minimumCMakeVersion" :
{
"string" : "3.0"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
}
],
"name" : "Debug",
"projects" :
[
{
"directoryIndexes" :
[
0
],
"name" : "ninja",
"targetIndexes" :
[
0
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "ninja::@6890427a1f51a3e7e1df",
"jsonFile" : "target-ninja-Debug-f292f08edd698e5009d2.json",
"name" : "ninja",
"projectIndex" : 0
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug",
"source" : "C:/Users/Nilss/CLionProjects/ninja"
},
"version" :
{
"major" : 2,
"minor" : 4
}
}

View File

@@ -0,0 +1,14 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}

View File

@@ -0,0 +1,108 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "MinGW Makefiles"
},
"paths" :
{
"cmake" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cmake.exe",
"cpack" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/cpack.exe",
"ctest" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/bin/ctest.exe",
"root" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 25,
"patch" : 2,
"string" : "3.25.2",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-04d7c2d5c2c139b5c81c.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-b12e026c23bbd32d623a.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 0
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-23072077a90ad9331d20.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 4
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-0a3201452b7e265c1bfb.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View File

@@ -0,0 +1,135 @@
{
"artifacts" :
[
{
"path" : "ninja.exe"
},
{
"path" : "ninja.pdb"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"include_directories"
],
"files" :
[
"CMakeLists.txt"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 11,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 10,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -fdiagnostics-color=always"
},
{
"fragment" : "-std=gnu99"
}
],
"includes" :
[
{
"backtrace" : 2,
"path" : "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"
}
],
"language" : "C",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "99"
},
"sourceIndexes" :
[
0
]
}
],
"id" : "ninja::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"fragment" : "-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32",
"role" : "libraries"
}
],
"language" : "C"
},
"name" : "ninja",
"nameOnDisk" : "ninja.exe",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
1
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "njvm.c",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "config.h.in",
"sourceGroupIndex" : 1
}
],
"type" : "EXECUTABLE"
}

View File

@@ -0,0 +1,75 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "GNU",
"implicit" :
{
"includeDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include"
],
"linkDirectories" :
[
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib",
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32",
"pthread",
"advapi32",
"shell32",
"user32",
"kernel32",
"iconv",
"mingw32",
"gcc",
"moldname",
"mingwex",
"kernel32"
]
},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe",
"version" : "11.2.0"
},
"language" : "C",
"sourceFileExtensions" :
[
"c",
"m"
]
},
{
"compiler" :
{
"implicit" : {},
"path" : "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe"
},
"language" : "RC",
"sourceFileExtensions" :
[
"rc",
"RC"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,72 @@
set(CMAKE_C_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "GNU")
set(CMAKE_C_COMPILER_VERSION "11.2.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17")
set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
set(CMAKE_C17_COMPILE_FEATURES "c_std_17")
set(CMAKE_C23_COMPILE_FEATURES "c_std_23")
set(CMAKE_C_PLATFORM_ID "MinGW")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ar.exe")
set(CMAKE_C_COMPILER_AR "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ar.exe")
set(CMAKE_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ranlib.exe")
set(CMAKE_C_COMPILER_RANLIB "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc-ranlib.exe")
set(CMAKE_LINKER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/ld.exe")
set(CMAKE_MT "")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_C_COMPILER_ENV_VAR "CC")
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)
# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "")
set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
if(CMAKE_C_SIZEOF_DATA_PTR)
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()
if(CMAKE_C_COMPILER_ABI)
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()
if(CMAKE_C_LIBRARY_ARCHITECTURE)
set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "mingw32;gcc;moldname;mingwex;kernel32;pthread;advapi32;shell32;user32;kernel32;iconv;mingw32;gcc;moldname;mingwex;kernel32")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/lib;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

View File

@@ -0,0 +1,6 @@
set(CMAKE_RC_COMPILER "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/windres.exe")
set(CMAKE_RC_COMPILER_ARG1 "")
set(CMAKE_RC_COMPILER_LOADED 1)
set(CMAKE_RC_SOURCE_FILE_EXTENSIONS rc;RC)
set(CMAKE_RC_OUTPUT_EXTENSION .obj)
set(CMAKE_RC_COMPILER_ENV_VAR "RC")

View File

@@ -0,0 +1,15 @@
set(CMAKE_HOST_SYSTEM "Windows-10.0.22621")
set(CMAKE_HOST_SYSTEM_NAME "Windows")
set(CMAKE_HOST_SYSTEM_VERSION "10.0.22621")
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_SYSTEM "Windows-10.0.22621")
set(CMAKE_SYSTEM_NAME "Windows")
set(CMAKE_SYSTEM_VERSION "10.0.22621")
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
set(CMAKE_CROSSCOMPILING "FALSE")
set(CMAKE_SYSTEM_LOADED 1)

View File

@@ -0,0 +1,868 @@
#ifdef __cplusplus
# error "A C++ compiler has been selected for C."
#endif
#if defined(__18CXX)
# define ID_VOID_MAIN
#endif
#if defined(__CLASSIC_C__)
/* cv-qualifiers did not exist in K&R C */
# define const
# define volatile
#endif
#if !defined(__has_include)
/* If the compiler does not have __has_include, pretend the answer is
always no. */
# define __has_include(x) 0
#endif
/* Version number components: V=Version, R=Revision, P=Patch
Version date components: YYYY=Year, MM=Month, DD=Day */
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# if defined(__GNUC__)
# define SIMULATE_ID "GNU"
# endif
/* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later,
except that a few beta releases use the old format with V=2021. */
# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE)
/* The third version component from --version is an update index,
but no macro is provided for it. */
# define COMPILER_VERSION_PATCH DEC(0)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
# endif
# if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)
# define COMPILER_ID "IntelLLVM"
#if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
#endif
#if defined(__GNUC__)
# define SIMULATE_ID "GNU"
#endif
/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and
* later. Look for 6 digit vs. 8 digit version number to decide encoding.
* VVVV is no smaller than the current year when a version is released.
*/
#if __INTEL_LLVM_COMPILER < 1000000L
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10)
#else
# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000)
# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100)
#endif
#if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
#endif
#if defined(__GNUC__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
#elif defined(__GNUG__)
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
#endif
#if defined(__GNUC_MINOR__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
#endif
#if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
#endif
#elif defined(__PATHCC__)
# define COMPILER_ID "PathScale"
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
# if defined(__PATHCC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
# endif
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
# define COMPILER_ID "Embarcadero"
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
#elif defined(__BORLANDC__)
# define COMPILER_ID "Borland"
/* __BORLANDC__ = 0xVRR */
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
# define COMPILER_ID "Watcom"
/* __WATCOMC__ = VVRR */
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__WATCOMC__)
# define COMPILER_ID "OpenWatcom"
/* __WATCOMC__ = VVRP + 1100 */
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
# if (__WATCOMC__ % 10) > 0
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
# endif
#elif defined(__SUNPRO_C)
# define COMPILER_ID "SunPro"
# if __SUNPRO_C >= 0x5100
/* __SUNPRO_C = 0xVRRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# else
/* __SUNPRO_CC = 0xVRP */
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
# endif
#elif defined(__HP_cc)
# define COMPILER_ID "HP"
/* __HP_cc = VVRRPP */
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
#elif defined(__DECC)
# define COMPILER_ID "Compaq"
/* __DECC_VER = VVRRTPPPP */
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
# define COMPILER_ID "zOS"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__open_xl__) && defined(__clang__)
# define COMPILER_ID "IBMClang"
# define COMPILER_VERSION_MAJOR DEC(__open_xl_version__)
# define COMPILER_VERSION_MINOR DEC(__open_xl_release__)
# define COMPILER_VERSION_PATCH DEC(__open_xl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__open_xl_ptf_fix_level__)
#elif defined(__ibmxl__) && defined(__clang__)
# define COMPILER_ID "XLClang"
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
# define COMPILER_ID "XL"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
# define COMPILER_ID "VisualAge"
/* __IBMC__ = VRP */
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
#elif defined(__NVCOMPILER)
# define COMPILER_ID "NVHPC"
# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__)
# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__)
# if defined(__NVCOMPILER_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__)
# endif
#elif defined(__PGI)
# define COMPILER_ID "PGI"
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
# if defined(__PGIC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
# endif
#elif defined(_CRAYC)
# define COMPILER_ID "Cray"
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
#elif defined(__TI_COMPILER_VERSION__)
# define COMPILER_ID "TI"
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
#elif defined(__CLANG_FUJITSU)
# define COMPILER_ID "FujitsuClang"
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# define COMPILER_VERSION_INTERNAL_STR __clang_version__
#elif defined(__FUJITSU)
# define COMPILER_ID "Fujitsu"
# if defined(__FCC_version__)
# define COMPILER_VERSION __FCC_version__
# elif defined(__FCC_major__)
# define COMPILER_VERSION_MAJOR DEC(__FCC_major__)
# define COMPILER_VERSION_MINOR DEC(__FCC_minor__)
# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__)
# endif
# if defined(__fcc_version)
# define COMPILER_VERSION_INTERNAL DEC(__fcc_version)
# elif defined(__FCC_VERSION)
# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION)
# endif
#elif defined(__ghs__)
# define COMPILER_ID "GHS"
/* __GHS_VERSION_NUMBER = VVVVRP */
# ifdef __GHS_VERSION_NUMBER
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
# endif
#elif defined(__TASKING__)
# define COMPILER_ID "Tasking"
# define COMPILER_VERSION_MAJOR DEC(__VERSION__/1000)
# define COMPILER_VERSION_MINOR DEC(__VERSION__ % 100)
# define COMPILER_VERSION_INTERNAL DEC(__VERSION__)
#elif defined(__TINYC__)
# define COMPILER_ID "TinyCC"
#elif defined(__BCC__)
# define COMPILER_ID "Bruce"
#elif defined(__SCO_VERSION__)
# define COMPILER_ID "SCO"
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
# define COMPILER_ID "ARMCC"
#if __ARMCC_VERSION >= 1000000
/* __ARMCC_VERSION = VRRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#else
/* __ARMCC_VERSION = VRPPPP */
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
#endif
#elif defined(__clang__) && defined(__apple_build_version__)
# define COMPILER_ID "AppleClang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
# define COMPILER_ID "ARMClang"
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
#elif defined(__clang__)
# define COMPILER_ID "Clang"
# if defined(_MSC_VER)
# define SIMULATE_ID "MSVC"
# endif
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
# if defined(_MSC_VER)
/* _MSC_VER = VVRR */
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
# endif
#elif defined(__LCC__) && (defined(__GNUC__) || defined(__GNUG__) || defined(__MCST__))
# define COMPILER_ID "LCC"
# define COMPILER_VERSION_MAJOR DEC(1)
# if defined(__LCC__)
# define COMPILER_VERSION_MINOR DEC(__LCC__- 100)
# endif
# if defined(__LCC_MINOR__)
# define COMPILER_VERSION_PATCH DEC(__LCC_MINOR__)
# endif
# if defined(__GNUC__) && defined(__GNUC_MINOR__)
# define SIMULATE_ID "GNU"
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
# if defined(__GNUC_PATCHLEVEL__)
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
# endif
#elif defined(__GNUC__)
# define COMPILER_ID "GNU"
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
# if defined(__GNUC_MINOR__)
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
# endif
# if defined(__GNUC_PATCHLEVEL__)
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
# endif
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
/* _MSC_VER = VVRR */
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
# if defined(_MSC_FULL_VER)
# if _MSC_VER >= 1400
/* _MSC_FULL_VER = VVRRPPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
# else
/* _MSC_FULL_VER = VVRRPPPP */
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
# endif
# endif
# if defined(_MSC_BUILD)
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
# endif
#elif defined(_ADI_COMPILER)
# define COMPILER_ID "ADSP"
#if defined(__VERSIONNUM__)
/* __VERSIONNUM__ = 0xVVRRPPTT */
# define COMPILER_VERSION_MAJOR DEC(__VERSIONNUM__ >> 24 & 0xFF)
# define COMPILER_VERSION_MINOR DEC(__VERSIONNUM__ >> 16 & 0xFF)
# define COMPILER_VERSION_PATCH DEC(__VERSIONNUM__ >> 8 & 0xFF)
# define COMPILER_VERSION_TWEAK DEC(__VERSIONNUM__ & 0xFF)
#endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# define COMPILER_ID "IAR"
# if defined(__VER__) && defined(__ICCARM__)
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__))
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
# endif
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
# define COMPILER_ID "SDCC"
# if defined(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
# else
/* SDCC = VRP */
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
# endif
/* These compilers are either not known or too old to define an
identification macro. Try to identify the platform and guess that
it is the native compiler. */
#elif defined(__hpux) || defined(__hpua)
# define COMPILER_ID "HP"
#else /* unknown compiler */
# define COMPILER_ID ""
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
#ifdef SIMULATE_ID
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
#endif
#ifdef __QNXNTO__
char const* qnxnto = "INFO" ":" "qnxnto[]";
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
#endif
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
/* Identify known platforms by name. */
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
#elif defined(__MINGW32__)
# define PLATFORM_ID "MinGW"
#elif defined(__APPLE__)
# define PLATFORM_ID "Darwin"
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
# define PLATFORM_ID "Windows"
#elif defined(__FreeBSD__) || defined(__FreeBSD)
# define PLATFORM_ID "FreeBSD"
#elif defined(__NetBSD__) || defined(__NetBSD)
# define PLATFORM_ID "NetBSD"
#elif defined(__OpenBSD__) || defined(__OPENBSD)
# define PLATFORM_ID "OpenBSD"
#elif defined(__sun) || defined(sun)
# define PLATFORM_ID "SunOS"
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
# define PLATFORM_ID "AIX"
#elif defined(__hpux) || defined(__hpux__)
# define PLATFORM_ID "HP-UX"
#elif defined(__HAIKU__)
# define PLATFORM_ID "Haiku"
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
# define PLATFORM_ID "BeOS"
#elif defined(__QNX__) || defined(__QNXNTO__)
# define PLATFORM_ID "QNX"
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
# define PLATFORM_ID "Tru64"
#elif defined(__riscos) || defined(__riscos__)
# define PLATFORM_ID "RISCos"
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
# define PLATFORM_ID "SINIX"
#elif defined(__UNIX_SV__)
# define PLATFORM_ID "UNIX_SV"
#elif defined(__bsdos__)
# define PLATFORM_ID "BSDOS"
#elif defined(_MPRAS) || defined(MPRAS)
# define PLATFORM_ID "MP-RAS"
#elif defined(__osf) || defined(__osf__)
# define PLATFORM_ID "OSF1"
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
# define PLATFORM_ID "SCO_SV"
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
# define PLATFORM_ID "ULTRIX"
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
# define PLATFORM_ID "Xenix"
#elif defined(__WATCOMC__)
# if defined(__LINUX__)
# define PLATFORM_ID "Linux"
# elif defined(__DOS__)
# define PLATFORM_ID "DOS"
# elif defined(__OS2__)
# define PLATFORM_ID "OS2"
# elif defined(__WINDOWS__)
# define PLATFORM_ID "Windows3x"
# elif defined(__VXWORKS__)
# define PLATFORM_ID "VxWorks"
# else /* unknown platform */
# define PLATFORM_ID
# endif
#elif defined(__INTEGRITY)
# if defined(INT_178B)
# define PLATFORM_ID "Integrity178"
# else /* regular Integrity */
# define PLATFORM_ID "Integrity"
# endif
# elif defined(_ADI_COMPILER)
# define PLATFORM_ID "ADSP"
#else /* unknown platform */
# define PLATFORM_ID
#endif
/* For windows compilers MSVC and Intel we can determine
the architecture of the compiler being used. This is because
the compilers do not have flags that can change the architecture,
but rather depend on which compiler is being used
*/
#if defined(_WIN32) && defined(_MSC_VER)
# if defined(_M_IA64)
# define ARCHITECTURE_ID "IA64"
# elif defined(_M_ARM64EC)
# define ARCHITECTURE_ID "ARM64EC"
# elif defined(_M_X64) || defined(_M_AMD64)
# define ARCHITECTURE_ID "x64"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# elif defined(_M_ARM64)
# define ARCHITECTURE_ID "ARM64"
# elif defined(_M_ARM)
# if _M_ARM == 4
# define ARCHITECTURE_ID "ARMV4I"
# elif _M_ARM == 5
# define ARCHITECTURE_ID "ARMV5I"
# else
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
# endif
# elif defined(_M_MIPS)
# define ARCHITECTURE_ID "MIPS"
# elif defined(_M_SH)
# define ARCHITECTURE_ID "SHx"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__WATCOMC__)
# if defined(_M_I86)
# define ARCHITECTURE_ID "I86"
# elif defined(_M_IX86)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
# if defined(__ICCARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__ICCRX__)
# define ARCHITECTURE_ID "RX"
# elif defined(__ICCRH850__)
# define ARCHITECTURE_ID "RH850"
# elif defined(__ICCRL78__)
# define ARCHITECTURE_ID "RL78"
# elif defined(__ICCRISCV__)
# define ARCHITECTURE_ID "RISCV"
# elif defined(__ICCAVR__)
# define ARCHITECTURE_ID "AVR"
# elif defined(__ICC430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__ICCV850__)
# define ARCHITECTURE_ID "V850"
# elif defined(__ICC8051__)
# define ARCHITECTURE_ID "8051"
# elif defined(__ICCSTM8__)
# define ARCHITECTURE_ID "STM8"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__ghs__)
# if defined(__PPC64__)
# define ARCHITECTURE_ID "PPC64"
# elif defined(__ppc__)
# define ARCHITECTURE_ID "PPC"
# elif defined(__ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__x86_64__)
# define ARCHITECTURE_ID "x64"
# elif defined(__i386__)
# define ARCHITECTURE_ID "X86"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
#elif defined(__TI_COMPILER_VERSION__)
# if defined(__TI_ARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__MSP430__)
# define ARCHITECTURE_ID "MSP430"
# elif defined(__TMS320C28XX__)
# define ARCHITECTURE_ID "TMS320C28x"
# elif defined(__TMS320C6X__) || defined(_TMS320C6X)
# define ARCHITECTURE_ID "TMS320C6x"
# else /* unknown architecture */
# define ARCHITECTURE_ID ""
# endif
# elif defined(__ADSPSHARC__)
# define ARCHITECTURE_ID "SHARC"
# elif defined(__ADSPBLACKFIN__)
# define ARCHITECTURE_ID "Blackfin"
#elif defined(__TASKING__)
# if defined(__CTC__) || defined(__CPTC__)
# define ARCHITECTURE_ID "TriCore"
# elif defined(__CMCS__)
# define ARCHITECTURE_ID "MCS"
# elif defined(__CARM__)
# define ARCHITECTURE_ID "ARM"
# elif defined(__CARC__)
# define ARCHITECTURE_ID "ARC"
# elif defined(__C51__)
# define ARCHITECTURE_ID "8051"
# elif defined(__CPCP__)
# define ARCHITECTURE_ID "PCP"
# else
# define ARCHITECTURE_ID ""
# endif
#else
# define ARCHITECTURE_ID
#endif
/* Convert integer to decimal digit literals. */
#define DEC(n) \
('0' + (((n) / 10000000)%10)), \
('0' + (((n) / 1000000)%10)), \
('0' + (((n) / 100000)%10)), \
('0' + (((n) / 10000)%10)), \
('0' + (((n) / 1000)%10)), \
('0' + (((n) / 100)%10)), \
('0' + (((n) / 10)%10)), \
('0' + ((n) % 10))
/* Convert integer to hex digit literals. */
#define HEX(n) \
('0' + ((n)>>28 & 0xF)), \
('0' + ((n)>>24 & 0xF)), \
('0' + ((n)>>20 & 0xF)), \
('0' + ((n)>>16 & 0xF)), \
('0' + ((n)>>12 & 0xF)), \
('0' + ((n)>>8 & 0xF)), \
('0' + ((n)>>4 & 0xF)), \
('0' + ((n) & 0xF))
/* Construct a string literal encoding the version number. */
#ifdef COMPILER_VERSION
char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]";
/* Construct a string literal encoding the version number components. */
#elif defined(COMPILER_VERSION_MAJOR)
char const info_version[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
COMPILER_VERSION_MAJOR,
# ifdef COMPILER_VERSION_MINOR
'.', COMPILER_VERSION_MINOR,
# ifdef COMPILER_VERSION_PATCH
'.', COMPILER_VERSION_PATCH,
# ifdef COMPILER_VERSION_TWEAK
'.', COMPILER_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct a string literal encoding the internal version number. */
#ifdef COMPILER_VERSION_INTERNAL
char const info_version_internal[] = {
'I', 'N', 'F', 'O', ':',
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
'i','n','t','e','r','n','a','l','[',
COMPILER_VERSION_INTERNAL,']','\0'};
#elif defined(COMPILER_VERSION_INTERNAL_STR)
char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]";
#endif
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
'I', 'N', 'F', 'O', ':',
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
SIMULATE_VERSION_MAJOR,
# ifdef SIMULATE_VERSION_MINOR
'.', SIMULATE_VERSION_MINOR,
# ifdef SIMULATE_VERSION_PATCH
'.', SIMULATE_VERSION_PATCH,
# ifdef SIMULATE_VERSION_TWEAK
'.', SIMULATE_VERSION_TWEAK,
# endif
# endif
# endif
']','\0'};
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
#if !defined(__STDC__) && !defined(__clang__)
# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__)
# define C_VERSION "90"
# else
# define C_VERSION
# endif
#elif __STDC_VERSION__ > 201710L
# define C_VERSION "23"
#elif __STDC_VERSION__ >= 201710L
# define C_VERSION "17"
#elif __STDC_VERSION__ >= 201000L
# define C_VERSION "11"
#elif __STDC_VERSION__ >= 199901L
# define C_VERSION "99"
#else
# define C_VERSION "90"
#endif
const char* info_language_standard_default =
"INFO" ":" "standard_default[" C_VERSION "]";
const char* info_language_extensions_default = "INFO" ":" "extensions_default["
#if (defined(__clang__) || defined(__GNUC__) || defined(__xlC__) || \
defined(__TI_COMPILER_VERSION__)) && \
!defined(__STRICT_ANSI__)
"ON"
#else
"OFF"
#endif
"]";
/*--------------------------------------------------------------------------*/
#ifdef ID_VOID_MAIN
void main() {}
#else
# if defined(__CLASSIC_C__)
int main(argc, argv) int argc; char *argv[];
# else
int main(int argc, char* argv[])
# endif
{
int require = 0;
require += info_compiler[argc];
require += info_platform[argc];
require += info_arch[argc];
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
#ifdef COMPILER_VERSION_INTERNAL
require += info_version_internal[argc];
#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
#ifdef SIMULATE_VERSION_MAJOR
require += info_simulate_version[argc];
#endif
#if defined(__CRAYXT_COMPUTE_LINUX_TARGET)
require += info_cray[argc];
#endif
require += info_language_standard_default[argc];
require += info_language_extensions_default[argc];
(void)argv;
return require;
}
#endif

Binary file not shown.

View File

@@ -0,0 +1,16 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Relative path conversion top directories.
set(CMAKE_RELATIVE_PATH_TOP_SOURCE "C:/Users/Nilss/CLionProjects/ninja")
set(CMAKE_RELATIVE_PATH_TOP_BINARY "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug")
# Force unix paths in dependencies.
set(CMAKE_FORCE_UNIX_PATHS 1)
# The C and CXX include file regular expressions for this directory.
set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$")
set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$")
set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN})
set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN})

View File

@@ -0,0 +1,230 @@
The system is: Windows - 10.0.22621 - AMD64
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
Compiler: C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
Build flags:
Id flags:
The output was:
0
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.exe"
The C compiler identification is GNU, found in "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/3.25.2/CompilerIdC/a.exe"
Detecting C compiler ABI info compiled with the following output:
Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz
Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build
mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"
ignoring nonexistent directory "/win/include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"
ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include
End of search list.
GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version none
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 23424b72d090e8b977a96775bde79257
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\'
as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s
GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.'
Linking C executable cmTC_be6eb.exe
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl,--whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl,--no-whole-archive -o cmTC_be6eb.exe -Wl,--out-implib,libcmTC_be6eb.dll.a -Wl,--major-image-version,0,--minor-image-version,0
Using built-in specs.
COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.2.0 (GCC)
COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/
LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/;C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.'
mingw32-make[1]: Leaving directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz'
Parsed C implicit include dir info from above output: rv=done
found start of include info
found start of implicit include info
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
add: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
end of search list found
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
collapse include dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include] ==> [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
implicit include dirs: [C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/include;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed;C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/x86_64-w64-mingw32/include]
Parsed C implicit link information from above output:
link line regex: [^( *|.*[/\])(ld\.exe|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
ignore line: [Change Dir: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz]
ignore line: []
ignore line: [Run Build Command(s):C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f Makefile cmTC_be6eb/fast && C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f CMakeFiles\cmTC_be6eb.dir\build.make CMakeFiles/cmTC_be6eb.dir/build]
ignore line: [mingw32-make[1]: Entering directory 'C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/CMakeScratch/TryCompile-04r8wz']
ignore line: [Building C object CMakeFiles/cmTC_be6eb.dir/CMakeCCompilerABI.c.obj]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -fdiagnostics-color=always -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj -c "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c"]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/cc1.exe -quiet -v -iprefix C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/ -D_REENTRANT C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\share\cmake-3.25\Modules\CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles\cmTC_be6eb.dir\ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mtune=generic -march=x86-64 -version -fdiagnostics-color=always -o C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include"]
ignore line: [ignoring nonexistent directory "/win/include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../include"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"]
ignore line: [ignoring duplicate directory "C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/lib/gcc/../../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"]
ignore line: [ignoring nonexistent directory "/mingw/include"]
ignore line: [#include "..." search starts here:]
ignore line: [#include <...> search starts here:]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed]
ignore line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include]
ignore line: [End of search list.]
ignore line: [GNU C17 (GCC) version 11.2.0 (x86_64-w64-mingw32)]
ignore line: [ compiled by GNU C version 11.2.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version none]
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
ignore line: [Compiler executable checksum: 23424b72d090e8b977a96775bde79257]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\']
ignore line: [ as -v -o CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj C:\Users\Nilss\AppData\Local\Temp\ccWSJGTn.s]
ignore line: [GNU assembler version 2.37 (x86_64-w64-mingw32) using BFD version (GNU Binutils) 2.37]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-fdiagnostics-color=always' '-v' '-o' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64' '-dumpdir' 'CMakeFiles\cmTC_be6eb.dir\CMakeCCompilerABI.c.']
ignore line: [Linking C executable cmTC_be6eb.exe]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_be6eb.dir\link.txt --verbose=1]
ignore line: ["C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\cmTC_be6eb.dir/objects.a]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\cmTC_be6eb.dir/objects.a @CMakeFiles\cmTC_be6eb.dir\objects1]
ignore line: [C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -v -Wl --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a -Wl --no-whole-archive -o cmTC_be6eb.exe -Wl --out-implib libcmTC_be6eb.dll.a -Wl --major-image-version 0 --minor-image-version 0 ]
ignore line: [Using built-in specs.]
ignore line: [COLLECT_GCC=C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe]
ignore line: [COLLECT_LTO_WRAPPER=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/lto-wrapper.exe]
ignore line: [Target: x86_64-w64-mingw32]
ignore line: [Configured with: ../gcc-11.2.0/configure --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --build=x86_64-alpine-linux-musl --prefix=/win --enable-checking=release --enable-fully-dynamic-string --enable-languages=c,c++ --enable-libatomic --enable-libgomp --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --enable-seh-exceptions --enable-shared --enable-static --enable-threads=posix --enable-version-specific-runtime-libs --disable-bootstrap --disable-graphite --disable-libada --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-libquadmath --disable-lto --disable-nls --disable-multilib --disable-rpath --disable-symvers --disable-werror --disable-win32-registry --with-gnu-as --with-gnu-ld --with-system-libiconv --with-system-libz --with-gmp=/win/makedepends --with-mpfr=/win/makedepends --with-mpc=/win/makedepends]
ignore line: [Thread model: posix]
ignore line: [Supported LTO compression algorithms: zlib]
ignore line: [gcc version 11.2.0 (GCC) ]
ignore line: [COMPILER_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/]
ignore line: [LIBRARY_PATH=C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/]
ignore line: [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../]
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_be6eb.exe' '-mtune=generic' '-march=x86-64' '-dumpdir' 'cmTC_be6eb.']
link line: [ C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe -m i386pep -Bdynamic -o cmTC_be6eb.exe C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0 -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib -LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../.. --whole-archive CMakeFiles\cmTC_be6eb.dir/objects.a --no-whole-archive --out-implib libcmTC_be6eb.dll.a --major-image-version 0 --minor-image-version 0 -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32 C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/default-manifest.o C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtend.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../libexec/gcc/x86_64-w64-mingw32/11.2.0/collect2.exe] ==> ignore
arg [-m] ==> ignore
arg [i386pep] ==> ignore
arg [-Bdynamic] ==> search dynamic
arg [-o] ==> ignore
arg [cmTC_be6eb.exe] ==> ignore
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/lib/../lib/crt2.o]
arg [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o] ==> obj [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/crtbegin.o]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0]
arg [-LC:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc] ==> dir [C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/../lib/gcc]

View File

@@ -0,0 +1,52 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# The generator used is:
set(CMAKE_DEPENDS_GENERATOR "MinGW Makefiles")
# The top level Makefile was generated from the following files:
set(CMAKE_MAKEFILE_DEPENDS
"CMakeCache.txt"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeCommonLanguageInclude.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeFindCodeBlocks.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeGenericSystem.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeInitializeConfigs.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeLanguageInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeRCInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInformation.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/CMakeSystemSpecificInitialize.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Compiler/GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C-ABI.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU-C.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-GNU.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows-windres.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/Windows.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/Platform/WindowsPaths.cmake"
"C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/cmake/win/x64/share/cmake-3.25/Modules/ProcessorCount.cmake"
"C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt"
"CMakeFiles/3.25.2/CMakeCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeRCCompiler.cmake"
"CMakeFiles/3.25.2/CMakeSystem.cmake"
"C:/Users/Nilss/CLionProjects/ninja/config.h.in"
)
# The corresponding makefile is:
set(CMAKE_MAKEFILE_OUTPUTS
"Makefile"
"CMakeFiles/cmake.check_cache"
)
# Byproducts of CMake generate step:
set(CMAKE_MAKEFILE_PRODUCTS
"config.h"
"CMakeFiles/CMakeDirectoryInformation.cmake"
)
# Dependency information for all targets:
set(CMAKE_DEPEND_INFO_FILES
"CMakeFiles/ninja.dir/DependInfo.cmake"
)

View File

@@ -0,0 +1,111 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Directory level rules for the build root directory
# The main recursive "all" target.
all: CMakeFiles/ninja.dir/all
.PHONY : all
# The main recursive "preinstall" target.
preinstall:
.PHONY : preinstall
# The main recursive "clean" target.
clean: CMakeFiles/ninja.dir/clean
.PHONY : clean
#=============================================================================
# Target rules for target CMakeFiles/ninja.dir
# All Build rule for target.
CMakeFiles/ninja.dir/all:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/depend
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=1,2 "Built target ninja"
.PHONY : CMakeFiles/ninja.dir/all
# Build rule for subdir invocation for target.
CMakeFiles/ninja.dir/rule: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 2
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 CMakeFiles/ninja.dir/all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : CMakeFiles/ninja.dir/rule
# Convenience name for target.
ninja: CMakeFiles/ninja.dir/rule
.PHONY : ninja
# clean rule for target.
CMakeFiles/ninja.dir/clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/clean
.PHONY : CMakeFiles/ninja.dir/clean
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@@ -0,0 +1,3 @@
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/ninja.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/edit_cache.dir
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/CMakeFiles/rebuild_cache.dir

View File

@@ -0,0 +1,4 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - MinGW Makefiles" -S C:\Users\Nilss\CLionProjects\ninja -B C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug

View File

@@ -0,0 +1,4 @@
ToolSet: w64 9.0 (local)@C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\mingw
Options:
Options:

View File

@@ -0,0 +1 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file

View File

@@ -0,0 +1,19 @@
# Consider dependencies only in project.
set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF)
# The set of languages for which implicit dependencies are needed:
set(CMAKE_DEPENDS_LANGUAGES
)
# The set of dependency files which are needed:
set(CMAKE_DEPENDS_DEPENDENCY_FILES
"C:/Users/Nilss/CLionProjects/ninja/njvm.c" "CMakeFiles/ninja.dir/njvm.c.obj" "gcc" "CMakeFiles/ninja.dir/njvm.c.obj.d"
)
# Targets to which this target links.
set(CMAKE_TARGET_LINKED_INFO_FILES
)
# Fortran module output directory.
set(CMAKE_Fortran_TARGET_MODULE_DIR "")

View File

@@ -0,0 +1,112 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Delete rule output on recipe failure.
.DELETE_ON_ERROR:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
# Include any dependencies generated for this target.
include CMakeFiles/ninja.dir/depend.make
# Include any dependencies generated by the compiler for this target.
include CMakeFiles/ninja.dir/compiler_depend.make
# Include the progress variables for this target.
include CMakeFiles/ninja.dir/progress.make
# Include the compile flags for this target's objects.
include CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/flags.make
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/includes_C.rsp
CMakeFiles/ninja.dir/njvm.c.obj: C:/Users/Nilss/CLionProjects/ninja/njvm.c
CMakeFiles/ninja.dir/njvm.c.obj: CMakeFiles/ninja.dir/compiler_depend.ts
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building C object CMakeFiles/ninja.dir/njvm.c.obj"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -MD -MT CMakeFiles/ninja.dir/njvm.c.obj -MF CMakeFiles\ninja.dir\njvm.c.obj.d -o CMakeFiles\ninja.dir\njvm.c.obj -c C:\Users\Nilss\CLionProjects\ninja\njvm.c
CMakeFiles/ninja.dir/njvm.c.i: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing C source to CMakeFiles/ninja.dir/njvm.c.i"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -E C:\Users\Nilss\CLionProjects\ninja\njvm.c > CMakeFiles\ninja.dir\njvm.c.i
CMakeFiles/ninja.dir/njvm.c.s: cmake_force
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling C source to assembly CMakeFiles/ninja.dir/njvm.c.s"
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe $(C_DEFINES) $(C_INCLUDES) $(C_FLAGS) -S C:\Users\Nilss\CLionProjects\ninja\njvm.c -o CMakeFiles\ninja.dir\njvm.c.s
# Object files for target ninja
ninja_OBJECTS = \
"CMakeFiles/ninja.dir/njvm.c.obj"
# External object files for target ninja
ninja_EXTERNAL_OBJECTS =
ninja.exe: CMakeFiles/ninja.dir/njvm.c.obj
ninja.exe: CMakeFiles/ninja.dir/build.make
ninja.exe: CMakeFiles/ninja.dir/linkLibs.rsp
ninja.exe: CMakeFiles/ninja.dir/objects1
ninja.exe: CMakeFiles/ninja.dir/link.txt
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking C executable ninja.exe"
$(CMAKE_COMMAND) -E cmake_link_script CMakeFiles\ninja.dir\link.txt --verbose=$(VERBOSE)
# Rule to build all files generated by this target.
CMakeFiles/ninja.dir/build: ninja.exe
.PHONY : CMakeFiles/ninja.dir/build
CMakeFiles/ninja.dir/clean:
$(CMAKE_COMMAND) -P CMakeFiles\ninja.dir\cmake_clean.cmake
.PHONY : CMakeFiles/ninja.dir/clean
CMakeFiles/ninja.dir/depend:
$(CMAKE_COMMAND) -E cmake_depends "MinGW Makefiles" C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles\ninja.dir\DependInfo.cmake --color=$(COLOR)
.PHONY : CMakeFiles/ninja.dir/depend

View File

@@ -0,0 +1,13 @@
file(REMOVE_RECURSE
"CMakeFiles/ninja.dir/njvm.c.obj"
"CMakeFiles/ninja.dir/njvm.c.obj.d"
"libninja.dll.a"
"ninja.exe"
"ninja.exe.manifest"
"ninja.pdb"
)
# Per-language clean rules from dependency scanning.
foreach(lang C)
include(CMakeFiles/ninja.dir/cmake_clean_${lang}.cmake OPTIONAL)
endforeach()

View File

@@ -0,0 +1,2 @@
# Empty compiler generated dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@@ -0,0 +1,2 @@
# CMAKE generated file: DO NOT EDIT!
# Timestamp file for compiler generated dependencies management for ninja.

View File

@@ -0,0 +1,2 @@
# Empty dependencies file for ninja.
# This may be replaced when dependencies are built.

View File

@@ -0,0 +1,10 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# compile C with C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/gcc.exe
C_DEFINES =
C_INCLUDES = @CMakeFiles/ninja.dir/includes_C.rsp
C_FLAGS = -g -fdiagnostics-color=always -std=gnu99

View File

@@ -0,0 +1 @@
-I"C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"

View File

@@ -0,0 +1,3 @@
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f CMakeFiles\ninja.dir/objects.a
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\ar.exe qc CMakeFiles\ninja.dir/objects.a @CMakeFiles\ninja.dir\objects1
C:\PROGRA~2\JETBRA~1\CLION2~1.5\bin\mingw\bin\gcc.exe -g -Wl,--whole-archive CMakeFiles\ninja.dir/objects.a -Wl,--no-whole-archive -o ninja.exe -Wl,--out-implib,libninja.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\ninja.dir\linkLibs.rsp

View File

@@ -0,0 +1 @@
-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32

Binary file not shown.

View File

@@ -0,0 +1,17 @@
CMakeFiles/ninja.dir/njvm.c.obj: \
C:\Users\Nilss\CLionProjects\ninja\njvm.c \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/stdio.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt_stdio_config.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/corecrt.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_mac.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_secapi.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/vadefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sdks/_mingw_ddk.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/_mingw_off_t.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/swprintf.inl \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/stdio_s.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/string.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/crtdefs.h \
C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/x86_64-w64-mingw32/include/sec_api/string_s.h \
C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/config.h

Binary file not shown.

View File

@@ -0,0 +1 @@
CMakeFiles/ninja.dir/njvm.c.obj

View File

@@ -0,0 +1,3 @@
CMAKE_PROGRESS_1 = 1
CMAKE_PROGRESS_2 = 2

View File

@@ -0,0 +1 @@
2

180
cmake-build-debug/Makefile Normal file
View File

@@ -0,0 +1,180 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "MinGW Makefiles" Generator, CMake Version 3.25
# Default target executed when no arguments are given to make.
default_target: all
.PHONY : default_target
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
# Disable VCS-based implicit rules.
% : %,v
# Disable VCS-based implicit rules.
% : RCS/%
# Disable VCS-based implicit rules.
% : RCS/%,v
# Disable VCS-based implicit rules.
% : SCCS/s.%
# Disable VCS-based implicit rules.
% : s.%
.SUFFIXES: .hpux_make_needs_suffix_list
# Command-line flag to silence nested $(MAKE).
$(VERBOSE)MAKESILENT = -s
#Suppress display of executed commands.
$(VERBOSE).SILENT:
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
SHELL = cmd.exe
# The CMake executable.
CMAKE_COMMAND = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe"
# The command to remove a file.
RM = "C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E rm -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = C:\Users\Nilss\CLionProjects\ninja
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" -E echo "No interactive CMake dialog available."
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
"C:\Program Files (x86)\JetBrains\CLion 2023.1.5\bin\cmake\win\x64\bin\cmake.exe" --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# The main all target
all: cmake_check_build_system
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\\CMakeFiles\progress.marks
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 all
$(CMAKE_COMMAND) -E cmake_progress_start C:\Users\Nilss\CLionProjects\ninja\cmake-build-debug\CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 preinstall
.PHONY : preinstall/fast
# clear depends
depend:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 1
.PHONY : depend
#=============================================================================
# Target rules for targets named ninja
# Build rule for target.
ninja: cmake_check_build_system
$(MAKE) $(MAKESILENT) -f CMakeFiles\Makefile2 ninja
.PHONY : ninja
# fast build rule for target.
ninja/fast:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/build
.PHONY : ninja/fast
njvm.obj: njvm.c.obj
.PHONY : njvm.obj
# target to build an object file
njvm.c.obj:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.obj
.PHONY : njvm.c.obj
njvm.i: njvm.c.i
.PHONY : njvm.i
# target to preprocess a source file
njvm.c.i:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.i
.PHONY : njvm.c.i
njvm.s: njvm.c.s
.PHONY : njvm.s
# target to generate assembly for a file
njvm.c.s:
$(MAKE) $(MAKESILENT) -f CMakeFiles\ninja.dir\build.make CMakeFiles/ninja.dir/njvm.c.s
.PHONY : njvm.c.s
# Help Target
help:
@echo The following are some of the valid targets for this Makefile:
@echo ... all (the default if no target is provided)
@echo ... clean
@echo ... depend
@echo ... edit_cache
@echo ... rebuild_cache
@echo ... ninja
@echo ... njvm.obj
@echo ... njvm.i
@echo ... njvm.s
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
$(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles\Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@@ -0,0 +1,3 @@
Start testing: Oct 12 12:13 Mitteleuropäische Sommerzeit
----------------------------------------------------------
End testing: Oct 12 12:13 Mitteleuropäische Sommerzeit

View File

@@ -0,0 +1,49 @@
# Install script for directory: C:/Users/Nilss/CLionProjects/ninja
# Set the install prefix
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "C:/Program Files (x86)/ninja")
endif()
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
# Set the install configuration name.
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
if(BUILD_TYPE)
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
else()
set(CMAKE_INSTALL_CONFIG_NAME "Debug")
endif()
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
endif()
# Set the component getting installed.
if(NOT CMAKE_INSTALL_COMPONENT)
if(COMPONENT)
message(STATUS "Install component: \"${COMPONENT}\"")
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
else()
set(CMAKE_INSTALL_COMPONENT)
endif()
endif()
# Is this installation the result of a crosscompile?
if(NOT DEFINED CMAKE_CROSSCOMPILING)
set(CMAKE_CROSSCOMPILING "FALSE")
endif()
# Set default install directory permissions.
if(NOT DEFINED CMAKE_OBJDUMP)
set(CMAKE_OBJDUMP "C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/objdump.exe")
endif()
if(CMAKE_INSTALL_COMPONENT)
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
else()
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
endif()
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
"${CMAKE_INSTALL_MANIFEST_FILES}")
file(WRITE "C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/${CMAKE_INSTALL_MANIFEST}"
"${CMAKE_INSTALL_MANIFEST_CONTENT}")

View File

@@ -0,0 +1 @@
#define PROJECT_VERSION 0

View File

@@ -0,0 +1,94 @@
<?xml version="1.0" encoding="UTF-8"?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6"/>
<Project>
<Option title="ninja"/>
<Option makefile_is_custom="1"/>
<Option compiler="gcc"/>
<Option virtualFolders="CMake Files\;"/>
<Build>
<Target title="all">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 all"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="ninja/fast">
<Option output="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/ninja.exe" prefix_auto="0" extension_auto="0"/>
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option object_output="./"/>
<Option type="1"/>
<Option compiler="gcc"/>
<Compiler>
<Add directory="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../include"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/include-fixed"/>
<Add directory="C:/Program Files (x86)/JetBrains/CLion 2023.1.5/bin/mingw/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/include"/>
</Compiler>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 ninja/fast"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="edit_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 edit_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
<Target title="rebuild_cache">
<Option working_dir="C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug"/>
<Option type="4"/>
<MakeCommands>
<Build command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 rebuild_cache"/>
<CompileFile command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 &quot;$file&quot;"/>
<Clean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
<DistClean command="C:/PROGRA~2/JETBRA~1/CLION2~1.5/bin/mingw/bin/mingw32-make.exe -f &quot;C:/Users/Nilss/CLionProjects/ninja/cmake-build-debug/Makefile&quot; VERBOSE=1 clean"/>
</MakeCommands>
</Target>
</Build>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/njvm.c">
<Option target="ninja"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/CMakeLists.txt">
<Option virtualFolder="CMake Files\"/>
</Unit>
<Unit filename="C:/Users/Nilss/CLionProjects/ninja/config.h.in">
<Option virtualFolder="CMake Files\"/>
</Unit>
</Project>
</CodeBlocks_project_file>

BIN
cmake-build-debug/ninja.exe Normal file

Binary file not shown.

38
code.c
View File

@@ -1,38 +0,0 @@
#ifndef CODE
#define CODE
#include "instruktion.c"
unsigned int code1[] = {
(PUSHC << 24) | IMMEDIATE(3),
(PUSHC << 24) | IMMEDIATE(4),
(ADD << 24),
(PUSHC << 24) | IMMEDIATE(10),
(PUSHC << 24) | IMMEDIATE(6),
(SUB << 24),
(MUL << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE(10),
(WRCHR << 24),
(HALT)
};
unsigned int code2[] = {
(PUSHC << 24) | IMMEDIATE(SIGN_EXTEND(-2)),
(RDINT << 24),
(MUL << 24),
(PUSHC << 24) | IMMEDIATE(3),
(ADD << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
unsigned int code3[] = {
(RDCHR << 24),
(WRINT << 24),
(PUSHC << 24) | IMMEDIATE('\n'),
(WRCHR << 24),
(HALT << 24)
};
#endif

View File

@@ -1,37 +0,0 @@
#ifndef CODEREADER
#define CODEREADER
#include "consts.c"
#include <stdio.h>
#include <stdlib.h>
#include "program.c"
unsigned int fromFile(char *path, struct program program) {
unsigned int countInstructions;
unsigned int staticVars;
FILE *fptr;
fptr = fopen(path, "r");
if (fptr == NULL) {
printf("Error: cannot open code file %s", path);
exit(EXIT_FAILURE);
}
unsigned int buffer[4];
fread(buffer, 4, 4, fptr);
// Check file type
if (buffer[0] != 0x46424A4E) {
printf("Error: wrong file type");
exit(EXIT_FAILURE);
}
if (buffer[1] != VERSION) {
printf("Error: wrong version");
exit(EXIT_FAILURE);
}
countInstructions = buffer[2];
staticVars = buffer[3];
unsigned int instBuffer[countInstructions];
fread(instBuffer, 4, countInstructions, fptr);
copyToProgram(instBuffer, countInstructions, program);
return staticVars;
}
#endif /* ifdef CODEREADER */

View File

@@ -1,3 +0,0 @@
-Ibigint/build/include
-Lbigint/build/lib
-lbigint

1
config.h.in Normal file
View File

@@ -0,0 +1 @@
#define PROJECT_VERSION @PROJECT_VERSION@

View File

@@ -1,7 +0,0 @@
#ifndef CONSTS
#define CONSTS
#define VERSION 5
#endif /* ifndef CONSTS
#define CONSTS
#define VERSION 2; */

View File

@@ -1,53 +0,0 @@
#ifndef DEBUGMENU
#define DEBUGMENU
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stack.c"
#include "stack.c"
void inspect(struct stack s, int fp){
//todo Does not work dont know why
char input[20];
char ref[20];
char refStr[20];
printf("DEBUG [inspect]: stack, datam object?");
fgets(input,20,stdin);
if (input[0] == 's') printStack(s, fp);
if (input[0] == 'd'){/* todo */ }
if (input[0] == 'o'){
scanf("%19s",ref);
ObjRefContainer container;
container = getRefs(s);
for (int i = 0; i<= container.size; i++) {
sprintf(refStr, "%p", (void *)&container.refs[i]);
if(strcmp(ref, refStr) == 0) printf("Adress exists\n");
else printf("Adress doeas not exist\n");
printf("%s",refStr);
}
}
}
void list(){
//todo
}
void breakpoint(){
//todo
}
void debugMenu(int fp, struct stack stack, int* debug){
char input[20];
while (true) {
printf("DEBUG: inspect, list, breakpoint, run, step, quit?");
fgets(input, 20, stdin);
printf("%s",input);
if(input[0] == 'i') {inspect(stack,fp);}
if(input[0] == 'l') list();
if(input[0] == 'b') breakpoint();
if(input[0] == 's') break;
if(input[0] == 'r') {*debug = 0; break;};
if(input[0] == 'q') exit(0);
strcpy(input, "");
}
}
#endif /* ifndef DEBUGMENU */

View File

@@ -1,41 +0,0 @@
#ifndef INSREUKTION
#define INSREUKTION
#define IMMEDIATE(x) ((x) & 0x00FFFFFF)
#define SIGN_EXTEND(i) ((i) & 0x00800000 ? (i) | 0xFF000000 : (i))
#define HALT 0
#define PUSHC 1
#define ADD 2
#define SUB 3
#define MUL 4
#define DIV 5
#define MOD 6
#define RDINT 7
#define WRINT 8
#define RDCHR 9
#define WRCHR 10
#define PUSHG 11
#define POPG 12
#define ASF 13
#define RSF 14
#define PUSHL 15
#define POPL 16
#define EQ 17
#define NE 18
#define LT 19
#define LE 20
#define GT 21
#define GE 22
#define JMP 23
#define BRF 24
#define BRT 25
#define CALL 26
#define RET 27
#define DROP 28
#define PUSHR 29
#define POPR 30
#define DUP 31
#endif /* ifndef INSREUKTION */

BIN
nja/nja2

Binary file not shown.

BIN
nja/nja3

Binary file not shown.

BIN
nja/nja4

Binary file not shown.

BIN
nja/nja5

Binary file not shown.

BIN
nja/nja6

Binary file not shown.

BIN
nja/nja7

Binary file not shown.

BIN
nja/nja8

Binary file not shown.

View File

@@ -1,14 +0,0 @@
--2024-01-14 15:07:13-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a4/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false
0K .......... .......... .......... .......... .......... 37% 1.23M 0s
50K .......... .......... .......... .......... .......... 74% 2.63M 0s
100K .......... .......... .......... ... 100% 9.98M=0.06s
2024-01-14 15:07:14 (2.13 MB/s) - njc?inline=false saved [137095/137095]

View File

@@ -1,14 +0,0 @@
--2024-01-14 15:07:20-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a5/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false.1
0K .......... .......... .......... .......... .......... 37% 1.21M 0s
50K .......... .......... .......... .......... .......... 74% 2.51M 0s
100K .......... .......... .......... ... 100% 11.2M=0.06s
2024-01-14 15:07:21 (2.08 MB/s) - njc?inline=false.1 saved [137095/137095]

View File

@@ -1,14 +0,0 @@
--2024-01-14 15:07:28-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a6/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 137095 (134K) [application/octet-stream]
Saving to: njc?inline=false.2
0K .......... .......... .......... .......... .......... 37% 1.02M 0s
50K .......... .......... .......... .......... .......... 74% 2.03M 0s
100K .......... .......... .......... ... 100% 11.4M=0.07s
2024-01-14 15:07:28 (1.74 MB/s) - njc?inline=false.2 saved [137095/137095]

View File

@@ -1,15 +0,0 @@
--2024-01-14 15:07:49-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a7/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 166681 (163K) [application/octet-stream]
Saving to: njc?inline=false.6
0K .......... .......... .......... .......... .......... 30% 1.04M 0s
50K .......... .......... .......... .......... .......... 61% 2.13M 0s
100K .......... .......... .......... .......... .......... 92% 11.2M 0s
150K .......... .. 100% 14.2M=0.08s
2024-01-14 15:07:49 (2.11 MB/s) - njc?inline=false.6 saved [166681/166681]

View File

@@ -1,15 +0,0 @@
--2024-01-14 15:07:46-- https://git.thm.de/arin07/KSP_public/-/raw/master/aufgaben/a8/njc?inline=false
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving git.thm.de (git.thm.de)... 212.201.6.138
Connecting to git.thm.de (git.thm.de)|212.201.6.138|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 166681 (163K) [application/octet-stream]
Saving to: njc?inline=false.5
0K .......... .......... .......... .......... .......... 30% 1.20M 0s
50K .......... .......... .......... .......... .......... 61% 2.53M 0s
100K .......... .......... .......... .......... .......... 92% 6.70M 0s
150K .......... .. 100% 8.97M=0.07s
2024-01-14 15:07:47 (2.31 MB/s) - njc?inline=false.5 saved [166681/166681]

307
njvm.c
View File

@@ -1,296 +1,43 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "instruktion.c"
#include "code.c"
#include "stack.c"
#include "program.c"
#include "codeReader.c"
#include "SDA.c"
#include "debugMenu.c"
#include "bigint.h"
// Debug
int debug = 0;
#include "config.h"
// Stack
struct stack stack;
#define SIZE 1000
//Register
struct stack reg;
// Program
struct program program;
// SDA
struct sda sda;
unsigned fp;
void version(void) {
printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", 0, __DATE__, __TIME__);
bigFromInt(9);
bip.op1 = bip.res;
bigFromInt(10);
bip.op2 = bip.res;
bigAdd();
bip.op1 = bip.res;
bigPrint(stdout);
void version() {
printf("Ninja Virtual Machine version %i (compiled %s, %s)\n", PROJECT_VERSION, __DATE__, __TIME__);
}
void help(void) {
printf("Usage: ./njvm [options] <code file>\n\t--debug\tstart virtual machine in debug mode\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit\n");
void help() {
printf("usage: ./njvm [option] [option] ...\n\t--version\tshow version and exit\n\t--help\t\tshow this help and exit");
}
void execute(struct program program) {
int i;
int intInput;
unsigned int temp;
char charInput;
StackSlot tempSlot;
ObjRef tempObj;
for (i = 0; i < *program.size; ++i) {
if (debug == 1) debugMenu(fp,stack,&debug);
switch (program.program[i] >> 24) {
case HALT:
if (debug == 1) printf("halt\n");
goto end;
case PUSHC:
if (debug == 1) printf("pushc: %i\n", IMMEDIATE(program.program[i]));
push(stack, stackSlotWithObjRef(getIntObj(SIGN_EXTEND(IMMEDIATE(program.program[i])))));
break;
case ADD:
if (debug == 1) printf("add: %i + %i\n",peek(stack, 2),peek(stack, 1));
push(stack, stackSlotWithObjRef(getIntObj(getIntValfromStackSlot(pop(stack)) + getIntValfromStackSlot(pop(stack)))));
break;
case SUB:
if (debug == 1) printf("sub: %i - %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
push(stack, stackSlotWithObjRef(getIntObj(getIntValfromStackSlot(pop(stack)) - temp)));
break;
case MUL:
if (debug == 1) printf("mul: %i * %i\n", peek(stack, 2), peek(stack, 1));
push(stack, stackSlotWithObjRef(getIntObj(getIntValfromStackSlot(pop(stack)) * getIntValfromStackSlot(pop(stack)))));
break;
case DIV:
if (debug == 1) printf("div: %i / %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
push(stack, stackSlotWithObjRef(getIntObj(getIntValfromStackSlot(pop(stack)) / temp)));
break;
case MOD:
if (debug == 1) printf("mod: %i %% %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
push(stack, stackSlotWithObjRef(getIntObj(getIntValfromStackSlot(pop(stack)))));
break;
case RDINT:
if (debug == 1) printf("rdint\n");
scanf("%i", &intInput);
push(stack, stackSlotWithObjRef(getIntObj(intInput)));
if (debug == 1) printf("pushed %i\n", intInput);
break;
case WRINT:
if (debug == 1) printf("wrint: %i\n", peek(stack, 1));
printf("%i", getIntValfromStackSlot(pop(stack)));
break;
case RDCHR:
if (debug == 1) printf("rdchr\n");
scanf("%c", &charInput);
push(stack, stackSlotWithObjRef(getIntObj(charInput)));
if (debug == 1) printf("pushed %c\n", charInput);
break;
case WRCHR:
if (debug == 1) printf("wrchr: %c\n", peek(stack, 1));
printf("%c", getIntValfromStackSlot(pop(stack)));
break;
case PUSHG:
if (debug == 1) printf("pushg: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
push(stack, stackSlotWithObjRef(getSDA(SIGN_EXTEND(IMMEDIATE(program.program[i])), sda)));
break;
case POPG:
if (debug == 1) printf("popg: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
setSDA(SIGN_EXTEND(IMMEDIATE(program.program[i])), pop(stack).u.objRef, sda);
break;
case ASF:
if (debug == 1) printf("asf: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
push(stack, stackSlotWitchNumber(fp));
fp = *stack.current;
*stack.current = *stack.current + SIGN_EXTEND(IMMEDIATE(program.program[i]));
break;
case RSF:
if (debug == 1) printf("rsf: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
*stack.current = fp;
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
tempSlot = pop(stack) ;
fp = tempSlot.u.number;
break;
case POPL:
if (debug == 1) printf("popl: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
stack.stack[fp + SIGN_EXTEND(IMMEDIATE(program.program[i]))] = pop(stack);
break;
case PUSHL:
if (debug == 1) printf("pushl: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
push(stack, stack.stack[fp + SIGN_EXTEND(IMMEDIATE(program.program[i]))]);
break;
case NE:
if (debug == 1) printf("ne: %i != %i\n", peek(stack, 2), peek(stack, 1));
if (getIntValfromStackSlot(pop(stack)) != getIntValfromStackSlot(pop(stack))) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case EQ:
if (debug == 1) printf("eq: %i == %i\n", peek(stack, 2), peek(stack, 1));
if (getIntValfromStackSlot(pop(stack)) == getIntValfromStackSlot(pop(stack))) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case LT:
if (debug == 1) printf("lt: %i < %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
if (getIntValfromStackSlot(pop(stack)) < temp) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case LE:
if (debug == 1) printf("le: %i <= %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
if (getIntValfromStackSlot(pop(stack)) <= temp) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case GT:
if (debug == 1) printf("gt: %i > %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
if (getIntValfromStackSlot(pop(stack)) > temp) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case GE:
if (debug == 1) printf("ge: %i >= %i\n", peek(stack, 2), peek(stack, 1));
temp = getIntValfromStackSlot(pop(stack));
if (getIntValfromStackSlot(pop(stack)) >= temp) push(stack, stackSlotWithObjRef(getIntObj(1)));
else push(stack, stackSlotWithObjRef(getIntObj(0)));
break;
case BRF:
if (debug == 1) printf("brf: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
if (getIntValfromStackSlot(pop(stack)) == 0) {
i = SIGN_EXTEND(IMMEDIATE(program.program[i])) - 1;
if (debug == 1) printf("new i: %i\n", i);
}
break;
case BRT:
if (debug == 1) printf("brt: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
if (getIntValfromStackSlot(pop(stack)) == 1) {
i = SIGN_EXTEND(IMMEDIATE(program.program[i])) - 1;
if (debug == 1) printf("new i: %i\n", i);
}
break;
case JMP:
if (debug == 1) printf("jmp: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
i = SIGN_EXTEND(IMMEDIATE(program.program[i])) - 1;
if (debug == 1) printf("new i: %i\n", i);
break;
case CALL:
if (debug == 1) printf("call: %i\n", SIGN_EXTEND(IMMEDIATE(program.program[i])));
push(stack, stackSlotWitchNumber(i));
if (debug == 1) printf("push: %i\n", i + 1);
i = SIGN_EXTEND(IMMEDIATE(program.program[i])) - 1;
if (debug == 1) printf("new i: %i\n", i);
break;
case RET:
if (debug == 1) printf("ret\n");
if (debug == 1) printf("pop: %i\n", peek(stack, 1));
i = getIntValfromStackSlot(pop(stack));
if (debug == 1) printf("new i: %i\n", i);
break;
case DROP:
if(debug ==1) printf("drop\n");
*stack.current = *stack.current - SIGN_EXTEND(IMMEDIATE(program.program[i]));
break;
case DUP:
if (debug==1) printf("dup\n");
tempObj = pop(stack).u.objRef;
push(stack, stackSlotWithObjRef(tempObj));
push(stack, stackSlotWithObjRef(tempObj));
break;
case POPR:
if (debug==1) printf("popr") ;
push(reg, pop(stack));
break;
case PUSHR:
if(debug == 1) printf("pushr");
push(stack, pop(reg));
break;
void printArgs(int argc, char *argv[]){
for (int i = 0; i < argc; ++i) {
printf("%s\n", argv[i]);
}
}
void useption(int argc, char *argv[]){
if (argc > 1) {
if (strcmp(argv[1], "--version") == 0) {
version();
} else if (strcmp(argv[1], "--help") == 0) {
help();
} else if (argc != 0) {
printf("unknown command line argument '%s', try './njvm --help'", argv[1]);
}
}
end:
return;
}
void tests(void) {
}
int main(int argc, char *argv[]) {
// Initialize the Stack
int size = SIZE;
int current = 0;
StackSlot s[SIZE];
stack.size = &size;
stack.current = &current;
stack.stack = s;
printArgs(argc,argv);
if (argc > 1) useption(argc,argv);
else {
// Initialize the registery
int rSize = SIZE;
int rCurrent = 0;
StackSlot r[SIZE];
reg.size = &rSize;
reg.current = &rCurrent;
reg.stack = r;
// Initialize ProgrammSpeicher
int psize = 1000;
int saveProgram = 0;
unsigned int p[1000];
program.size = &psize;
program.program = p;
program.saveProgram = &saveProgram;
int run = 0;
int sizeSDA;
if (argc > 1) {
for (int i = 1; i < argc; ++i) {
if (strcmp(argv[i], "--debug") == 0) {
debug = 1;
} else if (strcmp(argv[i], "--version") == 0) {
version();
return 0;
} else if (strcmp(argv[i], "--help") == 0) {
help();
return 0;
} else if (strcmp(argv[i], "--stack") == 0) {
i++;
// TODO: implement stack size
} else if(strcmp(argv[i], "--heap") == 0) {
i++;
// TODO: implement heap size
} else {
sizeSDA = fromFile(argv[i], program);
run = 1;
}
}
}
if (debug) {
tests();
}
if (run) {
// Started
printf("Ninja Virtual Machine started\n");
ObjRef s[sizeSDA];
sda.size = &sizeSDA;
sda.sda = s;
if (debug == 1) printProgram(program);
execute(program);
// Stopped
printf("Ninja Virtual Machine stopped\n");
} else {
printf("Error: no code file specified\n");
return 1;
return 0;
}
}

BIN
njvm.o

Binary file not shown.

View File

@@ -1,10 +0,0 @@
#ifndef OBJREF
#define OBJREF
typedef struct {
unsigned int size;
unsigned char data[1];
} *ObjRef;
#endif /* ifndef OBJREF
#define OBJREF */

BIN
prog.bin

Binary file not shown.

134
program.c
View File

@@ -1,134 +0,0 @@
/*
* Created by Nils on 30.10.2023.
*/
#ifndef PROGRAM
#define PROGRAM
#include <string.h>
#include "instruktion.c"
#include <stdio.h>
struct program {
int *size;
unsigned int *program;
int *saveProgram;
};
void copyToProgram(const unsigned int codeToCopy[], int size, struct program program) {
for (int i = 0; i < size; ++i) {
program.program[i] = codeToCopy[i];
}
*program.size = size;
*program.saveProgram = 1;
}
void printProgram(struct program program) {
char c[10];
for (int i = 0; i < *program.size; i++) {
switch (program.program[i] >> 24) {
case PUSHC:
strcpy(c, "pushc");
break;
case ADD:
strcpy(c, "add");
break;
case SUB:
strcpy(c, "sub");
break;
case MUL:
strcpy(c, "mul");
break;
case DIV:
strcpy(c, "div");
break;
case MOD:
strcpy(c, "mod");
break;
case RDINT:
strcpy(c, "rdint");
break;
case WRINT:
strcpy(c, "wrint");
break;
case RDCHR:
strcpy(c, "rdchr");
break;
case WRCHR:
strcpy(c, "wrchr");
break;
case HALT:
strcpy(c, "halt");
break;
case PUSHG :
strcpy(c, "pushg");
break;
case POPG:
strcpy(c, "popg");
break;
case ASF:
strcpy(c, "asf");
break;
case RSF:
strcpy(c, "rsf");
break;
case PUSHL:
strcpy(c, "pushl");
break;
case POPL:
strcpy(c, "popl");
break;
case EQ:
strcpy(c, "eq");
break;
case NE:
strcpy(c, "ne");
break;
case LT:
strcpy(c, "lt");
break;
case LE:
strcpy(c, "le");
break;
case GT:
strcpy(c, "gt");
break;
case GE:
strcpy(c, "ge");
break;
case JMP:
strcpy(c, "jmp");
break;
case BRF:
strcpy(c, "brf");
break;
case BRT:
strcpy(c, "brt");
break;
case CALL:
strcpy(c, "call");
break;
case RET:
strcpy(c, "ret");
break;
case DROP:
strcpy(c, "drop");
break;
case PUSHR:
strcpy(c, "pushr");
break;
case POPR:
strcpy(c, "popr");
break;
case DUP:
strcpy(c, "dup");
break;
default:
strcpy(c, "ERROR");
break;
}
IMMEDIATE(program.program[i]) ? printf("%03i:\t%s\t%i\n", i, c, SIGN_EXTEND(IMMEDIATE(program.program[i]))) : printf(
"%03i:\t%s\n", i, c);
}
}
#endif /* ifndef PROGRAMM */

Binary file not shown.

View File

@@ -1,28 +0,0 @@
//
// prog02.asm -- call/ret with args, but without ret value
//
asf 3
pushc 11
pushc 33
call proc
drop 2
rsf
halt
proc:
asf 2
pushl -4
wrint
pushc '\n'
wrchr
pushc 22
wrint
pushc '\n'
wrchr
pushl -3
wrint
pushc '\n'
wrchr
rsf
ret

Binary file not shown.

View File

@@ -1,32 +0,0 @@
//
// prog04.asm -- call/ret with args, and with ret value
//
asf 3
pushc 11
wrint
pushc '\n'
wrchr
pushc 11
pushc 33
call proc
drop 2
pushr
wrint
pushc '\n'
wrchr
pushc 33
wrint
pushc '\n'
wrchr
rsf
halt
proc:
asf 2
pushl -3
pushl -4
sub
popr
rsf
ret

View File

@@ -1,31 +0,0 @@
//
// prog1.asm -- an assembler example with global variables
//
// global Integer x;
// global Integer y;
// x = 2;
// y = x + 3;
// x = 7 * y + x;
// writeInteger(x + -33);
// writeCharacter('\n');
pushc 2
popg 0
pushg 0
pushc 3
add
popg 1
pushc 7
pushg 1
mul
pushg 0
add
popg 0
pushg 0
pushc -33
add
wrint
pushc '\n'
wrchr
halt

Some files were not shown because too many files have changed in this diff Show More