Commit 465f6b41 authored by Xavier Leroy's avatar Xavier Leroy Committed by Xavier Leroy
Browse files

No need to process __builtin_fabs in $ARCH/Asmexpand.ml

__builtin_fabs has already been expanded in backend/Selection.v .
parent 907a9042
......@@ -347,8 +347,6 @@ let expand_builtin_inline name args res =
| ("__builtin_clsl" | "__builtin_clsll"), [BA(IR a1)], BR(IR res) ->
emit (Pcls(X, res, a1))
(* Float arithmetic *)
| "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
emit (Pfabs(D, res, a1))
| "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt(D, res, a1))
| "__builtin_fmadd", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
......
......@@ -349,8 +349,6 @@ let expand_builtin_inline name args res =
emit (Prsb(res, res, SOimm _32));
emit (Plabel lbl2)
(* Float arithmetic *)
| "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
emit (Pfabsd (res,a1))
| "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt (res,a1))
(* 64-bit integer arithmetic *)
......
......@@ -594,8 +594,6 @@ let expand_builtin_inline name args res =
emit (Pfnmadd(res, a1, a2, a3))
| "__builtin_fnmsub", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
emit (Pfnmsub(res, a1, a2, a3))
| "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
emit (Pfabs(res, a1))
| "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
emit (Pfsqrt(res, a1))
| "__builtin_frsqrte", [BA(FR a1)], BR(FR res) ->
......
......@@ -419,8 +419,6 @@ let expand_builtin_inline name args res =
expand_bswap32 X5 X5;
expand_bswap32 X6 X6
(* Float arithmetic *)
| "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
emit (Pfabsd(res, a1))
| "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
emit (Pfsqrtd(res, a1))
| "__builtin_fmadd", [BA(FR a1); BA(FR a2); BA(FR a3)], BR(FR res) ->
......
......@@ -378,10 +378,6 @@ let expand_builtin_inline name args res =
emit (Paddl_ri(res, coqint_of_camlint 32l));
emit (Plabel lbl2)
(* Float arithmetic *)
| "__builtin_fabs", [BA(FR a1)], BR(FR res) ->
if a1 <> res then
emit (Pmovsd_ff (res,a1));
emit (Pabsd res) (* This ensures that need_masks is set to true *)
| "__builtin_fsqrt", [BA(FR a1)], BR(FR res) ->
emit (Psqrtsd (res,a1))
| "__builtin_fmax", [BA(FR a1); BA(FR a2)], BR(FR res) ->
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment