mac os x amd64 detection; missing C files added
This commit is contained in:
parent
7122973ff5
commit
9cf4cf0299
3 changed files with 22 additions and 2 deletions
|
|
@ -371,6 +371,25 @@ proc binaryArithOverflow(p: BProc, e: PNode, d: var TLoc, m: TMagic) =
|
|||
else:
|
||||
putIntoDest(p, d, e.typ, ropef("(NI$4)($2 $1 $3)", [toRope(opr[m]),
|
||||
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) =
|
||||
const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue