From: cuz Date: Fri, 10 Oct 2003 17:59:00 +0000 (+0000) Subject: Squeeze two cycles out of the abs() function X-Git-Tag: V2.12.0~1268 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3f06947b36a77d8a2e6dd8f3a147434740866de2;p=cc65 Squeeze two cycles out of the abs() function git-svn-id: svn://svn.cc65.org/cc65/trunk@2508 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/libsrc/common/abs.s b/libsrc/common/abs.s index 89161ab59..273ec1c9a 100644 --- a/libsrc/common/abs.s +++ b/libsrc/common/abs.s @@ -7,8 +7,7 @@ .export _abs .import negax -_abs: dex - inx ; test hi byte +_abs: cpx #$00 ; test hi byte bpl L1 jmp negax ; Negate if negative L1: rts