summaryrefslogtreecommitdiff
path: root/sys/src/cmd/5c
AgeCommit message (Collapse)Author
2023-05-135c, kc, qc: fix implicit return type of samaddrJacob Moody
The samaddr definitions in the other compilers have the return type marked correctly.
2023-05-095c, 7c: fix !x compilation when x is a negative floatSigrid Solveig Haflínudóttir
test case: void main(int, char **) { union { float f; u32int u; }x; x.u = 1U<<31; print("%d %d\n", !x.f, x.f == 0.0f); exits(nil); }
2021-06-26kencc: revert back to "set but not used"cinap_lenrek
The change to "assignment not used" breaks symmetry with "used and not set" and removes the reference to the specific warning mentioned in /sys/doc/comp.ms. Also, the patch was half-assed as that it left some typos in like "used an not set", which this change also fixed.
2021-06-21kencc: clarify warning for unused assignmentsNoam Preil
2021-03-135c, 6c, 7c, 8c, kc, qc, vc: use explicit gmove(... , nn) in cgen() for ↵cinap_lenrek
result of OAS*, OPREINC, OPOSTINC The expression value of the assignment operation was returned implicitely by relying on regalloc() on the right hand side "nod" borrowing the register from nn. But this only works if nn is a register. In case of 6c, it can also be a ONAME from a .safe rathole returned by regsalloc(). This change adds explicit gmove() calls to assign the expression value. Note that gmove() checks if source and destination are the same register so it wont emit redundant move operations in the common case. The same is applied also to OPREINC and OPOSTINC operations.
2020-04-19?c: get rid of sprint(), strcpy() and strcat()/strncat(), cleanupcinap_lenrek
2020-04-19?c: fix Bconv() misusage of strncat()cinap_lenrek
2020-04-11cc, ?[acl]: fix gethunk() and move common memory allocator code to cc/compatcinap_lenrek
for gethunk() to work, all allocators have to use it, including allocations done by libc thru malloc(), so the fake allocation functions are mandatory for everyone. to avoid duplication the code is moved to cc/compat and prototypes provided in new cc/compat.h header.
2019-06-19cc: remove nullwarn() from OCAST codegen, zap void castscinap_lenrek
implicit casts would cause spurious "result of operation not used" warnings such as ape's stdio putc() macro. make (void) casts non-ops when the casted expression has no side effects. this avoid spurious warning with ape's assert() macro.
2019-05-01[5678vq]c: fix .safe node type for *FUNC() = *FUNC() sugencinap_lenrek
2019-03-295c: dont substibute (destination) registers contained in MOVM reglistcinap_lenrek
this fixes the miscompilation of 6l with 5c resulting in bogus vlong -> long conversion at the top of asmandsz(): asmandsz 0x0000aec4 MOVW.W R14,#-0x2c(R13) asmandsz+0x4 0x0000aec8 MOVW rex+8(FP),R5 asmandsz+0x8 0x0000aecc MOVW $andptr-SB(SB),R7 asmandsz+0xc 0x0000aed0 MOVW R0,R6 asmandsz+0x10 0x0000aed4 AND $#0x44,R5,R8 asmandsz+0x14 0x0000aed8 MOVW R8,rex+8(FP) asmandsz+0x18 0x0000aedc MOVW R0,R4 asmandsz+0x1c 0x0000aee0 MOVM.IA (R0),[R1,R3] <- R1 used here asmandsz+0x20 0x0000aee4 MOVW R8,v-4(SP) <- substituted by R8
2018-05-24cc: fix result of operation not used warning for void castsspew
2016-09-035c: do shift propagation for rotate right (ROR)cinap_lenrek
2016-09-035c: format assembly constant right shift encoding 0 as >>32cinap_lenrek
2016-07-155c: fix int -> uvlong cast bug (thanks to qwx on his patience on a the ↵cinap_lenrek
trouble session to narrowing it down) we used to not sign extend if the destination was unsigned uvlong, which is wrong. we have to sign extend only based on the signedness of the source (it gets propagated to vlong) this bug hit in hjfs in the newentry() function, causing file creation to fail with "create -- phase error": newentry(...) { uvlong sj; int si; ... sj = si = -1; ... }
2016-06-265c: handle unused results for cgen64()cinap_lenrek
2016-06-265c: support for bit ROL, native 64 bit arithmeticcinap_lenrek
2016-06-09?c: track ../cc/cc.h dependency and rebuild cc.a$O as neccesarycinap_lenrek
2015-11-015c: handle (rare) MULU instruction in peephole optimizercinap_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-045c: handle 64 bit mixedmode asopcinap_lenrek
2015-02-17[125678kqv][cl]: fix sprint() and strcpy() buffer overflowscinap_lenrek
2014-08-075a, 5l: add LDREX/STREX/CLREX instructionscinap_lenrek
2013-09-205c: apply richard millers 5c-nan-cmp patch (from sources)cinap_lenrek
On ARM, it turns out that comparisons with NaN can be made to do the right thing with no code penalty, by a more careful selection of condition code values in the subsequent conditional branch. The meaning of the CC bits in the PSR is subtly different when they've been copied from the floating point status register. Suggested patch is 5c-nan-cmp (works on both vfp and emulated arm7500).
2013-04-295c: dont emit conditional integer division instructionscinap_lenrek
the integer division instructions are emulated with _div() function patched in by 5l which does not handle conditional execution. so do not optimize away the branch in that case.
2013-01-26add arm vfp support to compiler and linker (from sources)cinap_lenrek
2013-01-025c: fix -0x80000000 comparsion bugcinap_lenrek
2012-07-30import updated compilers from sourcescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen