Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
4d7bf718
Commit
4d7bf718
authored
May 01, 2003
by
Till Riedel
Browse files
removed xprint stuff completely
[r1115]
parent
37ea9048
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
configure
View file @
4d7bf718
This diff is collapsed.
Click to expand it.
configure.in
View file @
4d7bf718
...
...
@@ -230,7 +230,8 @@ fi
dnl Checks for typedefs, structures, and compiler characteristics.
dnl ==============================================================
AC_C_BIGENDIAN(,,,)
AC_C_LONG_DOUBLE
dnl Checks for library functions.
dnl =============================
...
...
ir/ana/cgana.c
View file @
4d7bf718
...
...
@@ -19,7 +19,6 @@
#include
"irgwalk.h"
#include
"ircons.h"
#include
"irgmod.h"
#include
"xprintf.h"
#include
"irnode.h"
#include
"irflag.h"
...
...
ir/ana/irscc.c
View file @
4d7bf718
...
...
@@ -16,7 +16,6 @@
#include
"irnode.h"
#include
"irgraph_t.h"
#include
"array.h"
#include
"xprintf.h"
#include
"irgwalk.h"
#include
"irprog.h"
...
...
ir/common/Makefile.in
View file @
4d7bf718
...
...
@@ -14,8 +14,8 @@ INSTALL_HEADERS := firm_common.h firm.h
SOURCES
=
$(INSTALL_HEADERS)
SOURCES
+=
Makefile.in panic.c tune.h
xgprintf.c xp_help.h
firm_common.c firm.c
\
misc.h panic.h
xfprintf.c xoprintf.c xprintf.h
firm_common_t.h
SOURCES
+=
Makefile.in panic.c tune.h firm_common.c firm.c
\
misc.h panic.h firm_common_t.h
include
$(topdir)/MakeRules
...
...
ir/common/firm.c
View file @
4d7bf718
...
...
@@ -15,7 +15,7 @@
# include "ident_t.h"
# include "firm.h"
# include "mangle.h"
# include "xp_help.h"
//
# include "xp_help.h"
# include "tv_t.h"
/* init functions are not public */
# include "tpop_t.h"
...
...
@@ -26,13 +26,6 @@
void
init_firm
(
default_initialize_local_variable_func_t
*
func
)
{
/* register the character 'I' as variable for ident outputs. */
xprintf_register
(
'I'
,
ident_print
);
/* register the character 'v' as variable for tarval outputs. */
xprintf_register
(
'v'
,
tarval_print
);
/* register the character 'R' as variable for ir node outputs. */
xprintf_register
(
'R'
,
ir_node_print
);
/* initialize all ident stuff */
id_init
();
/* create the type kinds. */
...
...
ir/common/panic.c
View file @
4d7bf718
...
...
@@ -14,7 +14,9 @@
# include <stdlib.h>
# include "panic.h"
# include "xprintf.h"
# include <stdio.h>
# include <stdarg.h>
void
panic
(
const
char
*
fmt
,
...)
...
...
ir/debug/dbginfo.h
View file @
4d7bf718
...
...
@@ -115,7 +115,7 @@ typedef enum {
/**
* Converts enum values to strings.
*/
static
const
char
*
dbg_action_2_str
(
dbg_action
a
)
{
inline
static
const
char
*
dbg_action_2_str
(
dbg_action
a
)
{
switch
(
a
)
{
case
dbg_error
:
return
"dbg_error"
;
break
;
case
dbg_opt_ssa
:
return
"dbg_opt_ssa"
;
break
;
...
...
ir/ident/ident.c
View file @
4d7bf718
...
...
@@ -98,10 +98,3 @@ int fprint_id (FILE *F, ident *id)
{
return
fprintf
(
F
,
"%s"
,
id_to_str
(
id
));
}
int
ident_print
(
XP_PAR1
,
const
xprintf_info
*
info
ATTRIBUTE
((
unused
)),
XP_PARN
)
{
ident
*
id
=
XP_GETARG
(
ident
*
,
0
);
return
XPMR
(
ID_TO_STR
(
id
),
ID_TO_STRLEN
(
id
));
}
ir/ident/ident_t.h
View file @
4d7bf718
...
...
@@ -14,11 +14,8 @@
# include "ident.h"
# include "xprintf.h"
# include "xp_help.h"
void
id_init
(
void
);
int
ident_print
(
XP_PAR1
,
const
xprintf_info
*
,
XP_PARN
);
/* @@@ tune */
#define ID_HASH(str, len) \
...
...
ir/ir/irnode.c
View file @
4d7bf718
...
...
@@ -14,7 +14,6 @@
#include
"irnode_t.h"
#include
"irgraph_t.h"
#include
"xp_help.h"
#include
"irmode_t.h"
#include
"typegmod_t.h"
#include
"array.h"
...
...
@@ -136,64 +135,6 @@ copy_attrs (ir_node *old, ir_node *new) {
memcpy
(
&
new
->
attr
,
&
old
->
attr
,
get_op_attr_size
(
get_irn_op
(
old
)));
}
/* IR-Nodes with attributes */
int
ir_node_print
(
XP_PAR1
,
const
xprintf_info
*
info
ATTRIBUTE
((
unused
)),
XP_PARN
)
{
int
printed
=
0
;
ir_node
*
np
=
XP_GETARG
(
ir_node
*
,
0
);
if
(
!
np
)
{
XPS
(
"<null ir_node>"
);
return
printed
;
}
XPF1
(
"%I"
,
get_irn_opident
(
np
));
switch
(
get_irn_opcode
(
np
))
{
/* node label */
case
iro_Const
:
XPF1
(
"%I"
,
get_irn_mode
(
np
)
->
name
);
XPS
(
" : "
);
XPF1
(
"%v"
,
get_irn_const_attr
);
break
;
case
iro_Proj
:
if
(
get_irn_mode
(
np
)
==
mode_b
)
{
XPC
(
" "
);
XP
(
pnc_name_arr
[
get_irn_proj_attr
(
np
)]);
}
else
if
(
get_irn_opcode
(
get_irn_in
(
np
)[
1
])
==
iro_Start
)
{
XPC
(
" "
);
XP
(
pns_name_arr
[
get_irn_proj_attr
(
np
)]);
}
else
{
XPF1
(
"%I"
,
get_irn_mode
(
np
)
->
name
);
XPC
(
" "
);
XPF1
(
"%d"
,
get_irn_proj_attr
(
np
));
}
break
;
case
iro_SymConst
:
XPF1
(
"%I"
,
get_irn_mode
(
np
)
->
name
);
XPC
(
" "
);
XP
(
symconst_name_arr
[
get_irn_symconst_attr
(
np
).
num
]);
XPF1
(
" %#N"
,
get_type_ident
(
get_SymConst_type
(
np
)));
break
;
case
iro_Start
:
/* don't dump mode of these */
case
iro_Cond
:
case
iro_Block
:
case
iro_Call
:
case
iro_Jmp
:
case
iro_Return
:
case
iro_End
:
case
iro_Break
:
case
iro_EndReg
:
case
iro_EndExcept
:
case
iro_CallBegin
:
break
;
default:
XPF1
(
"%I"
,
get_irn_mode
(
np
)
->
name
);
}
return
printed
;
}
/** getting some parameters from ir_nodes **/
/* returns the number of predecessors without the block predecessor. */
...
...
ir/ir/irnode_t.h
View file @
4d7bf718
...
...
@@ -20,7 +20,6 @@
#endif
# include "irnode.h"
# include "xprintf.h"
# include "irop_t.h"
# include "firm_common_t.h"
# include "irdom_t.h"
/* For size of struct dom_info. */
...
...
@@ -184,10 +183,6 @@ void
copy_attrs
(
ir_node
*
old
,
ir_node
*
new
);
/** Print IR-Nodes with attributes
@todo brauchen wir dienoch? dann fliegt ev. das xprint raus? */
int
ir_node_print
(
XP_PAR1
,
const
xprintf_info
*
,
XP_PARN
);
/** Returns the array with the ins. The content of the array may not be
changed. */
ir_node
**
get_irn_in
(
const
ir_node
*
node
);
...
...
ir/tr/mangle.c
View file @
4d7bf718
...
...
@@ -11,11 +11,11 @@
# include <config.h>
#endif
# include "xprintf.h"
# include "mangle.h"
# include <obstack.h>
# include "obst.h"
# include <stdlib.h>
# include <stdio.h>
# include "misc.h"
/* Make types visible to allow most efficient access */
...
...
@@ -34,10 +34,10 @@ mangle_entity (entity *ent)
ident
*
res
;
type_id
=
mangle_type
((
type
*
)
ent
->
owner
);
x
oprintf
(
&
mangle_obst
,
"%s_%s"
,
id_to_str
(
type_id
),
id_to_str
(
ent
->
name
));
o
bstack_
printf
(
&
mangle_obst
,
"%s_%s"
,
id_to_str
(
type_id
),
id_to_str
(
ent
->
name
));
len
=
obstack_object_size
(
&
mangle_obst
);
cp
=
obstack_finish
(
&
mangle_obst
);
res
=
id_from_str
(
cp
,
len
);
res
=
id_from_str
(
cp
,
len
);
obstack_free
(
&
mangle_obst
,
cp
);
return
res
;
}
...
...
@@ -52,7 +52,7 @@ mangle_type (type *tp)
assert
(
tp
->
kind
==
k_type
);
/* assert (tp->type_op->code == tpo_class); */
x
oprintf
(
&
mangle_obst
,
"%s"
,
id_to_str
(
tp
->
name
));
o
bstack_
printf
(
&
mangle_obst
,
"%s"
,
id_to_str
(
tp
->
name
));
len
=
obstack_object_size
(
&
mangle_obst
);
cp
=
obstack_finish
(
&
mangle_obst
);
res
=
id_from_str
(
cp
,
len
);
...
...
@@ -66,7 +66,7 @@ ident *mangle (ident *first, ident* scnd) {
int
len
;
ident
*
res
;
x
oprintf
(
&
mangle_obst
,
"%s%s"
,
id_to_str
(
first
),
id_to_str
(
scnd
));
o
bstack_
printf
(
&
mangle_obst
,
"%s%s"
,
id_to_str
(
first
),
id_to_str
(
scnd
));
len
=
obstack_object_size
(
&
mangle_obst
);
cp
=
obstack_finish
(
&
mangle_obst
);
res
=
id_from_str
(
cp
,
len
);
...
...
@@ -80,7 +80,7 @@ ident *mangle_u (ident *first, ident* scnd) {
int
len
;
ident
*
res
;
x
oprintf
(
&
mangle_obst
,
"%s_%s"
,
id_to_str
(
first
),
id_to_str
(
scnd
));
o
bstack_
printf
(
&
mangle_obst
,
"%s_%s"
,
id_to_str
(
first
),
id_to_str
(
scnd
));
len
=
obstack_object_size
(
&
mangle_obst
);
cp
=
obstack_finish
(
&
mangle_obst
);
res
=
id_from_str
(
cp
,
len
);
...
...
ir/tr/trvrfy.h
View file @
4d7bf718
...
...
@@ -18,7 +18,6 @@
*/
#include
"firm.h"
#include
"xprintf.h"
/**
* possible trvrfy() error codes
...
...
ir/tv/tv.c
View file @
4d7bf718
...
...
@@ -50,8 +50,6 @@
#include
"irmode.h"
/* defines modes etc */
#include
"irmode_t.h"
#include
"irnode.h"
/* defines boolean return values */
#include
"xprintf.h"
#include
"xp_help.h"
#include
"host.h"
#include
"strcalc.h"
#include
"fltcalc.h"
...
...
@@ -100,7 +98,7 @@ static void _fail_verify(tarval *tv, const char* file, int line)
assert
(
0
);
}
static
void
tarval_verify
(
tarval
*
tv
)
inline
static
void
tarval_verify
(
tarval
*
tv
)
{
assert
(
tv
);
assert
(
tv
->
mode
);
...
...
@@ -961,85 +959,6 @@ tarval *tarval_rot(tarval *a, tarval *b)
return
get_tarval
(
sc_get_buffer
(),
sc_get_buffer_length
(),
a
->
mode
);
}
/*
* Output of tarvals
*/
int
tarval_print
(
XP_PAR1
,
const
xprintf_info
*
info
ATTRIBUTE
((
unused
)),
XP_PARN
)
{
static
const
tarval_mode_info
default_info
=
{
TVO_NATIVE
,
NULL
,
NULL
};
tarval
*
tv
;
const
char
*
str
;
char
buf
[
100
];
const
tarval_mode_info
*
mode_info
;
const
char
*
prefix
,
*
suffix
;
ANNOUNCE
();
tv
=
XP_GETARG
(
tarval
*
,
0
);
mode_info
=
tv
->
mode
->
tv_priv
;
if
(
!
mode_info
)
mode_info
=
&
default_info
;
prefix
=
mode_info
->
mode_prefix
?
mode_info
->
mode_prefix
:
""
;
suffix
=
mode_info
->
mode_suffix
?
mode_info
->
mode_suffix
:
""
;
switch
(
get_mode_sort
(
tv
->
mode
))
{
case
irms_int_number
:
case
irms_character
:
switch
(
mode_info
->
mode_output
)
{
case
TVO_DECIMAL
:
str
=
sc_print
(
tv
->
value
,
get_mode_size_bits
(
tv
->
mode
),
SC_DEC
);
break
;
case
TVO_OCTAL
:
str
=
sc_print
(
tv
->
value
,
get_mode_size_bits
(
tv
->
mode
),
SC_OCT
);
break
;
case
TVO_HEX
:
case
TVO_NATIVE
:
default:
str
=
sc_print
(
tv
->
value
,
get_mode_size_bits
(
tv
->
mode
),
SC_HEX
);
break
;
}
return
XPF3R
(
"%s%s%s"
,
prefix
,
str
,
suffix
);
case
irms_float_number
:
return
XPF3R
(
"%s%s%s"
,
prefix
,
fc_print_dec
(
tv
->
value
,
buf
,
sizeof
(
buf
)),
suffix
);
case
irms_reference
:
if
(
tv
->
value
!=
NULL
)
if
(
tarval_is_entity
(
tv
))
if
(
get_entity_peculiarity
((
entity
*
)
tv
->
value
)
==
existent
)
return
XPF1R
(
"&(%I)"
,
get_entity_ld_ident
((
entity
*
)
tv
->
value
));
else
return
XPSR
(
"NULL"
);
else
return
XPMR
((
char
*
)
tv
->
value
,
tv
->
length
);
else
return
XPSR
(
"void"
);
case
irms_internal_boolean
:
switch
(
mode_info
->
mode_output
)
{
case
TVO_DECIMAL
:
case
TVO_OCTAL
:
case
TVO_HEX
:
case
TVO_BINARY
:
return
XPF3R
(
"%s%c%s"
,
prefix
,
(
tv
==
tarval_b_true
)
?
'1'
:
'0'
,
suffix
);
case
TVO_NATIVE
:
default:
return
XPF3R
(
"%s%s%s"
,
prefix
,
(
tv
==
tarval_b_true
)
?
"true"
:
"false"
,
suffix
);
}
case
irms_auxiliary
:
return
XPSR
(
"<BAD>"
);
}
return
0
;
}
/*
* Output of tarvals
...
...
ir/tv/tv_t.h
View file @
4d7bf718
...
...
@@ -13,7 +13,6 @@
#define _TV_T_H_
#include
"tv.h"
#include
"xprintf.h"
/**
* This struct represents the aforementioned tarvals.
...
...
@@ -34,9 +33,6 @@ struct tarval {
unsigned
int
length
;
/**< the length of the stored value */
};
/** xfprint output */
int
tarval_print
(
XP_PAR1
,
const
xprintf_info
*
,
XP_PARN
);
/** remove tarval representing an entity that is about to be destroyed */
void
free_tarval_entity
(
entity
*
ent
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment