aboutsummaryrefslogtreecommitdiff
path: root/tests/asmtest.S
Commit message (Collapse)AuthorAgeFilesLines
* x86-asm: Reject some invalid arith imm8 instructionMichael Matz2016-05-161-0/+16
| | | | | | | There were two errors in the arithmetic imm8 instruction. They accept only REGW, and in case the user write a xxxb opcode that variant needs to be rejected as well (it's not automatically rejected by REGW in case the destination is memory).
* x86-asm: Add .fill testMichael Matz2016-05-141-0/+1
|
* x86-asm: Fix signed constants and opcode orderMichael Matz2016-05-141-0/+7
| | | | | | | | Two things: negative constants were rejected (e.g. "add $-15,%eax"). Second the insn order was such that the arithmetic IM8S forms weren't used (always the IM32 ones). Switching them prefers those but requires a fix for size calculation in case the opcodes were OPC_ARITH and OPC_WLX (whose size starts with 1, not zero).
* x86-64-asm: Add mov[sz]xq opcodesMichael Matz2016-05-121-0/+7
| | | | This adds the zero/sign-extending opcodes with 64bit destinations.
* x86-64-asm: Clean up 64bit immediate supportMichael Matz2016-05-111-0/+10
| | | | | | | | | Fix it to actually be able to parse 64bit immediates (enlarge operand value type). Then, generally there's no need for accepting IM64 anywhere, except in the 0xba+r mov opcodes, so OP_IM is unnecessary, as is OPT_IMNO64. Improve the generated code a bit by preferring the 0xc7 opcode for im32->reg64, instead of the im64->reg64 form (which we therefore hardcode).
* x86-64 asm: Remove useless jmp opcodeMichael Matz2016-05-111-0/+1
| | | | | Also remove the hacky mod/rm byte emission during disp/imm writing.
* x86: Improve cmov handlingMichael Matz2016-05-111-0/+4
| | | | | cmov can accept multi sizes, but is also a OPC_TEST opcode, deal with this.
* [x86] Fix some asm problemsMichael Matz2016-05-091-8/+67
| | | | | | | | | | | A bag of assembler fixes, to be either compatible with GAS (e.g. order of 'test' operands), accept more instructions, count correct foo{bwlq} variants on x86_64, fix modrm/sib bytes on x86_64 to not use %rip relative addressing mode, to not use invalid insns in tests/asmtest.S for x86_64. Result is that now output of GAS and of tcc on tests/asmtest.S is mostly the same.
* Allow tcc to understand a setob,... opcodes as alias to seto,...seyko2015-01-061-0/+2
| | | | | | PS: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20101122/112576.html This is fix PR8686 for llvm: accepting a 'b' suffix at the end of all the setcc instructions.
* i386-asm: support "pause" opcodeJoe Soroka2011-02-241-0/+1
|
* tccasm: support alternate .type syntaxesJoe Soroka2011-02-241-0/+14
|
* tccpp: treat gas comments in .S files as raw text, not tokensJoe Soroka2011-02-231-0/+1
|
* tccasm: accept bracketed offset expressionsJoe Soroka2011-02-011-0/+1
|
* tccasm: accept "fmul/fadd st(0),st(n)" (dietlibc ipow/atanh)Joe Soroka2011-02-011-0/+4
|
* tccasm: allow one-line prefix+op things like "rep stosb"Joe Soroka2011-02-011-0/+18
|
* tccasm: define __ASSEMBLER__ for .S files, like gcc doesJoe Soroka2011-02-011-0/+4
|
* asmtest: avoid testing against complex nop alignment in gasJoe Soroka2011-01-231-1/+2
| | | | | | | | | | | | | | | | | .align #,0x90 in gas ignores the 0x90 and outputs any kind of nop it feels like. the one avoided by this patch is a 7 byte nop, which gas has been doing since at least 1999: http://sourceware.org/ml/binutils/1999-10/msg00083.html In order to match what gas does, we would need to make code alignment target-specific, import a lot of code, and face the question: exactly which gas {version,target,tune} combo are we trying to match? see i386_align_code in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.c?annotate=1.460&cvsroot=src The smart noppery is turned on via the special casing of 0x90 at line 438 in md_do_align in: http://sourceware.org/cgi-bin/cvsweb.cgi/src/gas/config/tc-i386.h?annotate=1.1&cvsroot=src
* i386-asm: accept retl as a synonym for retJoe Soroka2011-01-211-0/+2
|
* accept multiple comma separated symbols for .globl/.global directives, like ↵Joe Soroka2011-01-201-0/+5
| | | | gas does
* fix asmtest (somehow), update Makefilesgrischka2009-07-181-2/+2
|
* new subdirs: include, lib, testsgrischka2009-04-181-0/+558