Peter Johnson
d6f22c3fce
Dynamically load all modules (preloading some of the default ones).
...
Start reducing global variables for cleaner module separation.
Add rudimentary debug format module interface and "null" debug format.
svn path=/trunk/yasm/; revision=784
22 years ago
Peter Johnson
7604d804d1
Actually include new tests in the distribution.
...
svn path=/trunk/yasm/; revision=779
22 years ago
Peter Johnson
4c3bb4a7cc
Get rid of expr_xform_neg_tree(), integrating its functionality into
...
expr_level_tree(). This fixes negative equ's and probably other issues.
This also makes expr_simplify() a macro pointing to expr_level_tree().
svn path=/trunk/yasm/; revision=778
22 years ago
Peter Johnson
9b744cb938
Run test input files through standard input instead of as input files to avoid
...
pathname changing issues when builddir != srcdir (previous workaround worked
for text files, but for more complex objfmts such as coff that embed the source
filename in the binary output file, we need to find a different way).
svn path=/trunk/yasm/; revision=771
22 years ago
Peter Johnson
9d9618eeba
Add offset parameter to output_expr functions (needed for relocation support).
...
svn path=/trunk/yasm/; revision=767
22 years ago
Peter Johnson
c5bfd97db6
Make bytecode and effaddr "data" extensions more portable by including the
...
base structure as the first element in each data structure. Concept taken from
the JPEG library.
svn path=/trunk/yasm/; revision=761
22 years ago
Peter Johnson
9b6b24c054
Add a rex field in x86_insn (and some default initialization/output handling)
...
in preparation for x86-64 support.
svn path=/trunk/yasm/; revision=760
22 years ago
Peter Johnson
a49ffae2d7
Fix segreg mov instructions.
...
svn path=/trunk/yasm/; revision=759
22 years ago
Peter Johnson
6e3ed262f6
Add extended error/warning handling (just functionality, it's not actually
...
used yet).
svn path=/trunk/yasm/; revision=758
22 years ago
Peter Johnson
247701c0f4
Add test for just-committed changes to x86id.re (proper catchalls).
...
svn path=/trunk/yasm/; revision=757
22 years ago
Peter Johnson
c040fcfd6e
Comment out "marker"s, as in these cases re2c doesn't use them.
...
svn path=/trunk/yasm/; revision=756
22 years ago
Peter Johnson
03705fd656
Fix catchalls so they really do catch everything else.
...
svn path=/trunk/yasm/; revision=754
22 years ago
Peter Johnson
920f11a0e5
Add the ability to add an additional transformation function into the execution
...
flow of expr_level_tree(). Feature needed for objfmts/bin upcoming fixes.
svn path=/trunk/yasm/; revision=751
22 years ago
Peter Johnson
494ed1738d
Make output endian-tolerant by making intnum and floatnum output functions for
...
arch. This will also simplify other objfmt expr output functions. Change
file functions to use bits instead of byte/short/long, and create both little
and big endian versions. This name change caused changes in several other
files.
svn path=/trunk/yasm/; revision=747
22 years ago
Peter Johnson
d1f5de8d45
Run sed on the re2c output to update the newly added #line output.
...
svn path=/trunk/yasm/; revision=746
22 years ago
Peter Johnson
e4988ea961
Make test scripts more portable by detecting echo line-ending features, using
...
fewer options for sed, and using a perl script for hexdump. As a side effect,
hexdumps are more accurate (the hexdump util put * for as many multiples as
were output, whereas the perl script outputs a line for every byte, no matter
what).
svn path=/trunk/yasm/; revision=736
22 years ago
Peter Johnson
2368686527
Add automated arch/x86 tests. Some were moved from tests/nasm, others are new.
...
svn path=/trunk/yasm/; revision=734
22 years ago
Peter Johnson
015f373d32
x86_bc_resolve_insn(): If x86_expr_checkea fails, return not only
...
BC_RESOLVE_UNKNOWN_LEN but also BC_RESOLVE_ERROR so that a spurious circular
reference detected is not output from the basic optimizer.
svn path=/trunk/yasm/; revision=732
22 years ago
Peter Johnson
2252b6215b
Increase strictness of EA part of lds family (e.g. so no size specifier is
...
legal).
svn path=/trunk/yasm/; revision=731
22 years ago
Peter Johnson
46c26f12a7
Fix incorrect invalidation of [eax+ebx+ecx-eax] and others like it.
...
svn path=/trunk/yasm/; revision=725
22 years ago
Peter Johnson
b3e9ae6254
Don't fully simplify effective addresses before trying to determine their
...
registers.
svn path=/trunk/yasm/; revision=724
22 years ago
Peter Johnson
6591a155d0
Check for circular equ references (Bug#8).
...
svn path=/trunk/yasm/; revision=723
22 years ago
Peter Johnson
3420509d65
x86_bc_resolve_jmprel(): Delete unused variable 'target'.
...
svn path=/trunk/yasm/; revision=721
22 years ago
Peter Johnson
a3a9fd2aa0
Completely revamp how label resolution is done (part of Bug#6). Now calculates
...
/distances/ between bytecodes in a section using bc_calc_dist() functions (a
"typical" one is provided for most occasions). expr_expand_labelequ() is gone,
as its functionality is integrated into expr_simplify(). Currently these
changes break most bin objfmt output, as it doesn't know how to resolve
absolute labels yet. Also, very preliminary expr support for :, SEG, and WRT
operators has been added (part of Bug#2). Several other minor bug fixes.
svn path=/trunk/yasm/; revision=718
22 years ago
Peter Johnson
f5f92a9d52
PSHUFW has 3 operands, not 2 (typo in num_operands value).
...
svn path=/trunk/yasm/; revision=716
22 years ago
Peter Johnson
99818a7010
RET and RETN are exactly equivalent (the previous commit was wrong, but not
...
for the reason stated; it just had the wrong base opcode).
svn path=/trunk/yasm/; revision=715
22 years ago
Peter Johnson
e1107f96a2
Revert previous commit until we can do this the right way (C2 iw is an
...
invalid opcode, it needs to be C2 or C3 iw).
svn path=/trunk/yasm/; revision=714
22 years ago
Peter Johnson
302c7215b5
RET is a form of RETNF.
...
svn path=/trunk/yasm/; revision=713
22 years ago
Peter Johnson
c1b04966ef
Fix lexing bug for XMM[0-7] (wrong character used to get register index).
...
svn path=/trunk/yasm/; revision=712
22 years ago
Peter Johnson
ddb25b6aa7
Declare shifted constants unsigned longs (with UL) before shifting, to
...
increase portability.
svn path=/trunk/yasm/; revision=711
22 years ago
Peter Johnson
090a25b8d4
Rename intnum_new_int to intnum_new_uint, and add new signed version of
...
intnum_new_int. Currently only just calls intnum_new_uint with a cast, but
eventually there may be a better way of handling signed numbers.
svn path=/trunk/yasm/; revision=708
22 years ago
Peter Johnson
c5ef1bf2dc
Eliminate duplicate code for callbacks from expr_expand_labelequ() by moving
...
code and adding a resolve_precall function parameter (which caused cascading
changes in bytecode-related sources).
svn path=/trunk/yasm/; revision=701
23 years ago
Peter Johnson
97ad3394e2
The short forms (0x50+reg) of push/pop reg should be selected before the long
...
(0xFF, ModRM) forms.
svn path=/trunk/yasm/; revision=697
23 years ago
Peter Johnson
320a83294e
Finish remaining instructions (SSE, SSE2, Cyrix MMX). Changed CPU flags for
...
MMX/SSE2 to reflect that it's the MMX or SSE2 cpu feature, not the cpu family.
svn path=/trunk/yasm/; revision=694
23 years ago
Peter Johnson
9390dd2bbb
Add MMX/SSE2 instructions.
...
svn path=/trunk/yasm/; revision=693
23 years ago
Peter Johnson
a2a986add9
Add segreg moves.
...
svn path=/trunk/yasm/; revision=692
23 years ago
Peter Johnson
efafc7c6fb
Fix some bugs.
...
- Typos in imul reg, imm (# of operands)
- Fixes to push/pop. word/dword override opersize now.
svn path=/trunk/yasm/; revision=691
23 years ago
Peter Johnson
ca721cf125
Implement relative jumps and calls.
...
svn path=/trunk/yasm/; revision=689
23 years ago
Peter Johnson
8495e174cc
x86_parse_targetmod enum should start with value 1, not 0.
...
svn path=/trunk/yasm/; revision=687
23 years ago
Peter Johnson
c2e982f901
Take opersize as an input for x86_bc_new_jmprel().
...
svn path=/trunk/yasm/; revision=686
23 years ago
Peter Johnson
2c090517fc
Flatten x86_targetval into x86_new_jmprel_data, as the former is no longer used
...
in the parser.
svn path=/trunk/yasm/; revision=685
23 years ago
Peter Johnson
cd573321b3
Finish all instructions except for relative jumps, mov segreg, MMX, SSE, and
...
SSE2.
svn path=/trunk/yasm/; revision=684
23 years ago
Peter Johnson
eb067621cf
Added rest of floating point instructions. Needed to add new action to
...
add to opcode byte 1.
svn path=/trunk/yasm/; revision=683
23 years ago
Peter Johnson
b630a6768b
Add checking of target modifier.
...
Change operand typing mask constants to be more uniform.
Increase operand type size to long from int, as it now can go over 16 bits.
svn path=/trunk/yasm/; revision=682
23 years ago
Peter Johnson
70442d8b7f
Make "TO" a x86 targetmod.
...
svn path=/trunk/yasm/; revision=681
23 years ago
Peter Johnson
d6cee4db08
Add a few control transfer instructions, plus set byte on flag, bit manip,
...
int, bound, and 286 protection control.
svn path=/trunk/yasm/; revision=678
23 years ago
Peter Johnson
ef8f221f24
Added shift instructions, as well as new "postponed" actions for things such
...
as shift ,1 operands and imm operands that have sign-extended imm8 forms that
can't be decided at parse-time. The x86 bc format already had support for
these. Also fixed a bug in the lfs family (incorrect inst len).
svn path=/trunk/yasm/; revision=677
23 years ago
Peter Johnson
0af7326e75
Add lea, l?s, and arithmetic instructions. Arithmetic instructions needed
...
two additional actions: signed immediate and spare+ea.
svn path=/trunk/yasm/; revision=676
23 years ago
Peter Johnson
e1eae9bae5
Add xchg, in, out. in and out required operand type Dreg (DL/DX/EDX) to be
...
added.
svn path=/trunk/yasm/; revision=675
23 years ago
Peter Johnson
ce0d675524
Add push and pop. This required adding some new specific operand types, which
...
required adding to the number of bits allocated for the operand type.
svn path=/trunk/yasm/; revision=674
23 years ago