Skip to content

Commit 357b13b

Browse files
Alfred Arnoldflamewing
Alfred Arnold
authored andcommitted
asl-current-142-bld205
1 parent 9f6b3bd commit 357b13b

File tree

167 files changed

+6457
-5474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+6457
-5474
lines changed

Makefile.def-samples/Makefile.def-x86_64-w32_w64-on-linux

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ TARG_EXEXTENSION = $(HOST_EXEXTENSION)
7373
#TARG_EXEXTENSION =
7474
#TARG_RUNCMD = qemu-ppc-static
7575

76+
#TARG_OBJDIR = ppc64-linux/
77+
#TARG_CC = powerpc64-linux-gnu-gcc
78+
#TARG_CFLAGS = $(CFLAGS)
79+
#TARG_OBJEXTENSION = .o
80+
#TARG_LD = $(TARG_CC)
81+
#TARG_LDFLAGS = $(LDFLAGS) -static
82+
#TARG_EXEXTENSION =
83+
#TARG_RUNCMD = qemu-ppc64-static
84+
7685
# -------------------------------------------------------------------------
7786
# directories where binaries, includes, and manpages should go during
7887
# installation

addrspace.c

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* addrspace.c */
2+
/*****************************************************************************/
3+
/* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only */
4+
/* */
5+
/* AS */
6+
/* */
7+
/* Address Space enumeration */
8+
/* */
9+
/*****************************************************************************/
10+
11+
#include "strutil.h"
12+
#include "addrspace.h"
13+
14+
const char *SegNames[SegCountPlusStruct] =
15+
{
16+
"NOTHING", "CODE", "DATA", "IDATA", "XDATA", "YDATA",
17+
"BITDATA", "IO", "REG", "ROMDATA", "EEDATA", "STRUCT"
18+
};
19+
20+
char SegShorts[SegCountPlusStruct] =
21+
{
22+
'-','C','D','I','X','Y','B','P','R','O','E','S'
23+
};
24+
25+
/*!------------------------------------------------------------------------
26+
* \fn addrspace_lookup(const char *p_name)
27+
* \brief look up address space's name
28+
* \param p_name name in source
29+
* \return enum or SegCountPlusStruct if not found
30+
* ------------------------------------------------------------------------ */
31+
32+
as_addrspace_t addrspace_lookup(const char *p_name)
33+
{
34+
as_addrspace_t res;
35+
36+
for (res = SegNone; res < SegCountPlusStruct; res++)
37+
if (!as_strcasecmp(p_name, SegNames[res]))
38+
break;
39+
return res;
40+
}

addrspace.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#ifndef _ADDRSPACE_H
2+
#define _ADDRSPACE_H
3+
/* addrspace.h */
4+
/*****************************************************************************/
5+
/* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only */
6+
/* */
7+
/* AS */
8+
/* */
9+
/* Address Space enumeration */
10+
/* */
11+
/*****************************************************************************/
12+
13+
/* NOTE: these constants are used in the .P files, so DO NOT CHANGE existing
14+
enums; only attach new enums at the end! */
15+
16+
typedef enum
17+
{
18+
SegNone = 0,
19+
SegCode = 1,
20+
SegData = 2,
21+
SegIData = 3,
22+
SegXData = 4,
23+
SegYData = 5,
24+
SegBData = 6,
25+
SegIO = 7,
26+
SegReg = 8,
27+
SegRData = 9,
28+
SegEEData = 10,
29+
SegCount = 11,
30+
StructSeg = SegCount,
31+
SegCountPlusStruct = 12
32+
} as_addrspace_t;
33+
34+
#ifdef __cplusplus
35+
#include "cppops.h"
36+
DefCPPOps_Enum(as_addrspace_t)
37+
#endif
38+
39+
extern const char *SegNames[SegCountPlusStruct];
40+
extern char SegShorts[SegCountPlusStruct];
41+
42+
extern as_addrspace_t addrspace_lookup(const char *p_name);
43+
44+
#endif /* _ADDRSPACE_H */

alink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static FILE *TargFile;
6868
static Byte *Buffer;
6969
LongInt BufferSize;
7070

71-
static LargeWord SegStarts[PCMax + 1];
71+
static LargeWord SegStarts[SegCount];
7272

7373
/****************************************************************************/
7474
/* increase buffer if necessary */

0 commit comments

Comments
 (0)