OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib/] [newlib/] [libc/] [machine/] [w65/] [sdivhi3.s] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
        .global ___sdivhi3
2
 
3
___sdivhi3:
4
        lda     <r4
5
        ldx     <r5
6
 
7
        ldy     #0               !flag positive result
8
        rol     a
9
        ror     a
10
        bpl     L10
11
 
12
        iny                     !flag negative result
13
        eor     #0xFFFF
14
        inc     a
15
 
16
L10:    pha
17
        txa
18
        bpl     L20
19
 
20
        dey                     !flag negative/positive result
21
        eor     #0xFFFF
22
        inc     a
23
        tax
24
 
25
L20:    pla
26
        phy
27
        jsr     >udv
28
        ply
29
        beq     Lend            !if positive result
30
 
31
        eor     #0xFFFF         !negate result
32
        inc     a
33
 
34
Lend:   sta     <r0
35
        rtl

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.