Copyright (c) 2020 Peter Hsu. All Rights Reserved. See LICENCE file for details.
*/
+#pragma once
#define F32_SIGN (0x1 << 31)
#define F64_SIGN (0x1L << 63)
Copyright (c) 2020 Peter Hsu. All Rights Reserved. See LICENCE file for details.
*/
-#ifndef CAVEAT_H
-#define CAVEAT_H
+#pragma once
/*
Caveat trace records are a kind of instruction set with a 7-bit 'opcode'.
void help_exit();
int parse_options( const char** argv );
-
-
-
-#endif
+#pragma once
+
#define SOFT_FP
#ifndef NO_FP_MACROS
#define FMADD32( rm, rd, rs1, rs2, rs3) SRM(rm); FR(rd).f32 = f32_mulAdd( F32(rs1), F32(rs2), F32(rs3)); SET_FPX; SRM(cpu->state.fcsr.rmode);
Copyright (c) 2020 Peter Hsu. All Rights Reserved. See LICENCE file for details.
*/
+#pragma once
#define sex(rd) IR(rd).l = IR(rd).l << 32 >> 32
#define zex(rd) IR(rd).ul = IR(rd).ul << 32 >> 32
int proxy_ecall( struct core_t* cpu );
void proxy_csr( struct core_t* cpu, const struct insn_t* p, int which );
void status_report(struct core_t* cpu, FILE*);
-
Copyright (c) 2020 Peter Hsu. All Rights Reserved. See LICENCE file for details.
*/
+#pragma once
+
#ifdef __cplusplus
extern "C" {
#endif
Copyright (c) 2020 Peter Hsu. All Rights Reserved. See LICENCE file for details.
*/
+#pragma once
+
#include <unistd.h>
#include <sys/syscall.h>
#include <linux/futex.h>
// See LICENSE for license details.
-
-#ifndef SIM_BODY_H
-#define SIM_BODY_H
-
+#pragma once
#define IR(rn) cpu->reg[rn]
#define FR(rn) cpu->reg[rn]
cpu->pc = PC; // program counter cached in register
cpu->counter.insn_executed += max_count-countdown;
}
-
-
-#endif