Commit bb654fc3 authored by Martin Ruckert's avatar Martin Ruckert

renaming .vmb to .cpu greating the configcpu project. clearing caches when booting

parent 9a1a7f1a
#ifndef LIBCONFIG_H
#define LIBCONFIG_H
/* This this the libconfig.h file for MMIXCPU rename to libconfig.h */
#ifdef WIN32
#pragma warning(disable : 4996)
#endif
......@@ -26,16 +28,17 @@
#define MMIX_STORE_IVTC(virt,phys) store_exec_translation(&(virt),&(phys))
#define MMIX_STORE_DVTC(virt,phys) store_data_translation(&(virt),&(phys))
#define MMIX_DELAY(ms,d) d = vmb_wait_for_event_timed(&vmb,ms)
#ifdef WIN32
#define MMIX_DELAY(ms,d) ((d) = wait_time(ms))
#else
#define MMIX_DELAY(ms,d) (usleep(1000*(ms)), d=(ms))
#endif
/* define this to check for external asynchronous ineterrupts*/
#define MMIX_GET_INTERRUPT \
if (vmb_get_interrupt(&vmb,&new_Q.h,&new_Q.l)==1) \
{ g[rQ].h |= new_Q.h; g[rQ].l |= new_Q.l; }
/* define this to check for external asynchronous interrupts*/
#define MMIX_GET_INTERRUPT get_interrupt(&new_Q)
/* this code is executed when MMIX enters the handler for Ctrl-C */
#define MMIX_CTRL_HANDLER vmb_cancel_wait_for_event(&vmb); show_operating_system=true;
#define MMIX_CTRL_HANDLER (cancel_wait(), show_operating_system=true)
/* this code defines additional command line options */
#define MMIX_OPTIONS \
......@@ -61,20 +64,12 @@ if (vmb_get_interrupt(&vmb,&new_Q.h,&new_Q.l)==1) \
otherwise it will resume at Main */
#define MMIX_BOOT
/* if MMIX_PRINT is defined the mmixoutput is redirected from stdin or stderr */
#undef MMIX_PRINT
#ifdef MMIX_PRINT
extern int mmix_printf(char *format,...);
extern int mmix_fputc(int c, FILE *f);
#define printf(...) mmix_printf(__VA_ARGS__)
#define fprintf(file,...) mmix_printf(__VA_ARGS__)
#define fputc(c,f) mmix_fputc(c,f)
#endif
/* this action is executed when ther is no mmo file on the command line */
/* this action is executed when there is no mmo file on the command line */
#define MMIX_NO_FILE
/* define this to get the real TRAP implementation not the MMIXWARE fake TRAPS */
#define MMIX_TRAP
......@@ -82,7 +77,7 @@ extern int mmix_fputc(int c, FILE *f);
#define MMIX_ERROR(f,m) fprintf(stderr,f,m)
/* define this if you need the tetra inside the mem_node */
#define MMIX_MEM_TET /* tetra tet; the tetrabyte of simulated memory */
#undef MMIX_MEM_TET /* tetra tet; the tetrabyte of simulated memory */
/* these are the functions for the instructions not implemented in the basic mmix simulator */
#define MMIX_WRITE_DCACHE() write_all_data_cache()
......@@ -99,10 +94,6 @@ extern int mmix_fputc(int c, FILE *f);
#define MMXIAL_LINE_TRUNCATED fprintf(stderr,"(say `-b <number>' to increase the length of my input buffer)\n");
/* MMIXAL has its own notion of file numbers as embedded in the mmo file
we might want to convert this to a global file number */
#define MMIX_FILE_NO(file_no) (file_no)
/* define this to record file line and location associations while assembling */
#define MMIXAL_LINE_LOC(file_no,line_no,cur_loc)
......
#include "../../vmbmmixlib/address.h"
#include "../../vmbmmixlib/mmix-bus.h"
#include "vmb.h"
#include "address.h"
#include "mmix-bus.h"
extern device_info vmb;
......@@ -2062,6 +2062,10 @@ extern void dump_tet(tetra t);
void mmix_boot(void)
{
@<Boot the machine@>;
MMIX_CLEAR_DVTC();
MMIX_CLEAR_IVTC();
MMIX_CLEAR_ICACHE();
MMIX_CLEAR_DCACHE();
#ifdef MMIX_BOOT
loc.h=inst_ptr.h=0x80000000;
loc.l=inst_ptr.l=0x00000000;
......
......@@ -24,7 +24,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description=""
CommandLine=""
/>
<Tool
......@@ -46,7 +45,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;VMB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
......@@ -90,7 +89,6 @@
>
<Tool
Name="VCPreBuildEventTool"
Description=""
CommandLine=""
/>
<Tool
......@@ -771,7 +769,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying include file boilerplate.w"
CommandLine="copy $(InputDir)mmixware\boilerplate.w $(InputDir)boilerplate.w"
CommandLine="copy $(InputDir)mmixware\boilerplate.w $(InputDir)boilerplate.w&#x0D;&#x0A;"
AdditionalDependencies="$(InputDir)mmixware\boilerplate.w"
Outputs="$(InputDir)boilerplate.w"
/>
......@@ -782,7 +780,7 @@
<Tool
Name="VCCustomBuildTool"
Description="Copying include file boilerplate.w"
CommandLine="copy $(InputDir)mmixware\boilerplate.w $(InputDir)boilerplate.w"
CommandLine="copy $(InputDir)mmixware\boilerplate.w $(InputDir)boilerplate.w&#x0D;&#x0A;"
AdditionalDependencies="$(InputDir)mmixware\boilerplate.w"
Outputs="$(InputDir)boilerplate.w"
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment