GreenHills 2017.7 编译手册

所需积分/C币:47 2019-03-28 14:09:27 8.82MB PDF
250
收藏 收藏
举报

本手册是GreenHills2017.7.14 版编译器的软件使用手册。
Contents Preface about this book XXV The multi document set , Conventions Uscd in thC multi Document Sct.......... XXvii The green hills Toolchain .,,,,XXX The C and c++ Compiler driver XXX The Optimizing compilers The asppc Assembler....... The ax librarian The lxr Linker XXXII Optimized Libraries and Header Files XXXII Utility Programs XXXIII The builder XXXIII Part I. Using the MULTI Compiler 1. The Compiler Driver Compiler Driver Syntax 5 Building an Executable from C or C++ Source Files Working with Input Files Recognized Input File types ····申 Passing Multiple Input File Types to the Driver 7899 Passing linker Directives Files to the Driver 看 generating Other Output File Types 10 Creating Libraries.∴ 11 Adding and Updating Files in Libraries 12 Driver Options for Intermediate Forms of Output 12 Output file types 13 Controlling Driver Information 15 Green Hills Software Contents USing a Drivcr Options Filc 16 Using Makefiles ········: 7 Driver Options for Individual compiler passes....... 21 Green Hills equivalents to gnu tools ...22 Generating Dependency and Header File Information ······ 22 2. Developing for Power Architecture 25 Power Architecture Characteristics 26 Register Usage 27 Data Type Sizes and Alignment Requirements 28 Calling Conventions 29 Structure packi 30 Understanding Structure Packing 31 USing #pragma pack to Pack All Instances of a Structure 32 Using the Packing Builder Option to Pack All Structures... 34 Pointing to Packed Structures with the packed Type Qualifier 34 Specifying a power Architecture Target 36 Power Architecture Processor Variants 38 Enabling Dcbugging Fcaturcs................47 Generating Debugging Information 47 Gcncrating Debugging Information for Applications Compiled with Third-Party Compilcrs........... 49 Enabling Command Linc Function calls 54 Obtaining profiling Information 54 Enabling Run-Timc Error Checking Enabling Run-Timc Memory Checking 62 Using Your Own Header Files and Libraries Instructing the Compiler to Search for Your Headers.........67 Instructing the Compiler to Link against Your libraries Controlling the Assembler 9 Controlling the Linker 70 Working with Linker Directives Files...........70 Alti Vec Support 71 Alti Vec Data Types 72 MULTI Building Applications for Embedded Power Architecture Contents Alti Vec Register Usage.................73 AltiVec Calling o g conventions 74 Alti Vec Data Alignment ····鲁 74 Signal Proccssing Enginc(SPE)Instructions 75 Dccoratcd Load and Store Support .76 SPE and Embedded floating-Point Instruction Support 77 SPE Data Types 77 SPE Rcgistcr Usage ∴.,78 SPE Calling Conventions 79 SPE Data Alignment 79 Avoiding SPE Exceptions 80 64-Bit Mode Support 81 Text and data placement 81 Default Program Sections 着·非 82 Custom Program Sections 83 Aligned Data Sections.................. 86 Individual function and variable Sections 87 Assigning Program Sections to ROM and RAM 90 Storing Global Variables in Registers........... 93 Near and Far Function Calls 94 Special Data Area Optimizations 96 Position Independent Code(Pic) 109 Position Independent Data(PiD) Customizing the green hills run-Time environment 113 Other Topics 113 Renaming the Output Executable 113 Specifying an Alternate Program Start Address 113 Interrupt routines 114 Symbolic Memory-Mapped 1/0 115 Verifying Program Integrity 117 3. Builder and Driver Options 119 Target Options 121 Endianness .121 32/64-bit Mode ...121 Floating-Point... 121 Text and data placement 127 Green Hills Software Contents Instruction set .,,140 Errata Workarounds 春 142 Operating system 春·非非···着 ...,,143 jcct Options..... .150 Object Filc Output Directory 150 Emulate Bchaviors of a Spccific Compiler Vcrsion 150 Source root 151 Include directories ..151 Library directories ∴..152 RTOS LIbrary directories 152 Libraries ·春非 ············ .152 Output Filename 153 Source directories relative to this file.....154 Intermediate Output Directory Relative to Top-Level Project 154 Optimization Options........ 155 Optimization strategy ...,155 Intermodule Inlining∴..… 157 Automatic Vector Optimization .157 Linker Optimizations 157 Interprocedural Optimizations 158 Optimization Scope 59 Individual functions 165 Debugging Option 167 Debugging Level ... ...167 Profiling- Block Coverage 167 Profiling -Target-Based Timing 168 Run-Time error checks 168 Run- Time Memory Checks 170 Preprocessor Options 172 Define Preprocessor Symbol 172 Undefine Preprocessor Symbol 172 Display includes Preprocessor Directives Listing...... 172 C/C++ Compiler options 174 C Language dialect ..174 C Japanese Automotive extensions 175 C++ Language Dialect 175 MULTI Building Applications for Embedded Power Architecture Contents C++ Libraries ,,.........176 C++ Exception Handling............. .176 Allow C++ Style Slash Comments in C 鲁··· 177 ANSI Aliasing Rules 177 MISRA C2004.,,,,,, 178 MISRA C 1998 194 Data Types..... 204 Alignment and packing 章····,··鲁鲁··· 207 C/C++ Data Allocation 春· 208 pe cial tokens 210 C++ 212 Assembler Options ............,........ 228 ource Listing Generation................ 228 Source Listing Generation Output Directory 228 Preprocess Assembly Files 228 Preprocess Special Assembly Files 非鲁辛 229 Interleaved Source and assembly 229 Support for C Type Information in Assemb,……,………229 Additional Assembler options Assembler Command file 230 230 Linker Options 231 Output File Type 23l Generate Additional output 232 Executable Stripping....... 春··非非 232 Start Address symbol 232 Append Comment Section with Link-Time Information... 233 Preprocess Linker Directives Files ·鲁着·鲁非··春非春 233 Linker Warnings 233 Raw Import Files 234 Linker directive files with non-standard extensions,. 234 Additional linker Options(beginning of link line)..... 235 Additional Linker Options(before start file)........ 236 Additional linker Options (among object files) 237 Linker Command file 237 Extract Whole archive 237 Report an Error When Multiple libraries on a link line Contain a definition of the Same symbol 看音 238 Green Hills Software Contents When Rejecting Duplicate Symbols, Allow Certain Symbols Added by the compiler ....238 When Rejecting Duplicate Symbols, Allow Symbols in h ghs.linKonce sections 238 Duplicate Whitelist 239 Linking with pthread Library 239 Linker optimizations 239 Start and End files 241 S ymbo ls 鲁看 ,242 Linker Output analysis 245 Link-Time Checking 248 Compiler diagnostics Options................ 253 Warnings 253 R emarks 春鲁 ····,··非··非 253 Maximum Number of errors to display 253 Redirect error output to File.…… · 254 Quit Building if Warnings are Generated ,254 Display version Information............... 254 Write version info to comment section.,....,..,, 254 Green hills standard Mode ...255 Coding Standard profile 春鲁 Varying Message Format.∴.∴, 255 C/C++ Messages 256 Toolchain Messages 263 Doublecheck(CC++) Options∴…… 265 Double check level ·.· ...265 Doublecheck ro eport File p 265 Double Check Config File 266 Double check errors to ignore ..,266 DoubleCheck Output that Stops Builds 266 Advanced Options 267 Target Options 267 Project Options 276 Optimization options 292 Debugging Options 298 Preprocessor Options 307 C/C++ Compiler Options 311 Assembler options 315 V111 MULTI Building Applications for Embedded Power Architecture Contents Linker options 316 Archiver Options ······ 319 Compiler diagnostics options. ········ 321 Support Diagnostics Options.............. 322 HTML Compiler Options 323 4. Optimizing Your Programs 325 Optimization strategies ······················ 326 Inlining Optimizations ...326 What Can be inlined 327 Automatic Inlining ...327 Manual inlining 327 Single-pass Inlining 330 Two-Pass Inlining (Intermodule Inlining) 330 Varying Inlining Thresholds 333 Advantages of Inlining 334 Inlining of C Memory Functions 335 Inlining of C String Functions 335 Additional C++ Inlining Information 336 lining Constant Math Functions 鲁鲁着D··非非 338 Interprocedural optimizations 338 Wholeprogram Optimizations 341 USing guild with Interprocedural Optimizations 346 Loop Optimizations (including SIMd Vectorization) 347 Automatic loop optimization 347 Loop Optimizing Specific Functions ····· 348 Strength reduction 348 Loop Invariant analysis 鲁鲁 349 Loop unrolling 350 SIMD Vectorization 351 General optimizations ..359 Peephole optimization.....,.. .359 Common Subexpression Elin S iton partial redundancy.. 360 Pipeline Instruction Scheduling Elimination 363 Tail Calls 363 Constant Propagation 鲁··鲁 ∴..364 Green Hills Software Contents C/C++ Minimum/Maximum Optimization......... 365 Memory Optimization ·.····:··· 366 Dead Code elimination ·鲁 ∴..366 Static Address elimination ∴....367 Default optimizations 368 Register Allocation by Coloring 368 Automatic Register Allocation 369 Register Coalescing 369 Constant Folding 370 oop rotation 370 5. The Double Check Source Analysis Tool 373 Introduction 374 Enabling DoubleCheck ....375 Specifying a doublecheck report file 376 Using Custom Functions with Double Check ·· .376 Specifying Function Properties in a Double Check Configuration File 377 pecifying Function Properties with Pragma Directives... 378 operly Iypes 378 Viewing Double Check Reports ..381 ching the report Viewer from the multi proj Manager ..381 Launching the report viewer From the Command prompt.. 382 Controlling DoublcChcck Output ········ ∴..382 Promoting Sourcc Analysis Errors and Warnings...... 383 gnoring Sourcc analysis Errors and Warnings 383 USing DoubleCheck With Run-Time Error Checking 384 Source Analysis Error and Warning Messages......... 385 Error messages,,,,,,,,,,,,,,,,,,,,,,,, 385 Warnings 396 X MULTI Building Applications for Embedded Power Architecture

...展开详情
试读 127P GreenHills 2017.7 编译手册
立即下载 低至0.43元/次 身份认证VIP会员低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
  • 分享王者

关注 私信
上传资源赚钱or赚积分
最新推荐
GreenHills 2017.7 编译手册 47积分/C币 立即下载
1/127
GreenHills 2017.7 编译手册第1页
GreenHills 2017.7 编译手册第2页
GreenHills 2017.7 编译手册第3页
GreenHills 2017.7 编译手册第4页
GreenHills 2017.7 编译手册第5页
GreenHills 2017.7 编译手册第6页
GreenHills 2017.7 编译手册第7页
GreenHills 2017.7 编译手册第8页
GreenHills 2017.7 编译手册第9页
GreenHills 2017.7 编译手册第10页
GreenHills 2017.7 编译手册第11页
GreenHills 2017.7 编译手册第12页
GreenHills 2017.7 编译手册第13页
GreenHills 2017.7 编译手册第14页
GreenHills 2017.7 编译手册第15页
GreenHills 2017.7 编译手册第16页
GreenHills 2017.7 编译手册第17页
GreenHills 2017.7 编译手册第18页
GreenHills 2017.7 编译手册第19页
GreenHills 2017.7 编译手册第20页

试读结束, 可继续阅读

47积分/C币 立即下载 >