Subversion Repositories tendra.SVN

Rev

Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 7
Line -... Line 1...
-
 
1
/*
-
 
2
 * Copyright (c) 2002-2005 The TenDRA Project <http://www.tendra.org/>.
-
 
3
 * All rights reserved.
-
 
4
 *
-
 
5
 * Redistribution and use in source and binary forms, with or without
-
 
6
 * modification, are permitted provided that the following conditions are met:
-
 
7
 *
-
 
8
 * 1. Redistributions of source code must retain the above copyright notice,
-
 
9
 *    this list of conditions and the following disclaimer.
-
 
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
-
 
11
 *    this list of conditions and the following disclaimer in the documentation
-
 
12
 *    and/or other materials provided with the distribution.
-
 
13
 * 3. Neither the name of The TenDRA Project nor the names of its contributors
-
 
14
 *    may be used to endorse or promote products derived from this software
-
 
15
 *    without specific, prior written permission.
-
 
16
 *
-
 
17
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
-
 
18
 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-
 
19
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-
 
20
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
-
 
21
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-
 
22
 * EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-
 
23
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-
 
24
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-
 
25
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-
 
26
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-
 
27
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
 
28
 *
-
 
29
 * $Id$
-
 
30
 */
1
/*
31
/*
2
    		 Crown Copyright (c) 1997
32
    		 Crown Copyright (c) 1997
3
 
33
 
4
    This TenDRA(r) Computer Program is subject to Copyright
34
    This TenDRA(r) Computer Program is subject to Copyright
5
    owned by the United Kingdom Secretary of State for Defence
35
    owned by the United Kingdom Secretary of State for Defence
Line 39... Line 69...
39
#include "localflags.h"
69
#include "localflags.h"
40
#include "szs_als.h"
70
#include "szs_als.h"
41
 
71
 
42
/* VARIABLES */
72
/* VARIABLES */
43
 
73
 
-
 
74
int freebsd_elf = 1;
44
char * local_prefix = "L";
75
char *local_prefix = ".L";
45
char * name_prefix = "_";
76
char *name_prefix = "";
46
 
77
 
47
 
78
 
48
 
79
 
49
/* PROCEDURES */
80
/* PROCEDURES */
-
 
81
 
-
 
82
void
-
 
83
set_freebsd_format(int elf)
-
 
84
{
-
 
85
	freebsd_elf = elf;
-
 
86
	if (elf == 1) {
-
 
87
		local_prefix = ".L";
-
 
88
		name_prefix = "";
-
 
89
	} else {
-
 
90
		local_prefix = "L";
-
 
91
		name_prefix = "_";
-
 
92
	}
-
 
93
}
50
 
94
 
51
/* is the result of a procedure delivering
95
/* is the result of a procedure delivering
52
   this shape produced in registers. */
96
   this shape produced in registers. */
53
int reg_result
97
int
54
    PROTO_N ( (sha) )
-
 
55
    PROTO_T ( shape sha )
98
reg_result(shape sha)
56
{
99
{
57
  unsigned char  n = name(sha);
100
  unsigned char n = name(sha);
58
  if (gcc_compatible) {
101
  if (gcc_compatible) {
59
    int sz = shape_size(sha);
102
    int sz = shape_size(sha);
60
    if (n == nofhd)
103
    if (n == nofhd) {
61
      return 0;
104
      return 0;
-
 
105
    }
62
    if (n == cpdhd && sz != 8 && sz != 16 && sz != 32 && sz != 64)
106
    if (n == cpdhd && sz != 8 && sz != 16 && sz != 32 && sz != 64) {
63
      return 0;
107
      return 0;
-
 
108
    }
64
    return 1;
109
    return 1;
65
  };
110
  }
66
  if (n == cpdhd || n == nofhd)
111
  if (n == cpdhd || n == nofhd) {
67
    return 0;
112
    return 0;
-
 
113
  }
68
  return 1;
114
  return 1;
69
}
115
}