math routine implementation with .s files
John Rose
john.r.rose at oracle.com
Mon Jun 4 20:48:29 UTC 2018
On Jun 4, 2018, at 8:53 AM, Kandu, Rahul <rahul.kandu at intel.com> wrote:
>
> Hi Vladimir,
>
> There is an issue with merging these .s files. All of these files use the same labels e.g. ..TXTST0:, ..B1.1, ..L2 etc. Merging them would mean we edit the .s files to change the labels for them everywhere, which can be error prone even with script/automation.
On Jun 4, 2018, at 8:53 AM, Kandu, Rahul <rahul.kandu at intel.com> wrote:
>
> There is an issue with merging these .s files. All of these files use the same labels e.g. ..TXTST0:, ..B1.1, ..L2 etc. Merging them would mean we edit the .s files to change the labels for them everywhere, which can be error prone even with script/automation.
Here's a workaround I'd try: Use the C preprocessor to edit the
colliding names. You can put them all at the top of the combo
file and use a single definition to shift the adjustment rule from
subfile to subfile.
# +++ adjustments for conflicting identifiers
#define B1 FILE_SCOPE(B1)
#define L2 FILE_SCOPE(L2)
#define FILE_SCOPE(x) x##_##FILE_SCOPE_NAME
# +++ scope file1.s
#undef FILE_SCOPE_NAME
#define FILE_SCOPE_NAME file1
# +++ begin file1.s
B1: foo
# +++ end file1.s
# +++ scope file1.s
#undef FILE_SCOPE_NAME
#define FILE_SCOPE_NAME file2
# +++ begin file2.s
B1: bar
# +++ end file2.s
More information about the panama-dev
mailing list