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

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [newlib/] [newlib/] [libc/] [sys/] [go32/] [clock.S] - Blame information for rev 1782

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 39 lampret
/* This is file CLOCK.S */
2
/*
3
** Copyright (C) 1993 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954
4
**
5
** This file is distributed under the terms listed in the document
6
** "copying.dj", available from DJ Delorie at the address above.
7
** A copy of "copying.dj" should accompany this file; if not, a copy
8
** should be available from where this file was obtained.  This file
9
** may not be distributed without a verbatim copy of "copying.dj".
10
**
11
** This file is distributed WITHOUT ANY WARRANTY; without even the implied
12
** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
**
14
** Modified by C. Sandmann for DPMI support (sandmann@clio.rice.edu)
15
*/
16
        .data
17
clock_init:
18
        .long   0
19
 
20
        .text
21
        .globl _clock
22
_clock:
23
        call    _rawclock
24
        imull   $54931,%eax,%eax
25
        ret
26
 
27
        .align  4,0x90
28
        .globl  _rawclock
29
_rawclock:
30
        movzwl  __core_select,%eax
31
        testl   %eax,%eax
32
        je      old_clock       /* Image run with pre-DPMI extender */
33
        movw    %ax,%gs
34
        movl    %gs:0x46c(,1),%eax
35
        jmp     check_initted
36
old_clock:
37
        movl    0xe000046c,%eax
38
check_initted:
39
        cmp     $0,clock_init
40
        jne     clock_initted
41
        movl    %eax,clock_init
42
clock_initted:
43
        subl    clock_init,%eax
44
        ret
45
 

powered by: WebSVN 2.1.0

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