summaryrefslogtreecommitdiff
path: root/sys/src/cmd/6c
AgeCommit message (Collapse)Author
2017-01-086c: reverse register allocation order to avoid having to spill AX,DX and CXcinap_lenrek
allocating AX,CX,DX last improves 64-bit multiplication-add chains like a*b + c*d as the multiplication does not need to save and restore AX and DX registers in most cases. reserving CX for shifts also helps.
2017-01-026c, 8c: fix "DI botch" evacuating DI/SI/CX registers to ".save" variablescinap_lenrek
2016-08-146c: subsitute floating point registers eleminating MOVSD and MOVSS ↵cinap_lenrek
instructions in peephole pass
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-046c: remove 6c/vlrt.c filecinap_lenrek
2015-10-04cc/6c: fix return type of mixed asop expressions, preserve type for moves so ↵cinap_lenrek
fixed<->float conversions work correctly
2015-03-176c: MOVL xxx, r; MOVLQZX r, r -> MOVL xxx, rcinap_lenrek
eleminate MOVLQXZ instructions after MOVL as MOVL implicitely zero extends the result.
2015-03-016c: fix missing memset in Bconv()cinap_lenrek
2015-02-186c: eleminate more MOV instructionscinap_lenrek
convert: x = B || W MOVxLZX a, r; MOVxQZX r, b -> MOVxQZX a, r; MOVQ r, b MOVxLSX a, r; MOVxQSX r, r -> MOVxQSX a, r; MOVQ r, r the MOVQ can then be eleminated by copy propagation. improve subprop() by accepting other mov and lea instructions as the source op.
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-05-306a, 6c, 6l: fix copy propagationAram Hăvărneanu
Without an explicit signal for a truncation, copy propagation will sometimes propagate a 32-bit truncation and end up overwriting uses of the original 64-bit value. This was independently discovered and fixed in Go. See: http://golang.org/issue/1315 https://codereview.appspot.com/6002043/ Thanks Charles Forsyth for tips and advice.
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-02-286c: fix 32bit pointer truncation (from patch/6c-sugen-types)cinap_lenrek
1. Go group spotted that a slightly-obscured pointer move was done by AMOVL not AMOVQ. 2. Inspecting the code further, I noticed that other pointer types were set to TLONG not TIND, causing similar truncation of pointers to 32 bits.
2012-09-186c: extern register fix (import from patch/6c-extreg)cinap_lenrek
to make it easy to use normal libraries (such as libdraw, libsec, and libmp) with the kernel, which uses extern register, don't stray into the external register set when allocating values to registers.
2012-07-30import updated compilers from sourcescinap_lenrek