Skip to content

Commit

Permalink
Update to nightly 2019-07-04
Browse files Browse the repository at this point in the history
  • Loading branch information
mbitsnbites committed Jul 4, 2019
1 parent 1d8698e commit b2b4569
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 21 deletions.
4 changes: 2 additions & 2 deletions cpus/m68k/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct cpu_models models[] = {
int model_cnt = sizeof(models)/sizeof(models[0]);


char *cpu_copyright="vasm M68k/CPU32/ColdFire cpu backend 2.3e (c) 2002-2019 Frank Wille";
char *cpu_copyright="vasm M68k/CPU32/ColdFire cpu backend 2.3f (c) 2002-2019 Frank Wille";
char *cpuname = "M68k";
int bitsperbyte = 8;
int bytespertaddr = 4;
Expand Down Expand Up @@ -5120,7 +5120,7 @@ int cpu_args(char *arg)
else if (!strcmp(p,"-opt-brajmp"))
opt_brajmp = !no_opt;
else if (!strcmp(p,"-opt-allbra"))
opt_allbra = !no_opt;
opt_bra = opt_allbra = !no_opt;
else if (!strcmp(p,"-opt-jbra"))
opt_jbra = !no_opt;
else if (!strcmp(p,"-opt-speed"))
Expand Down
4 changes: 2 additions & 2 deletions cpus/z80/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ mnemonic mnemonics[] = {

int mnemonic_cnt=sizeof(mnemonics)/sizeof(mnemonics[0]);

char *cpu_copyright="vasm 8080/gbz80/z80/z180/rcmX000 cpu backend 0.3 (c) 2007,2009 Dominic Morris";
char *cpu_copyright="vasm 8080/gbz80/z80/z180/rcmX000 cpu backend 0.3a (c) 2007,2009 Dominic Morris";
char *cpuname = "z80";
int bitsperbyte = 8;
int bytespertaddr = 2;
Expand Down Expand Up @@ -934,7 +934,7 @@ int parse_operand(char *p, int len, operand *op, int optype)

if ( optype & OP_ARITH16 ) {

if ( (opt & OP_ARITH16) == 0 ||
if ( (opt & OP_ARITH16) == 0 || (opt & OP_INDIR) != 0 ||
!PERMITTED(opt, optype, OP_INDEX) || !alt_override_permitted(optype,opt,op->reg) ) {
goto nomatch;
}
Expand Down
5 changes: 5 additions & 0 deletions doc/cpu_m68k.texi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ microprocessor family.

@section Additional options for this module

Note, that the order on the command line may be important when
specifiying options. For example, if you specify -devpac compatibility
mode behind enabling some optimization options, the Devpac-mode might
disable these optimizations again.

This module provides the following additional options:

@subsection CPU selections
Expand Down
8 changes: 6 additions & 2 deletions doc/output_hunk.texi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ selected with the @option{-Fhunk} option to generate objects and with the

@section Additional options for this module
@table @option
@iten -hunkpad=<code>
Sets a two-byte code used for aligning a code hunk to the
next 32-bit border. Defaults to 0x4e71 on M68k to allow linking
of functions which extend over two object files.
@item -keepempty
Do not delete empty sections without any symbol definition.
@item -kick1hunks
Use only those hunk types and external reference types which have
been valid at the time of Kickstart 1.x for compatibility with
Expand All @@ -21,8 +27,6 @@ selected with the @option{-Fhunk} option to generate objects and with the
Automatically generate an SAS/C-compatible LINE DEBUG hunk for
the input source. Overrides any line debugging directives from
the source.
@item -keepempty
Do not delete empty sections without any symbol definition.
@end table

These options are valid for the @code{hunkexe} module only:
Expand Down
10 changes: 5 additions & 5 deletions doc/syntax_mot.texi
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ CPU- and output-module support them):
Starts a new section named @code{<name>} or reactivates an old one.
@code{<sec_type>} defines the section type and may be @code{code},
@code{text} (same as @code{code}), @code{data} or @code{bss}.
@code{<sec_type>} defaults to @code{code} in Phxass mode. Otherwise
a single argument will start a section with the type and name of
@code{<sec_type>}. When @code{<mem_type>} is given
it defines a 32-bit memory attribute, which specifies where to load
the section.
When the output format is "tos", then a single argument will be
interpreted as section type. Otherwise this argument is used as
section name and the type defaults to @code{code}.
When @code{<mem_type>} is given it defines a 32-bit memory attribute,
which specifies where to load the section.
@code{<mem_type>} is either a numerical constant or one of the
keywords @code{chip} (for Chip-RAM) or @code{fast} (for Fast-RAM).
Optionally it is also possible to attach the suffix @code{_C}, @code{_F}
Expand Down
11 changes: 11 additions & 0 deletions history
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
vasm history
=============

- 1.8g (NO-RELEASE)
o m68k: -opt-allbra makes sure that branch-optimization is enabled.
o z80: "ld (BC/DE/HL),abs" is an illegal addressing mode.
o mot-syntax: SECTION directive with a single argument is interpreted as
section-type when the output format is "tos". Otherwise the type
defaults to CODE.
o mot-syntax: In devpac-compatibility mode allow '@' in the middle of labels.
o output-hunk: New option -hunkpad=<code> selects the padding code for
code sections to achieve 32-bit alignment. Default to 0x4e71 (NOP)
for M68k.

- 1.8f (10.06.19)
o New option -wfail makes vasm return with an error code not only for
errors but also for warnings.
Expand Down
18 changes: 16 additions & 2 deletions output_hunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@
#include "osdep.h"
#include "output_hunk.h"
#if defined(OUTHUNK) && (defined(VASM_CPU_M68K) || defined(VASM_CPU_PPC))
static char *copyright="vasm hunk format output module 2.10 (c) 2002-2019 Frank Wille";
static char *copyright="vasm hunk format output module 2.10a (c) 2002-2019 Frank Wille";
int hunk_onlyglobal;

/* (currenty two-byte only) padding value for not 32-bit aligned code hunks */
#ifdef VASM_CPU_M68K
static uint16_t hunk_pad = 0x4e71;
#else
static uint16_t hunk_pad = 0;
#endif

static int databss;
static int kick1;
static int exthunk;
Expand Down Expand Up @@ -65,7 +72,7 @@ static void fwnopalign(FILE *f,taddr n)
if (n & 1)
ierror(0);
for (i=0; i<n; i+=2)
fw16(f,0x4e71,1);
fw16(f,hunk_pad,1);
}


Expand Down Expand Up @@ -956,6 +963,13 @@ static int common_args(char *p)
keep_empty_sects = 1;
return 1;
}
if (!strncmp(p,"-hunkpad=",9)) {
int pad_code;

sscanf(p+9,"%i",&pad_code);
hunk_pad = pad_code;
return 1;
}
return 0;
}

Expand Down
31 changes: 23 additions & 8 deletions syntax/mot/syntax.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
be provided by the main module.
*/

char *syntax_copyright="vasm motorola syntax module 3.12c (c) 2002-2019 Frank Wille";
char *syntax_copyright="vasm motorola syntax module 3.12d (c) 2002-2019 Frank Wille";
hashtable *dirhash;
char commentchar = ';';

Expand Down Expand Up @@ -51,6 +51,7 @@ static int allow_spaces;
static int check_comm;
static int dot_idchar;
static char local_char = '.';
static int tosout; /* output is for Atari TOS */

/* (currenty two-byte only) padding value for CNOPs */
#ifdef VASM_CPU_M68K
Expand Down Expand Up @@ -133,7 +134,7 @@ int isidchar(char c)
return 1;
if (phxass_compat && (unsigned char)c>=0x80)
return 1;
if (devpac_compat && c=='?')
if (devpac_compat && (c=='?' || c=='@'))
return 1;
return 0;
}
Expand Down Expand Up @@ -435,16 +436,28 @@ static void handle_section(char *s)
/* read section type and memory attributes */
s = read_sec_attr(attr,skip(s+1),&mem);
}
else {
/* only name is given - guess type from name */
if (!stricmp(name,"data"))
else if (tosout) {
/* only name is given - guess type from name for Atari TOS */
if (!stricmp(name,"data")) {
strcpy(attr,data_type);
else if (!stricmp(name,"bss"))
name = data_name;
}
else if (!stricmp(name,"bss")) {
strcpy(attr,bss_type);
else
name = bss_name;
}
else if (!stricmp(name,"code") || !stricmp(name,"text")) {
strcpy(attr,code_type);
if (devpac_compat && !stricmp(name,"text"))
name = code_name;
}
else {
syntax_error(13); /* illegal section type */
s = NULL;
}
}
else {
/* missing section type defaults to CODE */
strcpy(attr,code_type);
}

if (s) {
Expand Down Expand Up @@ -2443,6 +2456,8 @@ int init_syntax()
else if (phxass_compat) avail = 2;
else avail = 0;

tosout = !strcmp(output_format,"tos");

dirhash = new_hashtable(0x200); /* @@@ */
for (i=0; i<dir_cnt; i++) {
if ((directives[i].avail & avail) == avail) {
Expand Down

0 comments on commit b2b4569

Please sign in to comment.