Commit Graph

17903 Commits

Author SHA1 Message Date
florian
58c66b4759 * the mul instructions do not modify the operands
git-svn-id: trunk@30633 -
2015-04-17 20:15:10 +00:00
florian
66e97549b9 * replace jmp by rjmp if possible, resolves issue #27885
git-svn-id: trunk@30632 -
2015-04-17 20:14:18 +00:00
nickysn
5c8965fea5 * in the inline asm reader, treat [var] reference as "word" instead of "dword"
when "var" is of dword size. This fixes spurious generation of a $66 prefix
  and makes the code consistent with what Tx86Operand.SetSize does (and what is
  then used for checking the operand sizes of all operands of the instruction in
  Tx86Instruction.CheckOperandSizes).

git-svn-id: trunk@30629 -
2015-04-17 19:58:06 +00:00
nickysn
3b5395e0e3 * set 16-bit opsize for OPR_SYMBOL operands on i8086
git-svn-id: trunk@30626 -
2015-04-17 19:10:13 +00:00
michael
d802842ecf * Committed working patches to error message files from Stéphane Aulery
git-svn-id: trunk@30617 -
2015-04-17 12:19:13 +00:00
nickysn
c3515f743f * generate 16-bit (instead of 32-bit) instructions for push/pop of a segment
register in an inline asm block on i8086

git-svn-id: trunk@30616 -
2015-04-17 00:51:00 +00:00
nickysn
7315175c32 * keep the proper original section name and order (and not just the type) of the
last encountered section at the object cut location when writing a smartlinked
  library with the internal assembler. This fixes the $HUGECODE directive with
  the internal assembler on i8086 and maybe other things on other platforms,
  that use library based smartlinking in combination with the internal asm.

git-svn-id: trunk@30615 -
2015-04-16 23:33:26 +00:00
Jonas Maebe
3be51e1455 * fixed endless recursion in tabstractrecorddef.contains_float_field() in
case a record contains an internal typed constant of its own type
    (which happened becuase such a typed constant is also fieldvarsym, solved
     by checking for sp_static) (mantis #27880)
  * fixed several other similar cases in the compiler where we are only
    interested in instance fields, but processed all fieldvarsyms

git-svn-id: trunk@30614 -
2015-04-16 21:25:22 +00:00
nickysn
25a834087e + choose the correct version of "Jcc near" to use on i8086 (386+ or 8086+)
depending on the specified target cpu type
+ support the \60..\62 magic codes on i8086 in the internal asm writer

git-svn-id: trunk@30613 -
2015-04-16 19:49:22 +00:00
nickysn
2cf6852910 + added i8086 instruction entries for Jcc near (which is actually a 386+
instruction), that encode it as two i8086 compatible instructions:
    JNcc short +3
    JMP near target

git-svn-id: trunk@30612 -
2015-04-16 17:07:07 +00:00
nickysn
bfd5670cc8 + support new magic code \23 in the internal asm writer - same as \13, but with
the condition inverted; this will be used to simulate near conditional jumps
  on processors earlier than 386 (i.e. "Jcc near target" will be encoded as
  "JNcc short +3; JMP target")

git-svn-id: trunk@30611 -
2015-04-16 16:53:48 +00:00
Jonas Maebe
a56bf0f892 * regenerated message files after r30604
git-svn-id: trunk@30606 -
2015-04-15 18:29:47 +00:00
Jonas Maebe
3ab62fc36e * define TSymStr as ansistring for llvm, as its type definitions can be quite long
git-svn-id: trunk@30605 -
2015-04-15 18:29:44 +00:00
michael
b2caba585d * Patch from Stéphane Aulery to fix typos in compiler messages (bug ID 27857)
git-svn-id: trunk@30604 -
2015-04-15 17:34:56 +00:00
nickysn
c407f61107 * generate the omf alignment based on the value of SecAlign, instead of
duplicating the code from sectiontype2align in the TOmfObjSection constructor

git-svn-id: trunk@30603 -
2015-04-15 08:55:19 +00:00
nickysn
d7416afd88 * override sectiontype2align in the omf writer and set the same alignments as
the ones, currently produced by nasm

git-svn-id: trunk@30602 -
2015-04-15 08:31:06 +00:00
nickysn
955c29618a + support far calls and jumps in the internal asm writer
git-svn-id: trunk@30601 -
2015-04-15 00:12:40 +00:00
nickysn
a7e059c875 + support segment relocations in the omf writer
git-svn-id: trunk@30600 -
2015-04-14 22:46:01 +00:00
Jeppe Johansen
65a69129c5 Add initial support for STM32F429 core
git-svn-id: trunk@30599 -
2015-04-14 21:55:37 +00:00
florian
e733efbbc2 * proper tavrprocinfo.calc_stackframe_size
git-svn-id: trunk@30597 -
2015-04-14 20:48:13 +00:00
florian
3d0b1020d7 * proper alignment constants for avr-embedded
git-svn-id: trunk@30596 -
2015-04-14 20:47:47 +00:00
florian
cf58a7ad60 * cosmetics
git-svn-id: trunk@30595 -
2015-04-14 20:47:26 +00:00
nickysn
f5ddd351fe * allow use of the imm8 form of 16-bit instructions on i8086
git-svn-id: trunk@30594 -
2015-04-14 19:14:47 +00:00
florian
b84657980d * make OS_INT/OS_SINT 8 Bit on avr, should work better on avr, resolves #27840
git-svn-id: trunk@30593 -
2015-04-14 18:51:21 +00:00
nickysn
07ebd29911 * fixed warning in TOmfRecord_MODEND.DecodeFrom
git-svn-id: trunk@30592 -
2015-04-14 18:41:41 +00:00
nickysn
e0be3e49ae * when reading omf records (and subrecords), range check against
RawRecord.RecordLength instead of High(RawRecord.RawData)

git-svn-id: trunk@30591 -
2015-04-14 17:55:13 +00:00
Jeppe Johansen
f31f87e8c7 Fix spilling_get_operation_type for MRS and MSR instructions
git-svn-id: trunk@30590 -
2015-04-14 17:20:47 +00:00
nickysn
b4d044e1b2 + implemented reading of MODEND omf records
git-svn-id: trunk@30589 -
2015-04-14 16:26:40 +00:00
nickysn
4e0c77fcf4 check and cause an internal error in TOmfRecord_PUBDEF.EncodeTo when trying to
write a 16-bit record with an entry with public offset > $ffff

git-svn-id: trunk@30588 -
2015-04-14 15:35:19 +00:00
nickysn
0e10290722 + implemented writing a start address in a MODEND omf record
git-svn-id: trunk@30587 -
2015-04-14 15:24:51 +00:00
nickysn
d3cc0770ac + added properties for specifying a start address in the MODEND omf record (reading/writing them to file not yet implemented)
git-svn-id: trunk@30586 -
2015-04-14 14:55:06 +00:00
nickysn
bf0aaf5470 + implemented TOmfRecord_PUBDEF.DecodeFrom
git-svn-id: trunk@30585 -
2015-04-14 14:08:27 +00:00
nickysn
cea67320bf + implemented TOmfRecord_EXTDEF.DecodeFrom
git-svn-id: trunk@30584 -
2015-04-14 13:40:46 +00:00
nickysn
10722abfac + implemented TOmfRecord_LNAMES.DecodeFrom
git-svn-id: trunk@30583 -
2015-04-14 13:32:12 +00:00
nickysn
64cb865417 * check record type in TOmfRecord_THEADR.DecodeFrom
git-svn-id: trunk@30582 -
2015-04-14 12:04:49 +00:00
nickysn
03e8c3ae05 + support RELOC_RELATIVE relocations in the omf object writer, by using omf's
"self relative" (instead of "segment relative") fixups. "Hello world" and
  fpctris in the small memory model now work (under dosbox, at least) with the
  internal object writer.

git-svn-id: trunk@30581 -
2015-04-13 22:44:31 +00:00
nickysn
bd460eec43 * emit 16-bit addresses on i8086 for asm codes &64..&66 in the internal asm
git-svn-id: trunk@30580 -
2015-04-13 22:13:15 +00:00
florian
e559b9e3d6 + tavrshlshrnode.second_integer, does not convert the right operand to a bigger type, resolves #27841
git-svn-id: trunk@30579 -
2015-04-13 20:57:37 +00:00
florian
8b7a449cf1 * clear r1 after 8 Bit multiplication, resolves #27838
git-svn-id: trunk@30578 -
2015-04-13 20:15:30 +00:00
nickysn
22fb1a3e7e * converted all the magic nasm codes in the x86 internal asm writer from decimal
to octal in the compiler source, so they match the strings in x86ins.dat

git-svn-id: trunk@30566 -
2015-04-13 01:13:39 +00:00
Károly Balogh
68a25e154a Amiga/MorphOS: enabled resource support, to match AROS in features
git-svn-id: trunk@30565 -
2015-04-13 00:49:00 +00:00
nickysn
fe30b53e95 * use 16-bit operand types for call/jmp immediate on i8086 in taicpu.create_ot
git-svn-id: trunk@30563 -
2015-04-12 23:53:15 +00:00
nickysn
a25a906d56 * i8086 internal asm fixes for the 0324 and 0361 asm codes
git-svn-id: trunk@30562 -
2015-04-12 22:56:28 +00:00
nickysn
38c17305d3 - removed tf_smartlink_sections flags from the msdos target
git-svn-id: trunk@30561 -
2015-04-12 22:11:21 +00:00
florian
fa6bea9bbb * all the cg/hlcg routines take normally tcgint constants, so replace aint constants and casts in ncgset by tcgint ones
git-svn-id: trunk@30560 -
2015-04-12 20:32:37 +00:00
florian
4d01271944 * due to avr's harvard architecture, loads of code labels need to use the gs(...) macro
git-svn-id: trunk@30559 -
2015-04-12 20:29:13 +00:00
florian
1f20a52c85 * fix typo in comparison with constant code
git-svn-id: trunk@30556 -
2015-04-12 15:42:40 +00:00
florian
bd803769b8 * fix compilation
git-svn-id: trunk@30554 -
2015-04-12 14:58:41 +00:00
florian
9559dabe51 * function result is in r24:r25
git-svn-id: trunk@30549 -
2015-04-11 21:25:05 +00:00
florian
e34bd746ed * patch by Jeppe Johanse to take care of the fact that push is post-decrement on avr
git-svn-id: trunk@30548 -
2015-04-11 20:59:27 +00:00