From aa7d419165e7c32083da80c3d5651e8db87ad4a3 Mon Sep 17 00:00:00 2001 From: uz Date: Sat, 15 Aug 2009 21:06:06 +0000 Subject: [PATCH] More entry points for long ops that clear the high word of the lhs. git-svn-id: svn://svn.cc65.org/cc65/trunk@4025 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/runtime/land.s | 8 +++++++- libsrc/runtime/lor.s | 8 +++++++- libsrc/runtime/ludiv.s | 9 +++++++-- libsrc/runtime/lxor.s | 9 +++++++-- 4 files changed, 28 insertions(+), 6 deletions(-) diff --git a/libsrc/runtime/land.s b/libsrc/runtime/land.s index 1ee2a296d..1e66039e2 100644 --- a/libsrc/runtime/land.s +++ b/libsrc/runtime/land.s @@ -4,10 +4,16 @@ ; CC65 runtime: and on longs ; - .export tosandeax + .export tosand0ax, tosandeax .import addysp1 .importzp sp, sreg, tmp1 + +tosand0ax: + ldy #$00 + sty sreg + sty sreg+1 + tosandeax: ldy #0 and (sp),y ; byte 0 diff --git a/libsrc/runtime/lor.s b/libsrc/runtime/lor.s index 62051a211..841154b1d 100644 --- a/libsrc/runtime/lor.s +++ b/libsrc/runtime/lor.s @@ -4,9 +4,15 @@ ; CC65 runtime: or on longs ; - .export tosoreax + .export tosor0ax, tosoreax .import addysp1 .importzp sp, sreg, tmp1 + + +tosor0ax: + ldy #$00 + sty sreg + sty sreg+1 tosoreax: ldy #0 diff --git a/libsrc/runtime/ludiv.s b/libsrc/runtime/ludiv.s index 8b9ea98e9..aa40a9620 100644 --- a/libsrc/runtime/ludiv.s +++ b/libsrc/runtime/ludiv.s @@ -4,11 +4,16 @@ ; CC65 runtime: division for long unsigned ints ; - .export tosudiveax, getlop, udiv32 + .export tosudiv0ax, tosudiveax, getlop, udiv32 .import addysp1 .importzp sp, sreg, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4 -tosudiveax: +tosudiv0ax: + ldy #$00 + sty sreg + sty sreg+1 + +tosudiveax: jsr getlop ; Get the paramameters jsr udiv32 ; Do the division lda ptr1 ; Result is in ptr1:sreg diff --git a/libsrc/runtime/lxor.s b/libsrc/runtime/lxor.s index f772ebb89..46086fbc4 100644 --- a/libsrc/runtime/lxor.s +++ b/libsrc/runtime/lxor.s @@ -4,11 +4,16 @@ ; CC65 runtime: xor on longs ; - .export tosxoreax + .export tosxor0ax, tosxoreax .import addysp1 .importzp sp, sreg, tmp1 -tosxoreax: +tosxor0ax: + ldy #$00 + sty sreg + sty sreg+1 + +tosxoreax: ldy #0 eor (sp),y ; byte 0 sta tmp1 -- 2.39.5