]> cloudbase.mooo.com Git - avrcpm.git/blobdiff - avr/Z80int-jmp.asm
SVN --> GIT
[avrcpm.git] / avr / Z80int-jmp.asm
index ab544d8107026554a1a2589241845b1a3f35b75a..40d5e3dacfb7ad62a6ae706c6550ed7eea89e95d 100644 (file)
@@ -21,7 +21,7 @@
 ;    You should have received a copy of the GNU General Public License
 ;    along with avrcpm.  If not, see <http://www.gnu.org/licenses/>.
 ;
-;    $Id$
+;    $Id: Z80int-jmp.asm 93 2014-01-03 16:32:32Z rapid $
 ;
 
 #if EM_Z80
@@ -582,11 +582,9 @@ do_store_pc:
 
 do_store_pcrel:                                ;add displacement to PC
 #if EM_Z80
-       clr     oph
-       tst     opl                     ;sign extend
-       brpl    stpcr1
-       com     oph
-stpcr1:
+       mov     oph,opl                 ;sign extend
+       lsl     oph
+       sbc     oph,oph
        add     z_pcl,opl
        adc     z_pch,oph
        ret
@@ -2067,10 +2065,9 @@ opprxcb_fd:
 opprxcb_1:
        mem_read_s z_pc                         ;get displacement
        adiw z_pcl,1                            ;++z_pc
-       clr     temp2                           ;sign extend
-       tst     temp
-       brpl    PC+2
-        com    temp2
+       mov     temp2,temp                      ;sign extend
+       lsl     temp2
+       sbc     temp2,temp2
        add     xl,temp                         ;add displacement
        adc     xh,temp2
        mem_read_d opl
@@ -2418,11 +2415,9 @@ fetchmxx_fd:
 fetchmxx1:
        mem_read_ds opl, z_pc                   ;get displacement
        adiw z_pcl,1
-       clr     oph                             ;sign extend
-       tst     opl
-       brpl    fetchmxx2
-       com     oph
-fetchmxx2:
+       mov     oph,opl                         ;sign extend
+       lsl     oph
+       sbc     oph,oph
        add     xl,opl                          ;add displacement
        adc     xh,oph
        mem_read_d opl                          ;get operand
@@ -2474,11 +2469,9 @@ storemxx_fd:
 storemxx1:
        mem_read_s z_pc                         ;get displacement
        adiw z_pcl,1
-       clr     temp2                           ;sign extend
-       tst     temp
-       brpl    storemxx2
-       com     temp2
-storemxx2:
+       mov     temp2,temp                      ;sign extend
+       lsl     temp2
+       sbc     temp2,temp2
        add     xl,temp                         ;add displacement
        adc     xh,temp2
        mem_write_s opl                         ;store operand
@@ -2505,11 +2498,9 @@ storemxx21:
        mem_read_s z_pc                         ;get displacement
        adiw    z_pcl,1
        adiw    z_pcl,1
-       clr     temp2                           ;sign extend
-       tst     temp
-       brpl    storemxx22
-       com     temp2
-storemxx22:
+       mov     temp2,temp                      ;sign extend
+       lsl     temp2
+       sbc     temp2,temp2
        add     xl,temp                         ;add displacement
        adc     xh,temp2
        mem_write_s opl                         ;store operand