diff options
author | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-11 06:01:38 +0000 |
---|---|---|
committer | Sanjiv Gupta <sanjiv.gupta@microchip.com> | 2009-05-11 06:01:38 +0000 |
commit | 0608b49819c5d665636e48ccc9b3b018ac1595d8 (patch) | |
tree | d3bf049dd6a9a01b5bb1da2f91b23154345edcde /lib/Target/PIC16/PIC16.h | |
parent | 26e2de135c8eeba4d2e4bf7a493b383e3f25f6eb (diff) |
Detect calls to compiler intrinsics and emit an extern declarations
only for those. These extern declarations to intrinsics are currently
being emitted at the bottom of generated .s file, which works fine with
gpasm(not sure about MPSAM though).
PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any
extern declarations (even if no intrinsics are being used), but that
needs to be fixed in the linker itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PIC16/PIC16.h')
-rw-r--r-- | lib/Target/PIC16/PIC16.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/PIC16/PIC16.h b/lib/Target/PIC16/PIC16.h index 04fb172030..bf4421b2f2 100644 --- a/lib/Target/PIC16/PIC16.h +++ b/lib/Target/PIC16/PIC16.h @@ -114,7 +114,7 @@ namespace PIC16CC { case TEMPS_LABEL: return ".temp."; case ARGS_LABEL: return ".args."; case RET_LABEL: return ".ret."; - case LIBCALL: return ".lib."; + case LIBCALL: return "__intrinsics"; case FRAME_SECTION: return ".fpdata."; case AUTOS_SECTION: return ".fadata."; case CODE_SECTION: return "code"; @@ -234,6 +234,12 @@ namespace PIC16CC { return o.str(); } + static std::string getDeclSectionName(void) { + std::string dsname = "decl_section.1"; + dsname = addPrefix(dsname); + return dsname; + } + inline static bool isLocalName (const std::string &Name) { if (getSymbolTag(Name) == AUTOS_LABEL) return true; |