mac os x amd64 detection; missing C files added

This commit is contained in:
Araq 2010-09-16 01:08:22 +02:00
commit 9cf4cf0299
3 changed files with 22 additions and 2 deletions

View file

@ -371,6 +371,25 @@ proc binaryArithOverflow(p: BProc, e: PNode, d: var TLoc, m: TMagic) =
else: else:
putIntoDest(p, d, e.typ, ropef("(NI$4)($2 $1 $3)", [toRope(opr[m]), putIntoDest(p, d, e.typ, ropef("(NI$4)($2 $1 $3)", [toRope(opr[m]),
rdLoc(a), rdLoc(b), toRope(getSize(t) * 8)])) rdLoc(a), rdLoc(b), toRope(getSize(t) * 8)]))
when false:
if optOverflowCheck in p.options:
# It would be better to just implement these
if getSize(t) < 4:
var tmp = getTempName()
appcg(p, cpsLocals, "NI32 $1;", [tmp])
appcg(p, cpsStmts, "$1 = #$2($3, $4);", [tmp, toRope(prc[m]), rdLoc(a), rdLoc(b)])
appcg(p, cpsStmts, "if ($1 < $2 || $1 > $3) #raiseOverflow();$n",
[tmp, intLiteral(firstOrd(t)), intLiteral(lastOrd(t))])
putIntoDest(p, d, e.typ, tmp)
else:
putIntoDest(p, d, e.typ, ropecg(p.module,
"#$1($2, $3)", [toRope(prc[m]), rdLoc(a), rdLoc(b)]))
appcg(p, cpsStmts, "if ($1 < $2 || $1 > $3) #raiseOverflow();$n",
[rdLoc(d), intLiteral(firstOrd(t)), intLiteral(lastOrd(t))])
else:
putIntoDest(p, d, e.typ, ropef("(NI$4)($2 $1 $3)", [toRope(opr[m]),
rdLoc(a), rdLoc(b), toRope(getSize(t) * 8)]))
proc unaryArithOverflow(p: BProc, e: PNode, d: var TLoc, m: TMagic) = proc unaryArithOverflow(p: BProc, e: PNode, d: var TLoc, m: TMagic) =
const const

View file

@ -2,12 +2,13 @@ For version 0.8.10
================== ==================
- fix implicit generic routines - fix implicit generic routines
- fix the streams implementation so that it uses methods - bugfix: ccgexprs
High priority (version 0.9.0) High priority (version 0.9.0)
============================= =============================
- fix the streams implementation so that it uses methods
- fix overloading resolution - fix overloading resolution
- wrong co-/contravariance - wrong co-/contravariance

View file

@ -33,7 +33,7 @@ case $uos in
*darwin* ) *darwin* )
myos="macosx" myos="macosx"
LINK_FLAGS="$LINK_FLAGS -ldl -lm" LINK_FLAGS="$LINK_FLAGS -ldl -lm"
if [ `sysctl hw |grep 64bit` = "hw.cpu64bit_capable: 1" ] ; then if [ "`sysctl hw |grep 64bit`" = "hw.cpu64bit_capable: 1" ] ; then
ucpu="amd64" ucpu="amd64"
fi fi
;; ;;