ia64/xen-unstable

changeset 16925:01e178f7ec6d

minios: Fix ia64 build.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 28 12:58:57 2008 +0000 (2008-01-28)
parents 3a263c0cf989
children e23144190f93
files extras/mini-os/arch/ia64/Makefile extras/mini-os/arch/ia64/__udivsi3.S extras/mini-os/include/lib.h
line diff
     1.1 --- a/extras/mini-os/arch/ia64/Makefile	Mon Jan 28 12:04:38 2008 +0000
     1.2 +++ b/extras/mini-os/arch/ia64/Makefile	Mon Jan 28 12:58:57 2008 +0000
     1.3 @@ -36,6 +36,7 @@ ARCH_OBJS += sched.o
     1.4  ARCH_OBJS += xencomm.o
     1.5  ARCH_OBJS += __umoddi3.o
     1.6  ARCH_OBJS += __udivdi3.o
     1.7 +ARCH_OBJS += __udivsi3.o
     1.8  ARCH_OBJS += __divdi3.o
     1.9  
    1.10  GEN_OFF_SRC := gen_off.c
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/extras/mini-os/arch/ia64/__udivsi3.S	Mon Jan 28 12:58:57 2008 +0000
     2.3 @@ -0,0 +1,124 @@
     2.4 +.file "__udivsi3.s"
     2.5 +
     2.6 +// $FreeBSD: src/sys/libkern/ia64/__udivsi3.S,v 1.1.8.1 2005/01/31 23:26:21 imp Exp $
     2.7 +
     2.8 +//-
     2.9 +// Copyright (c) 2000, Intel Corporation
    2.10 +// All rights reserved.
    2.11 +//
    2.12 +// Contributed 2/15/2000 by Marius Cornea, John Harrison, Cristina Iordache, 
    2.13 +// Ted Kubaska, Bob Norin, and Shane Story of the Computational Software Lab, 
    2.14 +// Intel Corporation.
    2.15 +//
    2.16 +// WARRANTY DISCLAIMER
    2.17 +//
    2.18 +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    2.19 +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
    2.20 +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    2.21 +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS 
    2.22 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    2.23 +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    2.24 +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
    2.25 +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
    2.26 +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
    2.27 +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    2.28 +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2.29 +//
    2.30 +// Intel Corporation is the author of this code, and requests that all
    2.31 +// problem reports or change requests be submitted to it directly at
    2.32 +// http://developer.intel.com/opensource.
    2.33 +//
    2.34 +
    2.35 +.section .text
    2.36 +
    2.37 +// 32-bit unsigned integer divide
    2.38 +
    2.39 +.proc __udivsi3#
    2.40 +.align 32
    2.41 +.global __udivsi3#
    2.42 +.align 32
    2.43 +
    2.44 +__udivsi3:
    2.45 +
    2.46 +{ .mii
    2.47 +  alloc r31=ar.pfs,2,0,0,0
    2.48 +  nop.i 0
    2.49 +  nop.i 0;;
    2.50 +} { .mii
    2.51 +  nop.m 0
    2.52 +
    2.53 +  // 32-BIT UNSIGNED INTEGER DIVIDE BEGINS HERE
    2.54 +
    2.55 +  // general register used:
    2.56 +  //    r32 - 32-bit unsigned integer dividend
    2.57 +  //    r33 - 32-bit unsigned integer divisor
    2.58 +  //    r8 - 32-bit unsigned integer result
    2.59 +  //    r2 - scratch register
    2.60 +  // floating-point registers used: f6, f7, f8, f9
    2.61 +  // predicate registers used: p6
    2.62 +
    2.63 +  zxt4 r32=r32
    2.64 +  zxt4 r33=r33;;
    2.65 +} { .mmb
    2.66 +  setf.sig f6=r32
    2.67 +  setf.sig f7=r33
    2.68 +  nop.b 0;;
    2.69 +} { .mfi
    2.70 +  nop.m 0
    2.71 +  fcvt.xf f6=f6
    2.72 +  nop.i 0
    2.73 +} { .mfi
    2.74 +  nop.m 0
    2.75 +  fcvt.xf f7=f7
    2.76 +  mov r2 = 0x0ffdd;;
    2.77 +} { .mfi
    2.78 +  setf.exp f9 = r2
    2.79 +  // (1) y0
    2.80 +  frcpa.s1 f8,p6=f6,f7
    2.81 +  nop.i 0;;
    2.82 +} { .mfi
    2.83 +  nop.m 0
    2.84 +  // (2) q0 = a * y0
    2.85 +  (p6) fma.s1 f6=f6,f8,f0
    2.86 +  nop.i 0
    2.87 +} { .mfi
    2.88 +  nop.m 0
    2.89 +  // (3) e0 = 1 - b * y0
    2.90 +  (p6) fnma.s1 f7=f7,f8,f1
    2.91 +  nop.i 0;;
    2.92 +} { .mfi
    2.93 +  nop.m 0
    2.94 +  // (4) q1 = q0 + e0 * q0
    2.95 +  (p6) fma.s1 f6=f7,f6,f6
    2.96 +  nop.i 0
    2.97 +} { .mfi
    2.98 +  nop.m 0
    2.99 +  // (5) e1 = e0 * e0 + 2^-34
   2.100 +  (p6) fma.s1 f7=f7,f7,f9
   2.101 +  nop.i 0;;
   2.102 +} { .mfi
   2.103 +  nop.m 0
   2.104 +  // (6) q2 = q1 + e1 * q1
   2.105 +  (p6) fma.s1 f8=f7,f6,f6
   2.106 +  nop.i 0;;
   2.107 +} { .mfi
   2.108 +  nop.m 0
   2.109 +  // (7) q = trunc(q2)
   2.110 +  fcvt.fxu.trunc.s1 f8=f8
   2.111 +  nop.i 0;;
   2.112 +} { .mmi
   2.113 +  // quotient will be in the least significant 32 bits of r8 (if b != 0)
   2.114 +  getf.sig r8=f8
   2.115 +  nop.m 0
   2.116 +  nop.i 0;;
   2.117 +}
   2.118 +
   2.119 +  // 32-BIT UNSIGNED INTEGER DIVIDE ENDS HERE
   2.120 +
   2.121 +{ .mmb
   2.122 +  nop.m 0
   2.123 +  nop.m 0
   2.124 +  br.ret.sptk b0;;
   2.125 +}
   2.126 +
   2.127 +.endp __udivsi3
     3.1 --- a/extras/mini-os/include/lib.h	Mon Jan 28 12:04:38 2008 +0000
     3.2 +++ b/extras/mini-os/include/lib.h	Mon Jan 28 12:58:57 2008 +0000
     3.3 @@ -57,7 +57,6 @@
     3.4  
     3.5  #include <stdarg.h>
     3.6  #include <stddef.h>
     3.7 -#include <console.h>
     3.8  
     3.9  #ifdef HAVE_LIBC
    3.10  #include <stdio.h>
    3.11 @@ -98,6 +97,7 @@ char  *strstr(const char *s1, const char
    3.12  char * strcat(char * dest, const char * src);
    3.13  char  *strdup(const char *s);
    3.14  #endif
    3.15 +#include <console.h>
    3.16  
    3.17  #define RAND_MIX 2654435769U
    3.18