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
86227443
Commit
86227443
authored
Nov 15, 2012
by
Matthias Braun
Browse files
bedwarf: query backend for pointer size
Also improve doku of machine_size element in backend_params struct.
parent
e7005849
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/be.h
View file @
86227443
...
...
@@ -134,8 +134,8 @@ typedef struct backend_params {
/** Backend settings for if-conversion. */
arch_allow_ifconv_func
allow_ifconv
;
/** size of machine words. This is usually the size of the general
purpose
*
integer
registers. */
/** size of machine word
in bit
s. This is usually the size of the general
*
purpose integer/address
registers. */
unsigned
machine_size
;
/**
...
...
ir/be/bedwarf.c
View file @
86227443
...
...
@@ -915,19 +915,20 @@ void be_dwarf_unit_begin(const char *filename)
emit_label
(
"info_section_begin"
);
emit_label
(
"info_begin"
);
const
backend_params
*
be_params
=
be_get_backend_param
();
/* length of compilation unit info */
emit_size
(
"compile_unit_begin"
,
"compile_unit_end"
);
emit_label
(
"compile_unit_begin"
);
emit_int16
(
3
);
/* dwarf version */
emit_address
(
"abbrev_begin"
);
emit_int8
(
4
);
/* pointer size, TODO: query backend
*/
emit_int8
(
be_params
->
machine_size
/
8
);
/* pointer size
*/
/* compile_unit die */
emit_uleb128
(
abbrev_compile_unit
);
emit_address
(
"line_section_begin"
);
emit_string_printf
(
"libFirm (%u.%u %s)"
,
ir_get_version_major
(),
ir_get_version_minor
(),
ir_get_version_revision
());
ir_get_version_minor
(),
ir_get_version_revision
());
emit_string
(
filename
);
if
(
language
!=
0
)
emit_int16
(
language
);
...
...
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