[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnet/engine cvm_dasm.c,1.51,1.52 cvmc.c,1.37
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnet/engine cvm_dasm.c,1.51,1.52 cvmc.c,1.37,1.38 cvmc_gen.h,1.8,1.9 ilrun.c,1.30,1.31 ilverify.c,1.28,1.29 lib_info.c,1.1,1.2 lib_socket.c,1.11,1.12 lib_stdio.c,1.3,1.4 lib_string.c,1.31,1.32 lib_task.c,1.5,1.6 process.c,1.43,1.44 register.c,1.2,1.3 throw.c,1.4,1.5 unroll_arm.c,1.1,1.2 unroll_x86.c,1.12,1.13 |
Date: |
Thu, 15 May 2003 02:02:09 -0400 |
Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv11115/engine
Modified Files:
cvm_dasm.c cvmc.c cvmc_gen.h ilrun.c ilverify.c lib_info.c
lib_socket.c lib_stdio.c lib_string.c lib_task.c process.c
register.c throw.c unroll_arm.c unroll_x86.c
Log Message:
Port the rest of the "engine" directory to m68k-palmos.
Index: cvm_dasm.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvm_dasm.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** cvm_dasm.c 1 May 2003 10:29:08 -0000 1.51
--- cvm_dasm.c 15 May 2003 06:02:07 -0000 1.52
***************
*** 19,22 ****
--- 19,24 ----
*/
+ #ifndef IL_WITHOUT_TOOLS
+
#include "il_dumpasm.h"
#include "engine.h"
***************
*** 1142,1143 ****
--- 1144,1148 ----
};
#endif
+
+ #endif /* IL_WITHOUT_TOOLS */
+
Index: cvmc.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -r1.37 -r1.38
*** cvmc.c 15 May 2003 04:30:18 -0000 1.37
--- cvmc.c 15 May 2003 06:02:07 -0000 1.38
***************
*** 23,27 ****
--- 23,29 ----
#include "il_opcodes.h"
#include "il_utils.h"
+ #ifndef IL_WITHOUT_TOOLS
#include "il_dumpasm.h"
+ #endif
#include "cvm.h"
#include "lib_defs.h"
Index: cvmc_gen.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/cvmc_gen.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** cvmc_gen.h 14 May 2003 07:09:55 -0000 1.8
--- cvmc_gen.h 15 May 2003 06:02:07 -0000 1.9
***************
*** 1133,1136 ****
--- 1133,1137 ----
_CVM_OUT_PTR2(opcode, value1, value2);
}
+ #ifdef IL_CONFIG_VARARGS
static void cvmp_out_word2_ptr(ILCoder *coder, int opcode,
ILInt32 value1,
ILInt32 value2, void *value3)
***************
*** 1138,1141 ****
--- 1139,1143 ----
_CVMP_OUT_WORD2_PTR(opcode, value1, value2, value3);
}
+ #endif
static void cvmp_out_word2_ptr2(ILCoder *coder, int opcode,
ILInt32 value1,
ILInt32 value2,
Index: ilrun.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilrun.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** ilrun.c 15 May 2003 04:30:18 -0000 1.30
--- ilrun.c 15 May 2003 06:02:07 -0000 1.31
***************
*** 37,40 ****
--- 37,42 ----
int _ILUnregisterFromKernel(void);
+ #ifndef IL_WITHOUT_TOOLS
+
/*
* Imports from "cvm_dasm.c".
***************
*** 48,51 ****
--- 50,54 ----
int _ILDumpMethodProfile(FILE *stream, ILExecProcess *process);
+ #endif
/*
***************
*** 263,267 ****
--- 266,272 ----
if(!process)
{
+ #ifndef REDUCED_STDIO
fprintf(stderr, "%s: could not create process\n", progname);
+ #endif
return 1;
}
***************
*** 298,304 ****
--- 303,314 ----
if(error < 0)
{
+ #ifndef REDUCED_STDIO
perror(ilprogram);
+ #else
+ printf("%s: could not open file", ilprogram);
+ #endif
return 1;
}
+ #if !defined(__palmos__)
else if(error == IL_LOADERR_NOT_IL)
{
***************
*** 320,326 ****
--- 330,341 ----
#endif
}
+ #endif
else if(error > 0)
{
+ #ifndef REDUCED_STDIO
fprintf(stderr, "%s: %s\n", ilprogram, ILImageLoadError(error));
+ #else
+ printf("%s: %s\n", ilprogram, ILImageLoadError(error));
+ #endif
return 1;
}
***************
*** 330,334 ****
--- 345,353 ----
if(!method)
{
+ #ifndef REDUCED_STDIO
fprintf(stderr, "%s: no program entry point\n", ilprogram);
+ #else
+ printf("%s: no program entry point\n", ilprogram);
+ #endif
ILExecProcessDestroy(process);
return 1;
***************
*** 338,342 ****
--- 357,365 ----
if(ILExecProcessEntryType(method) == IL_ENTRY_INVALID)
{
+ #ifndef REDUCED_STDIO
fprintf(stderr, "%s: invalid entry point\n", ilprogram);
+ #else
+ printf("%s: invalid entry point\n", ilprogram);
+ #endif
ILExecProcessDestroy(process);
return 1;
***************
*** 420,428 ****
static void usage(const char *progname)
{
! fprintf(stdout, "ILRUN " VERSION " - IL Program Runtime\n");
! fprintf(stdout, "Copyright (c) 2001 Southern Storm Software, Pty
Ltd.\n");
! fprintf(stdout, "\n");
! fprintf(stdout, "Usage: %s [options] program [args]\n", progname);
! fprintf(stdout, "\n");
ILCmdLineHelp(options);
}
--- 443,451 ----
static void usage(const char *progname)
{
! printf("ILRUN " VERSION " - IL Program Runtime\n");
! printf("Copyright (c) 2001 Southern Storm Software, Pty Ltd.\n");
! printf("\n");
! printf("Usage: %s [options] program [args]\n", progname);
! printf("\n");
ILCmdLineHelp(options);
}
Index: ilverify.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/ilverify.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** ilverify.c 15 May 2003 04:30:18 -0000 1.28
--- ilverify.c 15 May 2003 06:02:07 -0000 1.29
***************
*** 19,22 ****
--- 19,24 ----
*/
+ #if !defined(__palmos__)
+
#include <stdio.h>
#include "engine.h"
***************
*** 239,240 ****
--- 241,251 ----
};
#endif
+
+ #else /* __palmos__ */
+
+ int main(int argc, char *argv[])
+ {
+ return 0;
+ }
+
+ #endif /* __palmos__ */
Index: lib_info.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_info.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** lib_info.c 28 Nov 2002 22:56:54 -0000 1.1
--- lib_info.c 15 May 2003 06:02:07 -0000 1.2
***************
*** 85,88 ****
--- 85,89 ----
ILString *_IL_InfoMethods_GetUserName(ILExecThread *thread)
{
+ #if !defined(__palmos__)
if(!ILImageIsSecure(_ILClrCallerImage(thread)))
{
***************
*** 107,110 ****
--- 108,114 ----
return ILStringCreate(thread, "nobody");
}
+ #else
+ return ILStringCreate(thread, "nobody");
+ #endif
}
Index: lib_socket.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_socket.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** lib_socket.c 3 Apr 2003 05:39:33 -0000 1.11
--- lib_socket.c 15 May 2003 06:02:07 -0000 1.12
***************
*** 39,42 ****
--- 39,44 ----
#endif
+ #ifdef IL_CONFIG_NETWORKING
+
/*
* public static IntPtr GetInvalidHandle();
***************
*** 632,633 ****
--- 634,637 ----
return ToIPHostEntry(_thread,h_ent,h_name,h_aliases,h_addr_list);
}
+
+ #endif /* IL_CONFIG_NETWORKING */
Index: lib_stdio.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_stdio.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** lib_stdio.c 14 Jun 2002 05:31:34 -0000 1.3
--- lib_stdio.c 15 May 2003 06:02:07 -0000 1.4
***************
*** 53,56 ****
--- 53,57 ----
void _IL_Stdio_StdFlush(ILExecThread *thread, ILInt32 fd)
{
+ #ifndef REDUCED_STDIO
switch(fd)
{
***************
*** 59,62 ****
--- 60,64 ----
case 2: fflush(stderr); break;
}
+ #endif
}
***************
*** 66,69 ****
--- 68,72 ----
void _IL_Stdio_StdWrite_ic(ILExecThread *thread, ILInt32 fd, ILUInt16 value)
{
+ #ifndef REDUCED_STDIO
switch(fd)
{
***************
*** 71,74 ****
--- 74,80 ----
case 2: putc((value & 0xFF), stderr); break;
}
+ #else
+ putchar(value);
+ #endif
}
***************
*** 78,81 ****
--- 84,88 ----
static void StdWrite(ILInt32 fd, ILUInt16 *buf, ILInt32 length)
{
+ #ifndef REDUCED_STDIO
if(fd == 1)
{
***************
*** 96,99 ****
--- 103,114 ----
}
}
+ #else
+ while(length > 0)
+ {
+ putchar((*buf & 0xFF));
+ ++buf;
+ --length;
+ }
+ #endif
}
***************
*** 115,118 ****
--- 130,134 ----
ILInt32 count)
{
+ #ifndef REDUCED_STDIO
if(fd == 1)
{
***************
*** 123,126 ****
--- 139,152 ----
fwrite(((ILUInt8 *)ArrayToBuffer(value)) + index, 1, count,
stderr);
}
+ #else
+ unsigned char *buf;
+ buf = ((unsigned char *)(ArrayToBuffer(value))) + index;
+ while(count > 0)
+ {
+ putchar((*buf & 0xFF));
+ ++buf;
+ --count;
+ }
+ #endif
}
***************
*** 144,147 ****
--- 170,174 ----
ILInt32 _IL_Stdio_StdRead_i(ILExecThread *thread, ILInt32 fd)
{
+ #ifndef REDUCED_STDIO
if(fd == 0)
{
***************
*** 152,155 ****
--- 179,185 ----
return -1;
}
+ #else
+ return -1;
+ #endif
}
***************
*** 161,164 ****
--- 191,195 ----
ILInt32 count)
{
+ #ifndef REDUCED_STDIO
ILUInt16 *buf = ((ILUInt16 *)(ArrayToBuffer(value))) + index;
ILInt32 result = 0;
***************
*** 179,182 ****
--- 210,216 ----
}
return result;
+ #else
+ return -1;
+ #endif
}
***************
*** 188,191 ****
--- 222,226 ----
ILInt32 count)
{
+ #ifndef REDUCED_STDIO
if(fd != 0)
{
***************
*** 194,197 ****
--- 229,235 ----
return (ILInt32)(fread(((ILUInt8 *)ArrayToBuffer(value)) + index,
1, count, stdin));
+ #else
+ return -1;
+ #endif
}
***************
*** 201,204 ****
--- 239,243 ----
ILInt32 _IL_Stdio_StdPeek(ILExecThread *thread, ILInt32 fd)
{
+ #ifndef REDUCED_STDIO
if(fd == 0)
{
***************
*** 214,217 ****
--- 253,259 ----
return -1;
}
+ #else
+ return -1;
+ #endif
}
Index: lib_string.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_string.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** lib_string.c 28 Jan 2003 06:25:01 -0000 1.31
--- lib_string.c 15 May 2003 06:02:07 -0000 1.32
***************
*** 789,797 ****
* public int IndexOf(char value, int startIndex, int count);
*/
! int _IL_String_IndexOf(ILExecThread *thread,
! System_String *_this,
! ILUInt16 value,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
--- 789,797 ----
* public int IndexOf(char value, int startIndex, int count);
*/
! ILInt32 _IL_String_IndexOf(ILExecThread *thread,
! System_String *_this,
! ILUInt16 value,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
***************
*** 828,836 ****
* public int IndexOfAny(char[] anyOf, int startIndex, int count);
*/
! int _IL_String_IndexOfAny(ILExecThread *thread,
! System_String *_this,
! System_Array *anyOf,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
--- 828,836 ----
* public int IndexOfAny(char[] anyOf, int startIndex, int count);
*/
! ILInt32 _IL_String_IndexOfAny(ILExecThread *thread,
! System_String *_this,
! System_Array *anyOf,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
***************
*** 888,896 ****
* public int LastIndexOf(char value, int startIndex, int count);
*/
! int _IL_String_LastIndexOf(ILExecThread *thread,
! System_String *_this,
! ILUInt16 value,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
--- 888,896 ----
* public int LastIndexOf(char value, int startIndex, int count);
*/
! ILInt32 _IL_String_LastIndexOf(ILExecThread *thread,
! System_String *_this,
! ILUInt16 value,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
***************
*** 934,942 ****
* public int LastIndexOfAny(char[] anyOf, int startIndex, int count);
*/
! int _IL_String_LastIndexOfAny(ILExecThread *thread,
! System_String *_this,
! System_Array *anyOf,
! ILInt32 startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
--- 934,942 ----
* public int LastIndexOfAny(char[] anyOf, int startIndex, int count);
*/
! ILInt32 _IL_String_LastIndexOfAny(ILExecThread *thread,
! System_String
*_this,
! System_Array
*anyOf,
! ILInt32
startIndex,
! ILInt32 count)
{
ILUInt16 *buf;
Index: lib_task.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/lib_task.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** lib_task.c 12 Apr 2003 02:54:30 -0000 1.5
--- lib_task.c 15 May 2003 06:02:07 -0000 1.6
***************
*** 32,36 ****
--- 32,38 ----
void _IL_TaskMethods_Exit(ILExecThread *thread, ILInt32 exitCode)
{
+ #if !defined(__palmos__)
exit((int)(exitCode & 0xFF));
+ #endif
}
***************
*** 57,60 ****
--- 59,63 ----
(ILExecThread *thread, ILString *name)
{
+ #if !defined(__palmos__)
char *nameAnsi = ILStringToAnsi(thread, name);
char *env;
***************
*** 67,70 ****
--- 70,74 ----
}
}
+ #endif
return 0;
}
Index: process.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/process.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -r1.43 -r1.44
*** process.c 18 Apr 2003 09:15:52 -0000 1.43
--- process.c 15 May 2003 06:02:07 -0000 1.44
***************
*** 288,291 ****
--- 288,293 ----
}
+ #ifndef REDUCED_STDIO
+
int ILExecProcessLoadImage(ILExecProcess *process, FILE *file)
{
***************
*** 302,305 ****
--- 304,309 ----
return loadError;
}
+
+ #endif
int ILExecProcessLoadFile(ILExecProcess *process, const char *filename)
Index: register.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/register.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** register.c 1 Apr 2002 05:23:22 -0000 1.2
--- register.c 15 May 2003 06:02:07 -0000 1.3
***************
*** 162,169 ****
--- 162,171 ----
int _ILRegisterWithKernel(const char *progname)
{
+ #ifndef REDUCED_STDIO
/* We normally won't get here because of the #ifdef's in "ilrun.c",
but if we do, then print an error message */
fprintf(stderr, "%s: the operating system does not support
registration\n",
progname);
+ #endif
return 1;
}
Index: throw.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/throw.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** throw.c 26 Dec 2002 09:26:39 -0000 1.4
--- throw.c 15 May 2003 06:02:07 -0000 1.5
***************
*** 199,202 ****
--- 199,203 ----
void ILExecThreadPrintException(ILExecThread *thread)
{
+ #ifndef REDUCED_STDIO
ILObject *exception;
ILString *str;
***************
*** 310,313 ****
--- 311,315 ----
}
}
+ #endif
}
Index: unroll_arm.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/unroll_arm.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** unroll_arm.c 4 May 2003 21:45:34 -0000 1.1
--- unroll_arm.c 15 May 2003 06:02:07 -0000 1.2
***************
*** 24,29 ****
#include "cvm_config.h"
#include "cvm_format.h"
- #include "arm_codegen.h"
- #include "il_dumpasm.h"
#ifdef __cplusplus
--- 24,27 ----
***************
*** 32,35 ****
--- 30,36 ----
#ifdef IL_CVM_DIRECT_UNROLLED_ARM
+
+ #include "arm_codegen.h"
+ #include "il_dumpasm.h"
/*
Index: unroll_x86.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/unroll_x86.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** unroll_x86.c 4 May 2003 21:45:34 -0000 1.12
--- unroll_x86.c 15 May 2003 06:02:07 -0000 1.13
***************
*** 24,29 ****
#include "cvm_config.h"
#include "cvm_format.h"
- #include "x86_codegen.h"
- #include "il_dumpasm.h"
#ifdef __cplusplus
--- 24,27 ----
***************
*** 32,35 ****
--- 30,36 ----
#ifdef IL_CVM_DIRECT_UNROLLED_X86
+
+ #include "x86_codegen.h"
+ #include "il_dumpasm.h"
/*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnet/engine cvm_dasm.c,1.51,1.52 cvmc.c,1.37,1.38 cvmc_gen.h,1.8,1.9 ilrun.c,1.30,1.31 ilverify.c,1.28,1.29 lib_info.c,1.1,1.2 lib_socket.c,1.11,1.12 lib_stdio.c,1.3,1.4 lib_string.c,1.31,1.32 lib_task.c,1.5,1.6 process.c,1.43,1.44 register.c,1.2,1.3 throw.c,1.4,1.5 unroll_arm.c,1.1,1.2 unroll_x86.c,1.12,1.13,
Rhys Weatherley <address@hidden> <=