summaryrefslogtreecommitdiff
path: root/sys/src/cmd/8c
AgeCommit message (Collapse)Author
2017-01-026c, 8c: fix "DI botch" evacuating DI/SI/CX registers to ".save" variablescinap_lenrek
2016-10-308c: fix double compiling FNX complex lvalue in cgen64()cinap_lenrek
sugen() calls cgen64() speculatively so that when cgen64() returns zero, it will fall back and compile 64-bit copy. the bug was that cgen64() compiled the left hand side and then recursively called cgen64() again, which didnt handle the memory copy so it returned zero and sugen() would compile the left hand side again resulting in two function calls being emited. some code that reproduced the issue: #include <u.h> #include <libc.h> typedef struct { char x[10]; vlong a; } X; X a; X *f(void) { return &a; } void main(int argc, char *argv[]) { f()->a = a.a; } producing: TEXT f+0(SB),0,$0 MOVL $a+0(SB),AX RET , RET , TEXT main+0(SB),0,$0 CALL ,f+0(SB) CALL ,f+0(SB) <- bug MOVL AX,CX LEAL a+12(SB),DX MOVL (DX),AX MOVL AX,12(CX) MOVL 4(DX),AX MOVL AX,16(CX) RET , GLOBL a+0(SB),$20 END ,
2016-06-098c, 6c: native ROL (cyclic shift) instruction support, improve peephole ↵cinap_lenrek
optimizers introduce rolor() function to subsitute (a << c) | (a >> (bits(a) - c)) with (a <<< c) where <<< is cyclic rotation and c is constant. this almost doubles the speed of chacha encryption of 386 and amd64. the peephole optimizer used to stop when it hit a shift or rol instruction when attempting to eleminate moves by register substitution. but we do not have to as long as the shift count operand is not CX (which cannot be substituted) and CX is not a subject for substitution.
2016-06-09?c: track ../cc/cc.h dependency and rebuild cc.a$O as neccesarycinap_lenrek
2015-10-065c/6c/8c/vc: import various changes from charles forsythcinap_lenrek
- cover more cases that have no side effects - ensure function has complex FNX - pull operators out of OFUNC level - rewrite OSTRUCT lhs to avoid all side-effects, use regalloc() instead of regret()
2015-10-048c: dont abort() when running out of registers.cinap_lenrek
2015-10-048c: handle 64 bit mixedmode asop and type vlong <-> float/double type ↵cinap_lenrek
conversions
2015-10-038c: make cgen64() compile target first when it contains functoin call so ↵cinap_lenrek
final assignment wont trash the registers
2015-02-17[125678kqv][cl]: fix sprint() and strcpy() buffer overflowscinap_lenrek
2014-09-246c/8c: eleminate moves by swaping source and destination operands in ↵cinap_lenrek
peephole pass
2014-08-078c, 6c: generate enam.c file, just like 5ccinap_lenrek
2014-04-288c, 6c: fix peephole bug for eleminating CMPL $0,R after shiftcinap_lenrek
the shift instructions does not change the zero flag when the shift count is 0, so we cannot remove the compare instruction in this case. this fixes oggdec under 386.
2014-03-296c, 8c: optimize away CMPL/CMPQ reg, $0 instruction in peephole passcinap_lenrek
when the previous instruction sets the zero flag, we can remove the CMPL/CMPQ instruction. this removes compares for zero/non zero tests only. it only looks at the previous non-nop instruction to see if it sets our compare value register.
2014-03-218c, 6c: fix mulgen botch error for handling multiplication by zero constantcinap_lenrek
2013-06-018c: apply charles forsyth's 8c-cgen64-mul-savereg patch (from sources)cinap_lenrek
If 64-bit multiply has to save both AX and DX, it could load the wrong value into DX; also, biggen shouldn't allocate either AX or DX as temporaries when using the template for MUL.
2013-05-21add 6(a|l) sse support to 8(a|l)jpathy
2012-07-30import updated compilers from sourcescinap_lenrek
2011-07-12added Blethal to libbioaiju
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen