00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #include "elf_stuff.h"
00058
00059 #define USE_STANDARD_TYPES 1
00060 #include "defs.h"
00061 #include "targ_const.h"
00062 #include "targ_const_private.h"
00063 #include "vstring.h"
00064 #include "config_asm.h"
00065 #include "em_elf.h"
00066 #include "symtab.h"
00067 #include "tn.h"
00068 #include "cgemit.h"
00069 #include "cgemit_targ.h"
00070 #include "data_layout.h"
00071 #include "bb.h"
00072 #include "op.h"
00073 #include "iface_scn.h"
00074 #include "cg_flags.h"
00075 #include "glob.h"
00076 #include "sections.h"
00077
00078 static ST *current_pu = NULL;
00079
00080 static BOOL
00081 Non_Default_Text_Section (ST *pu)
00082 {
00083 if (!pu || !ST_base(pu))
00084 return FALSE;
00085
00086 return ((ST_sclass(ST_base(pu)) == SCLASS_TEXT) &&
00087 strcmp(ST_name(ST_base(pu)), ".text"));
00088 }
00089
00090
00091 void
00092 CGEMIT_Targ_Initialize (ST *pu)
00093 {
00094 current_pu = pu;
00095 }
00096
00097
00098 void
00099 CGEMIT_Targ_Text_Initialize (ST *pu)
00100 {
00101 if (Non_Default_Text_Section(pu))
00102 fprintf (Asm_File, "\t.begin\tliteral_prefix %s\n", ST_name(ST_base(pu)));
00103 }
00104
00105
00106 void
00107 CGEMIT_Targ_Text_Finalize (ST *pu)
00108 {
00109 if (Non_Default_Text_Section(pu))
00110 fprintf (Asm_File, "\t.end\tliteral_prefix\n");
00111 }
00112
00113
00114 BOOL
00115 CGEMIT_Align_Section_Once (const char *scn_name)
00116 {
00117 return strcmp(scn_name, ".literal") && strcmp(scn_name, ".text");
00118 }
00119
00120 void
00121 CGEMIT_Prn_File_Dir_In_Asm(USRCPOS usrcpos,
00122 const char *pathname,
00123 const char *filename)
00124 {
00125 if (CG_emit_non_gas_syntax)
00126 fprintf (Asm_File, "\t%s\t%d\t\"%s/%s\"\n",
00127 AS_FILE, USRCPOS_filenum(usrcpos)-1, pathname, filename);
00128 #ifdef TARG_SL
00129 else {
00130 if (pathname == NULL)
00131 fprintf (Asm_File, "\t%s\t%d\t\"%s\"\n",
00132 AS_FILE, USRCPOS_filenum(usrcpos), filename);
00133 else
00134 fprintf (Asm_File, "\t%s\t%d\t\"%s/%s\"\n",
00135 AS_FILE, USRCPOS_filenum(usrcpos), pathname, filename);
00136 }
00137 #else
00138 else fprintf (Asm_File, "\t%s\t%d\t\"%s/%s\"\n",
00139 AS_FILE, USRCPOS_filenum(usrcpos), pathname, filename);
00140 #endif
00141 }
00142
00143 extern void
00144 CGEMIT_Prn_Line_Dir_In_Asm (USRCPOS usrcpos)
00145 {
00146 if(!CG_emit_asm_dwarf) {
00147 fprintf (Asm_File, " # ");
00148 }
00149 if (CG_emit_non_gas_syntax)
00150 fprintf (Asm_File, "\t.loc\t%d\t%d\t%d\n",
00151 USRCPOS_filenum(usrcpos)-1,
00152 USRCPOS_linenum(usrcpos),
00153 USRCPOS_column(usrcpos));
00154 else
00155 fprintf (Asm_File, "\t.loc\t%d\t%d\t%d\n",
00156 USRCPOS_filenum(usrcpos),
00157 USRCPOS_linenum(usrcpos),
00158 USRCPOS_column(usrcpos));
00159 }
00160
00161
00162 void
00163 CGEMIT_Prn_Scn_In_Asm (ST *st, ST *cur_section)
00164 {
00165 UINT32 tmp, power;
00166 power = 0;
00167 for (tmp = STB_align(st); tmp > 1; tmp >>= 1) power++;
00168 CGEMIT_Prn_Scn_In_Asm(Asm_File,
00169 ST_name(st),
00170 Get_Section_Elf_Type(STB_section_idx(st)),
00171 Get_Section_Elf_Flags(STB_section_idx(st)),
00172 Get_Section_Elf_Entsize(STB_section_idx(st)),
00173 power,
00174 (cur_section != NULL) ? ST_name(cur_section) : NULL);
00175 }
00176
00177 void
00178 CGEMIT_Prn_Scn_In_Asm (FILE *asm_file,
00179 const char *scn_name,
00180 Elf64_Word scn_type,
00181 Elf64_Word scn_flags,
00182 Elf64_Xword scn_entsize,
00183 Elf64_Word scn_align,
00184 const char *cur_scn_name)
00185 {
00186 if ((cur_scn_name != NULL) && !strcmp(cur_scn_name, ".literal"))
00187 {
00188
00189
00190
00191 if (Non_Default_Text_Section(current_pu))
00192 fprintf (asm_file, "\t.end\tliteral_prefix\n");
00193 }
00194
00195
00196
00197 if (!strcmp(scn_name, ".data") || !strcmp(scn_name, ".text"))
00198 {
00199 fprintf (asm_file, "\n\t%s", scn_name);
00200 }
00201 else if (!strcmp(scn_name, ".literal"))
00202 {
00203
00204
00205 if (Non_Default_Text_Section(current_pu))
00206 {
00207 CGEMIT_Prn_Scn_In_Asm(ST_base(current_pu), NULL);
00208 fprintf (asm_file, "\t.begin\tliteral_prefix %s\n",
00209 ST_name(ST_base(current_pu)));
00210 }
00211 else
00212 {
00213 fprintf (asm_file, "\n\t.text\n");
00214 }
00215 fprintf (asm_file, "\t.literal_position\n");
00216 }
00217 else
00218 {
00219 char scn_flags_string[5];
00220 char *p = &scn_flags_string[0];
00221
00222 fprintf (asm_file, "\n\t%s %s", AS_SECTION, scn_name);
00223 if (CG_emit_non_gas_syntax && strcmp(scn_name, ".srdata") == 0) {
00224 static BOOL printed = FALSE;
00225 if (!printed) {
00226 fprintf(asm_file, ", %d, %#x, %lld, ",
00227 scn_type, scn_flags, scn_entsize);
00228 int tmp1 = 1, tmp2 = scn_align;
00229 for (; tmp2 >= 1; tmp1 *= 2, tmp2 --);
00230 fprintf(asm_file, "%d", tmp1);
00231 printed = TRUE;
00232 }
00233 }
00234 if (! CG_emit_non_gas_syntax) {
00235 if (scn_flags & SHF_WRITE) *p++ = 'w';
00236 if (scn_flags & SHF_ALLOC) *p++ = 'a';
00237 if (scn_flags & SHF_EXECINSTR) *p++ = 'x';
00238 *p = '\0';
00239 fprintf (asm_file, ", \"%s\"", scn_flags_string);
00240 }
00241 }
00242
00243 fprintf (asm_file, "\n");
00244
00245
00246
00247
00248
00249
00250 if (!CGEMIT_Align_Section_Once(scn_name))
00251 fprintf (asm_file, "\t%s\t%d\n", AS_ALIGN, scn_align);
00252 }
00253
00254 void
00255 CGEMIT_Change_Origin_In_Asm (ST *st, INT64 offset)
00256 {
00257
00258
00259 #define EH_REGION_LINKONCE_PREFIX ".gnu.linkonce.e."
00260 #define EH_DESC_LINKONCE_PREFIX ".gnu.linkonce.h."
00261
00262
00263
00264
00265
00266
00267
00268
00269
00270
00271
00272
00273 if (strcmp(ST_name(st), ".literal") &&
00274 strcmp(ST_name(st), ".xt_except_table") &&
00275 strcmp(ST_name(st), ".xt_desc_table") &&
00276 strncmp(ST_name(st), EH_REGION_LINKONCE_PREFIX,
00277 strlen(EH_REGION_LINKONCE_PREFIX)) &&
00278 strncmp(ST_name(st), EH_DESC_LINKONCE_PREFIX,
00279 strlen(EH_DESC_LINKONCE_PREFIX)))
00280 {
00281
00282
00283
00284
00285 if(strcmp(ST_name(st),".except_table")) {
00286 if (CG_emit_non_gas_syntax)
00287 fprintf (Asm_File, "\t%s 0x%llx\n", ".origin", offset);
00288 else fprintf (Asm_File, "\t%s 0x%llx\n", AS_ORIGIN, offset);
00289 }
00290 fprintf ( Asm_File, "\t%s\t0\n", AS_ALIGN );
00291
00292 }
00293 }
00294
00295
00296
00297 extern BOOL
00298 CGEMIT_Use_Base_ST_For_Reloc (INT reloc, ST *st)
00299 {
00300 if (reloc == TN_RELOC_IA_LTOFF_FPTR)
00301
00302 return FALSE;
00303
00304
00305 else if (ST_sclass(st) == SCLASS_TEXT)
00306 return FALSE;
00307 else
00308 return ST_is_export_local(st);
00309 }
00310
00311
00312 extern INT
00313 CGEMIT_Relocs_In_Asm (TN *t, ST *st, vstring *buf, INT64 *val)
00314 {
00315 INT paren = 1;
00316
00317
00318 if (ST_class(st) == CLASS_BLOCK && STB_section(st)) {
00319 *val -= GP_DISP;
00320 }
00321 switch (TN_relocs(t)) {
00322 case TN_RELOC_GOT_DISP:
00323 *buf = vstr_concat (*buf, "%got_disp");
00324 break;
00325 case TN_RELOC_GOT_PAGE:
00326 *buf = vstr_concat (*buf, "%got_page");
00327 break;
00328 case TN_RELOC_GOT_OFST:
00329 *buf = vstr_concat (*buf, "%got_ofst");
00330 break;
00331 case TN_RELOC_HI_GPSUB:
00332 *buf = vstr_concat (*buf, "%hi(%neg(%gp_rel");
00333 paren += 2;
00334 break;
00335 case TN_RELOC_LO_GPSUB:
00336 *buf = vstr_concat (*buf, "%lo(%neg(%gp_rel");
00337 paren += 2;
00338 break;
00339 case TN_RELOC_GPREL16:
00340 *buf = vstr_concat (*buf, "%gp_rel");
00341 break;
00342 case TN_RELOC_HIGH16:
00343 *buf = vstr_concat (*buf, "%hi");
00344 break;
00345 case TN_RELOC_LOW16:
00346 *buf = vstr_concat (*buf, "%lo");
00347 break;
00348 #ifdef TARG_SL
00349 case TN_RELOC_GPREL_V1:
00350 *buf = vstr_concat(*buf, "%secrel_v1");
00351 break;
00352 case TN_RELOC_GPREL_V2:
00353 *buf = vstr_concat(*buf, "%secrel_v2");
00354 break;
00355 case TN_RELOC_GPREL_V4:
00356 *buf = vstr_concat(*buf, "%secrel_v4");
00357 break;
00358 case TN_RELOC_GPREL_S:
00359 *buf = vstr_concat(*buf, "%secrel_s");
00360 break;
00361 case TN_RELOC_GPREL_V1_15:
00362 *buf = vstr_concat(*buf, "%secrel_v1_15");
00363 break;
00364 case TN_RELOC_GPREL_V2_15:
00365 *buf = vstr_concat(*buf, "%secrel_v2_15");
00366 break;
00367 case TN_RELOC_GPREL_V4_15:
00368 *buf = vstr_concat(*buf, "%secrel_v4_15");
00369 break;
00370 #endif
00371 #ifdef TARG_SL2
00372 case TN_RELOC_GPREL_SL2_V11:
00373 *buf = vstr_concat(*buf, "%secrel_sl2_v11");
00374 break;
00375 case TN_RELOC_GPREL_SL2_V15:
00376 *buf = vstr_concat(*buf, "%secrel_sl2_v15");
00377 break;
00378 case TN_RELOC_GPREL_SL2_S:
00379 *buf = vstr_concat(*buf, "%secrel_sl2_s");
00380 break;
00381 #endif
00382 default:
00383 #pragma mips_frequency_hint NEVER
00384 FmtAssert (FALSE, ("relocs_asm: illegal reloc TN"));
00385
00386 }
00387 *buf = vstr_concat (*buf, "(" );
00388 *buf = vstr_concat (*buf, ST_name(st));
00389 *buf = vstr_concat (*buf, Symbol_Name_Suffix);
00390 return paren;
00391 }
00392
00393
00394 extern void
00395 CGEMIT_Relocs_In_Object (TN *t, ST *st, INT32 PC, pSCNINFO PU_section, INT64 *val)
00396 {
00397 FmtAssert(FALSE, ("NYI"));
00398 }
00399
00400
00401 extern void
00402 CGEMIT_Add_Call_Information (OP *op, BB *bb, INT32 PC, pSCNINFO PU_section)
00403 {
00404 ANNOTATION *ant = ANNOT_Get (BB_annotations(bb), ANNOT_CALLINFO);
00405 ST *call_sym = CALLINFO_call_st(ANNOT_callinfo(ant));
00406 Elf_Event_Kind event_type;
00407
00408 if (call_sym == NULL) return;
00409 if (ST_is_export_local(call_sym)) {
00410 event_type = EK_FCALL_LOCAL;
00411 }
00412 else {
00413 event_type = EK_FCALL_EXTERN;
00414 }
00415 Em_Add_New_Event (event_type, PC, EMT_Put_Elf_Symbol(call_sym),
00416 0, 0, PU_section);
00417
00418
00419
00420
00421
00422
00423 Em_Add_New_Rela (EMT_Put_Elf_Symbol(call_sym),
00424 R_IA_64_PCREL21B, PC, 0, PU_section);
00425
00426 if (EMIT_interface_section) {
00427 Interface_Scn_Add_Call( call_sym,
00428 CALLINFO_call_wn(ANNOT_callinfo(ant)));
00429 }
00430 }
00431
00432
00433
00434 void
00435 CGEMIT_Gen_Asm_Frame (INT64 frame_len)
00436 {
00437 if (CG_inhibit_size_directive)
00438 return;
00439 TN *tn = ((Current_PU_Stack_Model == SMODEL_SMALL) ? SP_TN : FP_TN);
00440 ISA_REGISTER_CLASS rc = TN_register_class(tn);
00441 REGISTER reg = TN_register(tn);
00442 fprintf ( Asm_File, "\t%s\t%s, %lld, %s\n",
00443 AS_FRAME,
00444 ABI_PROPERTY_Reg_Name(rc, REGISTER_machine_id(rc, reg)),
00445 frame_len,
00446 ABI_PROPERTY_Reg_Name(rc, REGISTER_machine_id(rc, TN_register(RA_TN))));
00447 }
00448
00449
00450
00451 void
00452 CGEMIT_Prn_Ent_In_Asm (ST *pu)
00453 {
00454 BB_LIST *ent_list;
00455
00456 fprintf ( Asm_File, "\t%s\t", AS_ENT);
00457 EMT_Write_Qualified_Name(Asm_File, pu);
00458
00459 if (CG_emit_non_gas_syntax)
00460 for (ent_list = Entry_BB_Head; ent_list; ent_list = BB_LIST_rest(ent_list)) {
00461 BB *bb = BB_LIST_first(ent_list);
00462 ANNOTATION *ant = ANNOT_Get (BB_annotations(bb), ANNOT_ENTRYINFO);
00463 ENTRYINFO *ent = ANNOT_entryinfo(ant);
00464 ST *entry_sym = ENTRYINFO_name(ent);
00465
00466 if ( !ST_is_not_used(entry_sym)) {
00467 const char *entry_name = ST_name(entry_sym);
00468 if (strcmp( Cur_PU_Name, entry_name ) != 0) {
00469 fprintf (Asm_File, ", %s", entry_name);
00470 }
00471 }
00472 }
00473
00474 fprintf ( Asm_File, "\n");
00475 }
00476 #ifdef TARG_SL
00477 static void Gen_Register_Mask(REGISTER_SET *interrupt_saved, REGISTER_SET *ctrl_saved,
00478 REGISTER_SET *spe_saved) {
00479 BB *bb;
00480 OP *op;
00481
00482 REGISTER_SET caller_saved = REGISTER_CLASS_caller_saves(ISA_REGISTER_CLASS_integer);
00483 REGISTER_SET used_gpr = REGISTER_SET_EMPTY_SET;
00484 REGISTER_SET used_spe_reg = REGISTER_SET_EMPTY_SET;
00485 REGISTER_SET used_ctr_reg = REGISTER_SET_EMPTY_SET;
00486
00487 for(bb = REGION_First_BB; bb; bb = BB_next(bb))
00488 {
00489 FOR_ALL_BB_OPs(bb, op)
00490 {
00491 for(INT i = 0; i < OP_results(op); i++) {
00492 TN* tn = OP_result(op, i);
00493 if (TN_is_register(tn) && (TN_register_class(tn) == ISA_REGISTER_CLASS_integer)) {
00494 used_gpr = REGISTER_SET_Union(used_gpr, (1 << (TN_register(tn)-1)));
00495 } else if (tn == JA_TN) {
00496 used_ctr_reg = REGISTER_SET_Union (used_ctr_reg, 1);
00497 } else if (tn == RA_TN) {
00498 used_ctr_reg = REGISTER_SET_Union (used_ctr_reg, 2);
00499 } else if (TN_is_LoopRegister(tn)) {
00500
00501 used_ctr_reg = REGISTER_SET_Union(used_ctr_reg, (1 << (TN_number(tn)-TN_number(LC0_TN)+2)));
00502 } else if (tn == HI_TN) {
00503
00504 used_spe_reg = REGISTER_SET_Union(used_spe_reg, 21);
00505 } else if (TN_is_AddrRegister(tn)) {
00506 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Addr0_TN))));
00507 } else if (TN_is_AccRegister(tn)) {
00508 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Acc0_TN)+16)));
00509 } else if (TN_is_AddrSizeRegister(tn)) {
00510 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Addrsize0_TN)+8)));
00511 }
00512 }
00513 if (CG_ISR == 2) {
00514 for(INT i = 0; i < OP_opnds(op); i++) {
00515 TN* tn = OP_opnd(op, i);
00516 if (TN_is_register(tn) && (TN_register_class(tn) == ISA_REGISTER_CLASS_integer)) {
00517 used_gpr = REGISTER_SET_Union(used_gpr, (1 << (TN_register(tn)-1)));
00518 } else if (tn == JA_TN) {
00519 used_ctr_reg = REGISTER_SET_Union (used_ctr_reg, 1);
00520 } else if (tn == RA_TN) {
00521 used_ctr_reg = REGISTER_SET_Union (used_ctr_reg, 2);
00522 } else if (TN_is_LoopRegister(tn)) {
00523
00524 used_ctr_reg = REGISTER_SET_Union(used_ctr_reg, (1 << (TN_number(tn)-TN_number(LC0_TN)+2)));
00525 } else if (tn == HI_TN) {
00526
00527 used_spe_reg = REGISTER_SET_Union(used_spe_reg, 21);
00528 } else if (TN_is_AddrRegister(tn)) {
00529 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Addr0_TN))));
00530 } else if (TN_is_AccRegister(tn)) {
00531 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Acc0_TN)+16)));
00532 } else if (TN_is_AddrSizeRegister(tn)) {
00533 used_spe_reg = REGISTER_SET_Union(used_spe_reg, (1 << (TN_number(tn)-TN_number(Addrsize0_TN)+8)));
00534 }
00535 }
00536 }
00537 }
00538 }
00539 *interrupt_saved = REGISTER_SET_Intersection(caller_saved, used_gpr);
00540 *ctrl_saved = used_ctr_reg;
00541 *spe_saved = used_spe_reg;
00542
00543 if (0) {
00544 REGISTER_SET_Print(caller_saved, stdout);
00545 printf("caller_saved = %x\n", caller_saved);
00546 REGISTER_SET_Print(used_gpr, stdout);
00547 REGISTER_SET_Print(*interrupt_saved, stdout);
00548 REGISTER_SET_Print(used_ctr_reg, stdout);
00549 REGISTER_SET_Print(used_spe_reg, stdout);
00550 }
00551 }
00552
00553
00554
00555 void CGEMIT_Prn_Used_Callersaved_In_Asm (void)
00556 {
00557 REGISTER_SET gpr_saved = REGISTER_SET_EMPTY_SET;
00558 REGISTER_SET ctrl_saved = REGISTER_SET_EMPTY_SET;
00559 REGISTER_SET spe_saved = REGISTER_SET_EMPTY_SET;
00560 Gen_Register_Mask(&gpr_saved, &ctrl_saved, &spe_saved);
00561 if (CG_ISR == 1) {
00562
00563 fprintf (Asm_File, "\t# defined caller-saved GPR: 0x%x\n", gpr_saved);
00564 fprintf (Asm_File, "\t# defined ctrl-register: 0x%x\n", ctrl_saved);
00565 fprintf (Asm_File, "\t# defined special-register: 0x%x\n", spe_saved);
00566 } else if (CG_ISR == 2) {
00567
00568 fprintf (Asm_File, "\t# used caller-saved GPR: 0x%x\n", gpr_saved);
00569 fprintf (Asm_File, "\t# used ctrl-register: 0x%x\n", ctrl_saved);
00570 fprintf (Asm_File, "\t# used special-register: 0x%x\n", spe_saved);
00571 }
00572
00573 }
00574 #endif
00575
00576
00577 void
00578 STACK_FP_Fixup_PU()
00579 {}
00580
00581 void
00582 CGEMIT_Weak_Alias (ST *sym, ST *strongsym)
00583 {
00584 fprintf ( Asm_File, "\t%s\t%s\n", AS_WEAK, ST_name(sym));
00585 fprintf ( Asm_File, "\t%s = %s\n", ST_name(sym), ST_name(strongsym));
00586 }
00587
00588 void CGEMIT_Write_Literal_TCON(ST *lit_st, TCON tcon)
00589 {
00590 INT64 val;
00591 if (TCON_ty(tcon) == MTYPE_F4)
00592 val = TCON_word0(tcon);
00593 else if ((TCON_ty(tcon) == MTYPE_I4) || (TCON_ty(tcon) == MTYPE_U4))
00594 val = TCON_v0(tcon);
00595 else
00596 FmtAssert(FALSE, ("Invalid literal value"));
00597 fprintf ( Asm_File, "\t%s\t", ".literal");
00598 EMT_Write_Qualified_Name(Asm_File, lit_st);
00599 if ((val >= INT32_MIN) && (val <= INT32_MAX))
00600 fprintf(Asm_File, ", %lld\n", val);
00601 else
00602 fprintf(Asm_File, ", %#llx\n", val);
00603
00604 }
00605
00606 void CGEMIT_Write_Literal_Label (ST *lit_st, LABEL_IDX lab)
00607 {
00608 fprintf ( Asm_File, "\t%s\t", ".literal");
00609 EMT_Write_Qualified_Name(Asm_File, lit_st);
00610 union {
00611 UINT64 u;
00612 void *p;
00613 } u;
00614 u.u = 0;
00615 u.p = LABEL_name(lab);
00616 fprintf(Asm_File, ", %lld\n", u.u);
00617 }
00618
00619 void CGEMIT_Write_Literal_Symbol (ST *lit_st, ST *sym,
00620 Elf64_Sxword sym_ofst)
00621 {
00622 ST *basesym;
00623 basesym = sym;
00624 INT64 base_ofst = 0;
00625
00626 if (Has_Base_Block(sym) && ST_is_export_local(sym) && ST_class(sym) != CLASS_FUNC) {
00627 Base_Symbol_And_Offset (sym, &basesym, &base_ofst);
00628 }
00629 base_ofst += sym_ofst;
00630
00631 fprintf ( Asm_File, "\t%s\t", ".literal");
00632 EMT_Write_Qualified_Name(Asm_File, lit_st);
00633 fprintf ( Asm_File, ", ");
00634 if (ST_class(sym) == CLASS_CONST) {
00635 EMT_Write_Qualified_Name (Asm_File, basesym);
00636 if (base_ofst == 0)
00637 fprintf (Asm_File, "\n");
00638 else
00639 fprintf (Asm_File, " %+lld\n", base_ofst);
00640 }
00641 else {
00642 EMT_Write_Qualified_Name (Asm_File, sym);
00643 if (sym_ofst == 0)
00644 fprintf (Asm_File, "\n");
00645 else
00646 fprintf (Asm_File, " %+lld\n", sym_ofst);
00647 }
00648 }
00649
00650 void
00651 CGEMIT_Alias (ST *sym, ST *strongsym)
00652 {
00653 fprintf ( Asm_File, "\t%s = %s\n", ST_name(sym), ST_name(strongsym));
00654 }
00655