ããã¯ã³ãã³ã powerpc-linux-gnu-gcc-4.9 ã§ãUbuntu OnlineãFedora OnlineãWindows ãªã³ã©ã€ã³ ãšãã¥ã¬ãŒã¿ãŒãMAC OS ãªã³ã©ã€ã³ ãšãã¥ã¬ãŒã¿ãŒãªã©ãè€æ°ã®ç¡æãªã³ã©ã€ã³ ã¯ãŒã¯ã¹ããŒã·ã§ã³ã®ããããã䜿çšããŠãOnWorks ç¡æãã¹ãã£ã³ã° ãããã€ããŒã§å®è¡ã§ããŸãã
ããã°ã©ã ïŒ
NAME
gcc-GNUãããžã§ã¯ãCããã³C ++ã³ã³ãã€ã©
SYNOPSIS
gcc [-c|-S|-E] [-std =æšæº]
[-g] [-pg] [-Oã¬ãã«]
[-WèŠåãã...] [-Wpedantic]
[-IDIR...] [-LDIR...]
[-Dãã¯ã[=å®çŸ©] ...] [-Uãã¯ã]
[-fãªãã·ã§ã³...] [-mãã·ã³ãªãã·ã§ã³...]
[-o ã¢ãŠããã¡ã€ã«][@file] ãã¡ã€ã«å ...
æã䟿å©ãªãªãã·ã§ã³ã®ã¿ãããã«ãªã¹ããããŠããŸãã æ®ãã«ã€ããŠã¯ã以äžãåç §ããŠãã ããã g ++ åãå ¥ãã
ã»ãšãã©åããªãã·ã§ã³ gccã®.
DESCRIPTION
GCCãåŒã³åºããšãéåžžãååŠçãã³ã³ãã€ã«ãã¢ã»ã³ããªãããã³ãªã³ã¯ãå®è¡ãããŸãã
ãå šäœçãªãªãã·ã§ã³ãã䜿çšãããšããã®ããã»ã¹ãäžé段éã§åæ¢ã§ããŸãã ã«ãšã£ãŠ
äŸã -c ãªãã·ã§ã³ã¯ããªã³ã«ãŒãå®è¡ããªãããã«æ瀺ããŸãã 次ã«ãåºåã¯ãªããžã§ã¯ãã§æ§æãããŸã
ã¢ã»ã³ãã©ã«ãã£ãŠåºåããããã¡ã€ã«ã
ä»ã®ãªãã·ã§ã³ã¯ãåŠçã®XNUMXã€ã®ã¹ããŒãžã«æž¡ãããŸãã äžéšã®ãªãã·ã§ã³ã¯ã
ããªããã»ããµãªã©ãã³ã³ãã€ã©èªäœã ããã«ä»ã®ãªãã·ã§ã³ã¯ãã¢ã»ã³ãã©ãš
ãªã³ã«; ãããã®ããããã䜿çšããå¿ èŠã¯ãã£ãã«ãªãããããããã®ã»ãšãã©ã¯ããã§ã¯ææžåãããŠããŸããã
GCCã§äœ¿çšã§ããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®ã»ãšãã©ã¯ãCããã°ã©ã ã«åœ¹ç«ã¡ãŸãã ãã€
ãªãã·ã§ã³ã¯å¥ã®èšèªïŒéåžžã¯C ++ïŒã§ã®ã¿åœ¹ç«ã¡ãŸãã説æã¯ããèšã£ãŠããŸã
æ瀺çã«ã ç¹å®ã®ãªãã·ã§ã³ã®èª¬æã«ãœãŒã¹ãèšèŒãããŠããªãå Žå
èšèªã®å ŽåããµããŒããããŠãããã¹ãŠã®èšèªã§ãã®ãªãã·ã§ã³ã䜿çšã§ããŸãã
ãã® gccã® ããã°ã©ã ã¯ããªãã·ã§ã³ãšãã¡ã€ã«åããªãã©ã³ããšããŠåãå ¥ããŸãã å€ãã®ãªãã·ã§ã³ã«ã¯è€æ°ã®ãªãã·ã§ã³ããããŸã
æåå; ãããã£ãŠãè€æ°ã®XNUMXæåã®ãªãã·ã§ã³ã ã°ã«ãŒãåããïŒ -dv éåžžã«ãã
ãšã¯ç°ãªã -d -v.
ãªãã·ã§ã³ãšä»ã®åŒæ°ãæ··åšãããããšãã§ããŸãã ã»ãšãã©ã®å Žåã䜿çšããé åºã¯ããã§ã¯ãããŸãã
æ¡ä»¶ã åãçš®é¡ã®è€æ°ã®ãªãã·ã§ã³ã䜿çšããå Žåãé åºã¯éèŠã§ãã ããšãã°ã
æå®ããŸã -L ãã£ã¬ã¯ããªã¯ãæå®ãããé åºã§è€æ°åæ€çŽ¢ãããŸãã ãŸãã
ã®é 眮 -l ãªãã·ã§ã³ã¯éèŠã§ãã
å€ãã®ãªãã·ã§ã³ã«ã¯ãã§å§ãŸãé·ãååãä»ããŠããŸã -f ãŸã㯠-W- -äŸãã°ã
-fmove-ã«ãŒãäžå€, -Wãã©ãŒããã çã ã ãããã®ã»ãšãã©ã¯æ£ãšè² ã®äž¡æ¹ãæã£ãŠããŸã
ãã©ãŒã ; ã®è² ã®åœ¢åŒ -ãµãµãŒ is -fno-fooã ãã®ããã¥ã¢ã«ã«ã¯ããããã®ãã¡XNUMXã€ã ããèšèŒãããŠããŸãã
XNUMXã€ã®åœ¢åŒãã©ã¡ãããããã©ã«ãã§ã¯ãããŸããã
OPTIONS
ãªãã·ã§ã³ ãŸãšã
ããã¯ãã¿ã€ãå¥ã«ã°ã«ãŒãåããããã¹ãŠã®ãªãã·ã§ã³ã®èŠçŽã§ãã 説æã¯ä»¥äžã®éãã§ã
ã»ã¯ã·ã§ã³ã
å šäœ ãªãã·ã§ã³
-c -S -E -o file -no-canonical-prefixes -ãã€ã -ãã¹çµäºã³ãŒã -x èšèª -v
-### - å©ããŠ[=class[ã...]] --ã¿ãŒã²ãããã«ã - ããŒãžã§ã³ -ã©ãã㌠@file -fplugin =file
-fplugin-arg-å=arg㯠-fdump-ada-spec[-ã¹ãªã ] -fada-spec-parent =åäœ
-fdump-go-spec =file
C èšèª ãªãã·ã§ã³
-ã¢ã³ã· -std =æšæº -fgnu89-ã€ã³ã©ã€ã³ -è£å©æ å ± ãã¡ã€ã«å
-äŒè-ãã©ã¡ãŒã¿ãªã-å¯å€ååŒæ°é¢æ° -fno-asm -fno-builtin -fno-builtin-function
-ãã³ãã -èªç« -fopenmp -fopenmp-simd -fms-æ¡åŒµæ©èœ -fplan9-æ¡åŒµæ©èœ
-äžéé³å -äŒçµ±ç㪠-åŸæ¥ã®-cpp -äŒè-å粟床 -fcond-äžäžèŽ
-äºéº»-ãã¯ãã«-å€æ -fsigned-ããããã£ãŒã«ã -fsigned-char -funsigned-ããããã£ãŒã«ã
-funsigned-char
C + + èšèª ãªãã·ã§ã³
-fabi-version =n -fno-ã¢ã¯ã»ã¹å¶åŸ¡ -fcheck-æ°ãã -fconstexpr-depth =n
-ffriend-æ³šå ¥ -fno-elide-ã³ã³ã¹ãã©ã¯ã¿ãŒ -fno-enforce-eh-specs -ç¯å²å€
-fno-for-scope -fno-gnu-ããŒã¯ãŒã -fno-implicit-templates
-fno-implicit-inline-templates -fno-implement-inlines -fms-æ¡åŒµæ©èœ
-fno-nonansi-builtins -fnothrow-opt -fno æŒç®åå -fno-ãªãã·ã§ã³-diags
-å¯å®¹ -fno-pretty-templates -ãã¬ã -fno-rtti -fstats
-ftemplate-backtrace-limit =n -ftemplate-depth =n -fno-threadsafe-statics
-fuse-cxa-atexit -fno-匱ã -nostdinc ++ -fvisibility-inlines-hidden
-fvtable-verify =std | preinit | none -fvtv-ã«ãŠã³ã -fvtv-ãããã° -fvisibility-ms-compat
-fext-æ°å€ãªãã©ã« -ãã³ -Wconversion-null -Wctor-dtor-ãã©ã€ãã·ãŒ
-Wdelete-éä»®æ³-dtor -Wliteral-ãµãã£ãã¯ã¹ -çãã -Wnoä»¥å€ -Wnon-virtual-dtor
-ãªãªãŒã㌠-Weffc ++ -Wstrict-null-ã»ã³ããã« -Wno-éãã³ãã¬ãŒããã¬ã³ã -ãŠã©ã«ãã¹ã¿ã€ã«ãã£ã¹ã
-ãªãŒããŒããŒã-ä»®æ³ -Wno-pmf-ã³ã³ããŒãžã§ã³ -Wsign-ããã¢ãŒã·ã§ã³
ãªããžã§ã¯ãã£ãC ãš Objective-C ++ èšèª ãªãã·ã§ã³
-fconstant-string-class =ã¯ã©ã¹å -fgnu-ã©ã³ã¿ã€ã -fnext-ã©ã³ã¿ã€ã -fno-nil-ã¬ã·ãŒããŒ
-fobjc-abi-version =n -fobjc-call-cxx-cdtors -fobjc-çŽæ¥çºé -fobjc-äŸå€
-fobjc-gc -fobjc-nilcheck -fobjc-std = objc1 -freplace-objc-classes -fzero-ãªã³ã¯
-gen-decls -Wassign-ã€ã³ã¿ãŒã»ãã -ãããã³ã«ãªã -Wã»ã¬ã¯ã¿ãŒ -Wstrict-selector-match
-Wundeclared-ã»ã¬ã¯ã¿ãŒ
èšèª ç¬ç«ãã ãªãã·ã§ã³
-fmessage-length =n -fdiagnostics-show-location =[ãã€ãŠ|ãã¹ãŠã®è¡]
-fdiagnostics-color =[ãªãŒã|決ããŠ|åžžã«] -fno-diagnostics-show-option
-fno-diagnostics-show-caret
èŠå ãªãã·ã§ã³
-fsyntaxã®ã¿ -fmax-errors =n -Wpedantic -è¡åŠçãšã©ãŒ -w -ãŠã§ã¯ã¹ãã© -å£
-äœæ -Waggregate-return -Waggressive ã«ãŒãã®æé©å -Warray å¢ç
-Wno-å±æ§ -Wno-builtin-macro-åå®çŸ© -Wc ++-äºææ§ -Wc ++ 11-äºææ§ -Wcast-align
-Wcast-qual -Wchar-æ·»ãå -ç Žå£ããã -ã³ã¡ã³ã -æ¡ä»¶ä»ãã§ãµããŒã
-Wã³ã³ããŒãžã§ã³ -Wcoverage-äžäžèŽ -æ¥ä»-æå» -Wdelete-äžå®å š -Wno-cpp
-Wno-éæšå¥š -Wno-éæšå¥š-å®£èš -Wdisabled-æé©å -Wno-div-by-zero
-Wdouble-ããã¢ãŒã·ã§ã³ -空ã£ãœã®äœ -ãŠã§ãã -æ¯èŒ -Wno-endif-labels -ãšã©ãŒ -ãšã©ãŒ= *
-Wfatal-ãšã©ãŒ -Wfloat-çãã -Wãã©ãŒããã -Wformat = 2 -Wno-format-contains-null
-Wno-format-extra-args -Wformat-éæå -Wformat-ã»ãã¥ãªã㣠-Wformat-y2k
-Wframe-larger-than =LEN -Wno-free-éããŒããªããžã§ã¯ã -Wjump-miss-init
-ç¡èŠ-修食å -æé»ã®äºè§£ -Wimplicit é¢æ°å®£èš -Wimplicit-int
-Winit-self -ãŠã£ã³ã©ã€ã³ -ãããã-åæåãããŠããŸãã -Wno-int-to-pointer-cast
-Wno-ç¡å¹ãªãªãã»ãã -Winvalid-pch -Wlarger-than =LEN -Wunsafe ã«ãŒãã®æé©å
-Wlogical-op -ãŠãŒãã³è¶ -Wã¡ã€ã³ -ãããã-åæåãããŠããŸãã -Wmemset-転眮ãããåŒæ°
-äžæ¬åŒ§ããããŸãã -äžè¶³ãã£ãŒã«ãåæåå -è¡æ¹äžæã®ã€ã³ã¯ã«ãŒããã£ã¬ã¯ã㪠-Wno-multichar
-éãã« -ãªãŒããŒãããŒãªã -Wopenmp-simd -Woverlength-æåå -Wããã¯
-Wpacked-bitfield-compat -ãããå ¥ã -ãã£ã -Wpedantic-ms-format
-Wno-pedantic-ms-format -Wpointer-ç®è¡ -Wno-pointer-to-int-cast -åé·-decls
-Wno-return-local-addr -Wreturnã¿ã€ã -Wã·ãŒã±ã³ã¹ãã€ã³ã -圱 -Wsign-æ¯èŒ
-Wsign-å€æ -Wfloat-å€æ -Wsizeof-pointer-memaccess -Wstack-ãããã¯ã¿ãŒ
-Wstack-usage =LEN -Wstrict-ãšã€ãªã¢ã·ã³ã° -Wstrict-aliasing = n -Wstrict-ãªãŒããŒãããŒ
-Wstrict-overflow =n -Wsuggest-attribute =[çŽç²ãª|å®æ°|è¿åäžå¯|圢åŒã§ã¢ãŒã«ã€ããããããžã§ã¯ããä¿åããŸãïŒ]
-äžè¶³ããŠãã圢åŒå±æ§ -Wã¹ã€ãã -Wswitch-ããã©ã«ã -Wswitch-enum -Wsync-nand
-Wsystem-ããã㌠-ãã©ã³ããªã³ -çæå -Wtype-limits - ãŠã³ãã -åæåãããŠããŸãã
-äžæ-ãã©ã°ã -Wno-ãã©ã°ã -Wunsuffixed-float-å®æ° -æªäœ¿çš
-æªäœ¿çšæ©èœ -Wunused-ã¬ãŒãã« -Wunused-local-typedefs -Wunused-ãã©ã¡ãŒã¿
-Wno-æªäœ¿çš-çµæ -æªäœ¿çšå€ -Wunused-å€æ° -䜿çšãããŠããªãããã©ã¡ãŒã¿ãèšå®
-䜿çšãããŠããªããå€æ°ãèšå® -ç¡é§ãªãã£ã¹ã -Wvariadic-ãã¯ã
-Wvector-æäœ-ããã©ãŒãã³ã¹ -Wvla -Wvolatile ã¬ãžã¹ã¿å€æ° -æžã蟌ã¿æåå
-Wzero-as-null-ãã€ã³ã¿ãŒå®æ°
C ãš Objective-Cã®ã¿ èŠå ãªãã·ã§ã³
-Wbad-function-cast -æ¬ èœ-å®£èš -æ¬ èœãã©ã¡ãŒã¿ã®çš®é¡
-æ¬ èœ-ãããã¿ã€ã -Wnested-externs -Wold ã¹ã¿ã€ã«å®£èš -Wold ã¹ã¿ã€ã«ã®å®çŸ©
-Wstrict-ãããã¿ã€ã -äŒçµ±ç㪠-åŸæ¥ã®å€æ
-W宣èšåŸã®ã¹ããŒãã¡ã³ã -Wpointer ãµã€ã³
ãããã®ã³ã° ãªãã·ã§ã³
-dæçŽ -ãã³ãã¹ãã㯠-ãã³ããã·ã³ -ãã³ãããŒãžã§ã³ -fsanitize = -fdbg-cnt-ãªã¹ã
-fdbg-cnt =ã«ãŠã³ã¿ãŒããªã¥ãŒãªã¹ã -fdisable-ipa-ãã¹å -fdisable-rtl-ãã¹å
-fdisable-rtl-ãã¹å=ç¯å²ãªã¹ã -fdisable-tree-ãã¹å -fdisable-tree-åæ Œ-
å=ç¯å²ãªã¹ã -fdump-noaddr -fdump-çªå·ãªã -fdump-unnumbered-links
-fdump-翻蚳åäœ[-n] -fdump ã¯ã©ã¹éå±€[-n] -fdump-ipa-all
-fdump-ipa-cgraph -fdump-ipa-ã€ã³ã©ã€ã³ -fdump-ãã¹ -fdump-çµ±èš -fdump-tree-all
-fdump-tree-ãªãªãžãã«[-n] -fdump-tree-æé©å[-n] -fdump-tree-cfg -fdump-tree-alias
-fdump-ããªãŒ-ch -fdump-tree-ssa[-n] -fdump-tree-pre[-n] -fdump-tree-ccp[-n]
-fdump-tree-dce[-n] -fdump-tree-giple[-ç] -fdump-ããªãŒ-dom[-n] -fdump-tree-dse[-n]
-fdump-tree-phiprop[-n] -fdump-tree-phiopt[-n] -fdump-tree-forwprop[-n]
-fdump-tree-copyrename[-n] -fdump-tree-nrv -fdump-tree-vect -fdump-ããªãŒã·ã³ã¯
-fdump-ããªãŒ-sra[-n] -fdump-tree-forwprop[-n] -fdump-tree-fre[-n]
-fdump-tree-vtable-verify -fdump-tree-vrp[-n] -fdump-tree-storeccp[-n]
-fdump-final-insns =file -fæ¯èŒãããã°[=optsã®] -fæ¯èŒãããã°ç§
-feliminate-dwarf2-dups -fno-eliminate-unused-debug-types
-feliminate-æªäœ¿çšã®ãããã°ã·ã³ãã« -femit-class-debug-always -ãã§ã³ãã«-çš®é¡-ãã¹
-ãã§ã³ãã«-çš®é¡-ãã¹=ç¯å²ãªã¹ã -fdebug-types-ã»ã¯ã·ã§ã³ -fmem-ã¬ããŒã-wpa -fmem-ã¬ããŒã
-fpre-ipa-mem-report -fpost-ipa-mem-report -fprofile-arcs -fopt-æ å ±
-fopt-æ å ±-ãªãã·ã§ã³[=file] -frandom-seed =string -fsched-verbose =n -fsel-sched-verbose
-fsel-sched-dump-cfg -fsel-sched-ãã€ãã©ã€ã³-åé· -fstack-䜿çšæ³ -ftest-ã«ãã¬ããž
-ftime-ã¬ããŒã -fvar-远跡 -fvar-远跡-å²ãåœãŠ
-fvar-tracking-assignments-toggle -g -gã¬ãã« -ã°ãã°ã« -gcoff -ã°ãã¯ãŒã-ããŒãžã§ã³ -ggdb
-grecord-gcc-ã¹ã€ãã -gno-record-gcc-switches -gstabs -gstabs + -gstrict-ãã¯ãŒã
-gno-strict-ãã¯ãŒã -gvms -gxcoff -gxcoff + -fno-ããŒãžãããã°æåå
-fno-dwarf2-cfi-asm -fdebug-prefix-map =å€ã=æ°è£œå -femit-struct-debug-baseonly
-femit-struct-debug-reduced -femit-struct-debug-detailed[=ã¹ããã¯ãªã¹ã] -p -pg
-print-file-name =ã©ã€ãã©ãª -print-libgcc-ãã¡ã€ã«å -print-ãã«ããã£ã¬ã¯ããª
-print-multi-lib -print-multi-os-directory -print-prog-name =ããã°ã©ã
-å°å·æ€çŽ¢ãã£ã¬ã¯ã㪠-Q -å°å·-sysroot -print-sysroot-headers-suffix -äžæä¿å
-save-temps = cwd -save-temps = obj -æé[=file]
æé©å ãªãã·ã§ã³
-faggressive-loop-optimizations -falign-functions [=n] -falign-jumps [=n]
-falign-labels [=n] -falign-loops [=n] -é£æ³æ°åŠ -fauto-inc-dec
-fbranch-確ç -fbranch-ã¿ãŒã²ãã-ããŒã-æé©å -fbranch-ã¿ãŒã²ãã-ããŒã-æé©å2
-fbtr-bb-æä»ç -fcaller-saves -fcheck-ããŒã¿-deps -fcombine-stack-adjustments
-fconserve-ã¹ã¿ã㯠-fæ¯èŒ-elim -fcprop-ã¬ãžã¹ã¿ -ã¯ãã¹ãžã£ã³ãã³ã° -fcse-ãã©ããŒãžã£ã³ã
-fcse-ã¹ããã-ããã㯠-fcx-fortran-rules -fcxéå®ç¯å² -fdata-ã»ã¯ã·ã§ã³ -fdce
-fdelayed-ãã©ã³ã -fdelete-null-pointer-checks -fdevirtualize
-fdevirtualize-ææ©çã« -fdse -æãããã€ã³ã©ã€ã³å -ãã£ãã¹ã©
-é«äŸ¡ãªæé©å -ffat-lto-objects -ffast-æ°åŠ -æéæ°åŠã®ã¿
-ãããŒãã¹ã㢠-fexcess-precision = -åæ¹äŒæ -ffp-contract =
-æ©èœ-ã»ã¯ã·ã§ã³ -fgcse -fgcse-ã¢ãã¿ãŒãªããŒã -fgcse-ã©ã¹ -fgcse-lm
-fgraphite-ã¢ã€ãã³ãã£ã㣠-fgcse-sm -fhoist-é£æ¥ããŒã -fif-å€æ -fif-å€æ2
-findirect-ã€ã³ã©ã€ã³å -finline-é¢æ° -finline-functions-call-once -finline-limit =n
-finline-small-functions -fipa-cp -fipa-cp-ã¯ããŒã³ -fipa-pta -fipa-ãããã¡ã€ã«
-fipa-pure-const -fipa-ãªãã¡ã¬ã³ã¹ -fira-algorithm =ã¢ã«ãŽãªãºã -fira-region =å°å
-ãã£ã©ãã€ã¹ãå§å -ãã£ã©ã«ãŒãå§å -fno-ira-share-save-slots
-fno-ira-share-spill-slots -fira-verbose =n -fisolate-erroneous-paths-éæ¥åç §
-fisolate-erroneous-paths-å±æ§ -fivopts -fkeep-ã€ã³ã©ã€ã³é¢æ°
-fkeep-static-consts -çåç¯å²ã®çž®å° -floop-ããã㯠-floop-亀æ
-floop-strip-mine -floop-nest-æé©å -floop-Parallelize-all -flto
-flto-å§çž®ã¬ãã« -flto-partition =ALG -flto-ã¬ããŒã -flto-ã¬ããŒã-wpa
-fmerge-all-constants -fmerge-å®æ° -fmodulo-sched -fmodulo-sched-allow-regmoves
-fmove-ã«ãŒãäžå€ -fno-åå²æ°-reg -fno-defer-pop -fno-function-cse
-fno-guess-branch-probability -fno-ã€ã³ã©ã€ã³ -fno-math-errno -fno-ã®ããç©Ž -fno-ã®ããç©Ž2
-fno-sched-interblock -fno-sched-spec -fno-signed-zeros -fno-toplevel-reorder
-fno-ãã©ãã-æ°åŠ -fno-zero-in-bss ã§åæå -fomit-ãã¬ãŒã ãã€ã³ã¿ãŒ
-foptimize-å åŒåŒã³åºã -éšåçãªã€ã³ã©ã€ã³å -fpeel-ã«ãŒã -fpredictive-commoning
-fprefetch-ã«ãŒãé å -fprofile-ã¬ããŒã -fprofile-ä¿®æ£ -fprofile-dir =path
-fprofile-generate -fprofile-generate =path -fprofile-äœ¿çš -fprofile-use =path
-fprofile-values -fprofile-reorder-functions -freciprocal-æ°åŠ ããªãŒ
-frename-registers -ããªãŒãªãŒããŒããã㯠-freeorder-blocks-and-partition -freorder-é¢æ°
-frerun-cse-ã«ãŒãåŸ -freschedule-modulo-scheduled-loops -ãã©ãŠã³ãã£ã³ã°-æ°åŠ
-fsched2-use-ã¹ãŒããŒããã㯠-fsched-å§å -fsched-spec-load
-fsched-spec-load-dangerous -fsched-stalled-insns-dep [=n] -fsched-stalled-insns [=n]
-fsched-group-ãã¥ãŒãªã¹ãã£ã㯠-fsched-ã¯ãªãã£ã«ã«ãã¹-ãã¥ãŒãªã¹ãã£ã㯠-fsched-spec-insn-ãã¥ãŒãªã¹ãã£ãã¯
-fsched-rank-ãã¥ãŒãªã¹ãã£ã㯠-fsched-last-insn-ãã¥ãŒãªã¹ãã£ã㯠-fsched-dep-count-ãã¥ãŒãªã¹ãã£ãã¯
-fschedule-insn -fschedule-insns2 -fsection-ã¢ã³ã«ãŒ -éžæçã¹ã±ãžã¥ãŒãªã³ã°
-féžæçã¹ã±ãžã¥ãŒãªã³ã°2 -fsel-sched-ãã€ãã©ã€ã³ -fsel-sched-pipelining-outer-loops
-fshrink-wrap -fsignaling-nans -fså粟床å®æ° -fsplit-ivs-in-unroller
-fsplit-wide-types -fstack-ãããã¯ã¿ãŒ -fstack-protector-all -fstack-protector-strong
-fstrict-ãšã€ãªã¢ã·ã³ã° -fstrict-ãªãŒããŒãã㌠-fthread-ãžã£ã³ã -ããã¬ãŒãµãŒ -ftree-ããã-ccp
-ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-coalesce-inline-vars
-ftree-coalesce-vars -ftree-ã³ããŒ-ãããã -ftree-copyrename -ftree-dce
-ftree-ããããŒã¿ãŒ-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-ã«ãŒã-if-convert
-ftree-loop-if-convert-stores -ftree-loop-im -ftree-phiprop -ftree ã«ãŒãé åž
-ftree-loop-distribute-patterns -ftree-loop-ivcanon -ftree-ã«ãŒã-ãªãã¢
-ftree-ã«ãŒãæé©å -ftree-loop-vectorize -ftree-parallelize-loops =n -ftree-pre
-ftree-éšå-pre -ftree-pta -ftree-reassoc -ftree-ã·ã³ã¯ -ftree-slsr -ftree-sra
-ftree-ã¹ã€ããå€æ -ftree-tail-merge -ftree-ter -ftree-ãã¯ãã«å -ftree-vrp
-äžåºŠã«äžå° -funroll-all-loops -funroll-ã«ãŒã -funsafe ã«ãŒãã®æé©å
-funsafe-æ°åŠã®æé©å -funswitch-ã«ãŒã ã¢ã³ããŒã©ãŒå ã® -f å€æ°å±é
-fvect-cost-ã¢ãã« -fvpt -fweb -fwhole-ããã°ã©ã -fwpa -fuse-ld =ãªã³ã¯ã¹
-ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³ --ãã©ã¡ãŒã¿ å=å€ -O -O0 -O1 -O2 -O3 -ãªã¹ -ãªãŒãã¡ã¹ã -ãªã°
ããªããã»ããµ ãªãã·ã§ã³
-Aquestion=åç -A-question[=åç] -C -dD -dI -dM -dN -Dãã¯ã[=å®çŸ©] -E -H
-idirafter DIR -å«ãã file -ã€ãã¯ãã¹ file -iprefix file -iwithprefix DIR
-iwithprefixbefore DIR -isystem DIR -imultilib DIR -isysroot DIR -M -ãã -MF -MG
-MP -MQ -MT -ãã¹ããã£ã³ã¯ -P -fdebug-cpp -ftrack-ãã¯ãå±é -fworkingãã£ã¬ã¯ããª
-ãªããã -äžéé³å -æªå®çŸ© -Uãã¯ã -Wpããªãã·ã§ã³ -Xããªããã»ããµ ãªãã·ã§ã³ -çµ±åãããŠããªã-cpp
ã¢ã»ã³ãã© ãªãã·ã§ã³
-ãããªãã·ã§ã³ -Xã¢ã»ã³ãã©ãŒ ãªãã·ã§ã³
ãªã³ã¯ã¹ ãªãã·ã§ã³
ãªããžã§ã¯ããã¡ã€ã«å -lã©ã€ãã©ãª -nostartfiles -nodefaultlibs -nostdlib -ã〠-rdynamic -s
-éç -éç-libgcc -static-libstdc ++ -éç-libasan -static-libtsan
-éç-liblsan -éç-libubsan -å ±æ -å ±æ-libgcc -ã·ã³ããªã㯠-T ã¹ã¯ãªãã
-Wlããªãã·ã§ã³ -Xãªã³ã«ãŒ ãªãã·ã§ã³ -u ã·ã³ãã«
ãã£ã¬ã¯ã㪠ãªãã·ã§ã³
-Bæ¥é èŸ -IDIR -iplugindir =DIR -iquoteDIR -LDIR -specs =file -I- --sysroot =DIR
--no-sysroot-ãµãã£ãã¯ã¹
ãšã¹ãã¬ããœãã·ã³ äŸå ãªãã·ã§ã³
AAArch64 ãªãã·ã§ã³ -mabi =å -mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -mgeneral-regs-ã®ã¿
-mcmodel = tiny -mcmodel = small -mcmodel = large -mstrict-align -momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
-mno-çç¥ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ -mtls-dialect = desc -mtls-dialect = Traditional
-mfix-cortex-a53-835769 -mno-fix-cortex-a53-835769 -mfix-cortex-a53-843419
-mno-fix-cortex-a53-843419 -XNUMXæ=å -mcpu =å -mtune =å
ã¢ãããã ãšããã¡ã㌠ãªãã·ã§ã³ -mhalf-reg ãã¡ã€ã« -mprefer-short-insn-regs -mbranch-cost =NUM
-mcmove -mnops =NUM -msoft-cmpsf -msplit-lohi æ ªåŒäŒç€Ÿãšã ãã¹ã -mpost-å€æŽ
-mstack-offset =NUM -mround-æãè¿ã -mlong-calls -mshort-åŒã³åºã -msmall16 -mfp-mode =ã¢ãŒã
-mvect-ããã« -max-vect-align =NUM -msplit-vecmove-åæ -m1reg-REG
ARC ãªãã·ã§ã³ -ãã¬ã«ã·ãã¿ãŒ -mcpu =CPU -mA6 -mARC600 -mA7 -mARC700 -mdpfp
-mdpfp-ã³ã³ãã¯ã -mdpfp-é«é -mno-dpfp-lrsr -ã¡ã¢ -mno-mpy -mmul32x16 -mmul64 -mnorm
-mspfp -mspfp-ã³ã³ãã¯ã -mspfp-é«é -msimd -msoft-float -mswap -mcrc -mdsp-packa -mdvbf
-ã ãã㯠-mmac-d16 -mmac-24 -mrtsc -mswape -mãã¬ãã©ã㌠-mxy -ãã¹ãµã€ãº -mannotate-align
-ãã«ã¯ãªããã¯ã¹ -marclinux_prof -ã¡ãããŒã°-cfi -mlong-calls -ããã£ã¢ã ã³ãŒã« -msdata
-mucb-mcount -mvolatile-ãã£ãã·ã¥ -æªæ§ã³ãŒã« -mauto-å€æŽ-reg -mbbit-ã®ããç©Ž -mno-brcc
-mcase-vector-pcrel -mcompact-casesi -mno-cond-exec -ã»ãŒ-cbranchsi -mexpand-adddi
-mindexed-loads -mlra -mlra-åªå 床-ãªã -mlra-priority-ã³ã³ãã¯ã mlra-åªå 床-
éã³ã³ãã¯ã -mno-ããªã³ãŒã -æ··åã³ãŒã -mq-ã¯ã©ã¹ -mRcq -mRcw -msize-level =ã¬ãã«
-mtune =CPU -mmultcost =NUM -munalign-prob-threshold =確ç
ARM ãªãã·ã§ã³ -mapcs ãã¬ãŒã -mno-apcs-frame -mabi =å -mapcs-ã¹ã¿ãã¯ãã§ãã¯
-mno-apcs-stack-check -mapcs-ãããŒã -mno-apcs-float -mapcs-ãªãšã³ãã©ã³ã
-mno-apcs-ãªãšã³ãã©ã³ã -msched-ããããŒã° -mno-sched-ããããŒã° -mlittle-ãšã³ãã£ã¢ã³ -mbig-ãšã³ãã£ã¢ã³
-mwords-ãªãã«ãšã³ãã£ã¢ã³ -mfloat-abi =å -mfp16-format =å -mthumb-ã€ã³ã¿ãŒã¯ãŒã¯
-mno-thumb-interwork -mcpu =å -XNUMXæ=å -mfpu =å -mstructure-size-boundary =n
-mabort-on-noreturn -mlong-calls -mno-long-calls -msingle-pic-base
-mno-single-pic-base -mpic-register =REG -mnop-fun-dllimport -mpoke-é¢æ°å
-mthumb -ããŒã -mtpcs-ãã¬ãŒã -mtpcs-ãªãŒã-ãã¬ãŒã -mcaller-ã¹ãŒããŒã€ã³ã¿ãŒã¯ãŒãã³ã°
-mcallee-ã¹ãŒããŒã€ã³ã¿ãŒã¯ãŒãã³ã° -mtp =å -mtls-dialect =æ¹èš -mword-åé 眮
-mfix-cortex-m3-ldrd -äžæŽåã¢ã¯ã»ã¹ -mneon-for-64ããã -mslow-ãã©ãã·ã¥ ããŒã¿
-mrestrict-ãã
AVR ãªãã·ã§ã³ -mmcu =MCU -maccumulate-args -mbranch-cost =ã³ã¹ã -mcall-ããããŒã° -ãã³ã8
-mno-å²ã蟌㿠-mãªã©ãã¯ã¹ -mstrict-X -mtiny-ã¹ã¿ã㯠-Waddr-space-convert
ãã©ãã¯ãã£ã³ ãªãã·ã§ã³ -mcpu =CPU[-ã·ã¬ããžã§ã³] -msim -momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
-mno-çç¥ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ -mspecld-ç°åžž -mno-specld-ç°åžž -mcsync-ç°åžž
-mno-csync-ç°åžž -mlow-64k -mno-low64k -mstack-check-l1 -mid-å ±æã©ã€ãã©ãª
-mno-id-å ±æã©ã€ãã©ãª -mshared-library-id =n -mleaf-id-å ±æã©ã€ãã©ãª
-mno-leaf-id-å ±æã©ã€ãã©ãª -msep-ããŒã¿ -mno-sep-ããŒã¿ -mlong-calls -mno-long-calls
-mfast-fp -minline-plt -ãã«ãã³ã¢ -mcorea -ãã³ã¬ã -msdram -micplb
C6X ãªãã·ã§ã³ -mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -XNUMXæ=CPU -msim -msdata =sdata ã¿ã€ã
CRIS ãªãã·ã§ã³ -mcpu =CPU -XNUMXæ=CPU -mtune =CPU -mmax-stack-frame =n
-melinux-stacksize =n -metrax4 -metrax100 -mpdebug -mcc-init -mno-å¯äœçš
-mstack-align -mdata-align -mconst-align -m32ããã -m16ããã -m8ããã
-mno-ããããŒã°-ãšãããŒã° -mno-gotplt -ã¡ã«ã -ããŠã -ã¡ãªããã¯ã¹ -mlinux -ã·ã -sim2
-mmul-ãã°-åé¿ç -mno-mul-bug-åé¿ç
CR16 ãªãã·ã§ã³ -mmac -mcr16cplus -mcr16c -msim -ãã³ã32 -mbit-ops -mdata-model =
ããŒãŠã£ã³ ãªãã·ã§ã³ -all_load -allowable_client -ã¢ãŒã -arch_errors_fatal -arch_only
-bind_at_load -ãã³ãã« -ãã³ãã«_ããŒã㌠-ã¯ã©ã€ã¢ã³ãå -compatibility_version
-çŸè¡ç -ããã_ã¹ããªãã -äŸåé¢ä¿ãã¡ã€ã« -dylib_file -dylinker_install_name
-åç -ãã€ãããã¯ãªã -exported_symbols_list -ãã¡ã€ã«ãªã¹ã - flat_namespace
-force_cpusubtype_ALL -force_ flat_namespace -headerpad_max_install_names -iframework
-image_base -åæå -ã€ã³ã¹ããŒã«å -keep_private_externs -multi_module
-multiply_define -multiply_define_unused -noall_load
-no_dead_strip_inits_and_terms -nofixprebinding -nomultidefs -noprebind
-nosegãªã³ã¯ç·šé -pagezero_size -äºåãã€ã³ã -prebind_all_twolevel_modules -private_bundle
-read_only_relocs -sectalign -sectobjectsymbols -ãªãããŒã -seg1addr -sectcreate
-sectobjectsymbols -ã»ã¯ã¿ãŒã㌠-segaddr -segs_read_only_addr -segs_read_write_addr
-seg_addr_table -seg_addr_table_filename -seglinkedit -segprot -segs_read_only_addr
-segs_read_write_addr -single_module -éç -ãµãã©ã€ãã©ãª -ãµãå
-twolevel_namespace -å -æªå®çŸ© -unexported_symbols_list
-weak_reference_mismatches -Whatsloaded -F -çªã£èŸŒãã -gfull -mmacosx-version-min =ããŒãžã§ã³
-mkernel -mone-byte-bool
12æ ã¢ã«ãã¡ ãªãã·ã§ã³ -mno-fp-regs -msoft-float -ãã£ãŒ -mieee-with-äžæ£ç¢º
-mieee-æºæ -mfp-trap-mode =ã¢ãŒã -mfp-rounding-mode =ã¢ãŒã -mtrap-precision =ã¢ãŒã
-mbuild-å®æ° -mcpu =CPUã¿ã€ã -mtune =CPUã¿ã€ã -mbwx -mmax -mfix -mcix
-mfloat-vax -mfloat-ieee -mexplicit-relocs -msmall-ããŒã¿ -mlarge-ããŒã¿ -msmall-text
-æ¡å€§ããã¹ã -mmemory-latency =æé
FR30 ãªãã·ã§ã³ -msmall-ã¢ãã« -mno-lsim
FRV ãªãã·ã§ã³ -mgpr-32 -mgpr-64 -MFPR-32 -MFPR-64 -mhard-float -msoft-float
-malloc-cc -mfixed-cc -mdword -mno-dword -mdouble -mno-double -ã¡ãã£ã¢ -mno-ã¡ãã£ã¢
-ã ã ã©ãã -mno-ã ã©ãã -mfdpic -minline-plt -mgprel-ro -multilib-ã©ã€ãã©ãª-pic
-mlinked-fp -mlong-calls -æªæ§ã©ãã« -mlibrary-pic -mac-4 -mac-8 -mpack
-mno-pack -mno-eflags -mcond-移å -mno-cond-move -moptimize-ã¡ã³ããŒããŒ
-mno-optimize-memberbar -mscc -mno-scc -mcond-exec -mno-cond-exec -mvliw-ãã©ã³ã
-mno-vliw-ãã©ã³ã -mmulti-cond-exec -mno-multi-cond-exec -mnested-cond-exec
-mno-nested-cond-exec -mtomcat-çµ±èš -mTLS -mtls -mcpu =CPU
GNU / Linuxã® ãªãã·ã§ã³ -mglibc -ã ã¯ãªã -ãã€ãªãã㯠-ãã³ã¢ã³ããã€ã -tno-android-cc -tno-android-ld
H8 / 300 ãªãã·ã§ã³ -mãªã©ãã¯ã¹ -mh -MS -å -ã¡ã¯ã¹ã« -mno-exr -ãã³ã32 -æªæ§-300
HPPA ãªãã·ã§ã³ -XNUMXæ=ã¢ãŒããã¯ãã£ã¿ã€ã -mdisable-fpregs -mdisable-ã€ã³ããã¯ã¹äœæ
-mfast-éæ¥åŒã³åºã -ã¡ã¬ã¬ã¹ -mgnu-ld -mhp-ld -mfixed-range =ã¬ãžã¹ã¿ç¯å²
-mãžã£ã³ãã€ã³ãã£ã¬ã€ -mlinker-opt -mlong-calls -mlong-ããŒãã¹ã㢠-mno-disable-fpregs
-mno-disable-indexing -mno-fast-indirect-calls -mno-ã¬ã¹ -mno-ãžã£ã³ãã€ã³ãã£ã¬ã€
-mno-long-load-store -mno-ããŒã¿ãã«-ã©ã³ã¿ã€ã -mno-ãœãããããŒã -mno-space-regs
-msoft-float -mpa-risc-1-0 -mpa-risc-1-1 -mpa-risc-2-0 -ããŒã¿ãã«ã©ã³ã¿ã€ã
-mschedule =CPUã¿ã€ã -mspace-regs -msio -mwsio -munix =unix-std -nolibdld -éç
-ã¹ã¬ãã
i386 ãš x86-64 ãªãã·ã§ã³ -mtune =CPUã¿ã€ã -XNUMXæ=CPUã¿ã€ã -mtune-ctrl =æ©èœãªã¹ã
-mdump-tune-features -mno-ããã©ã«ã -mfpmath =åäœ -masm =æ¹èš -mno-ãã¡ã³ã·ãŒ-æ°åŠ-387
-mno-fp-ret-in-387 -msoft-float -mno-wide-ä¹ç® -mrtd -æªæ§-ããã«
-mpreferred-stack-boundary =NUM -mincoming-stack-boundary =NUM -mcld -mcx16 -msahf
-mmovbe -mcrc32 -mã¬ã·ã -mrecip =ãªãã -mvzeroupper -mprefer-avx128 -ããŒã -mse -msse2
-msse3 -mssse3 -msse4.1 -msse4.2 -msse4 -mavx -mavx2 -mavx512f -mavx512pf -mavx512er
-mavx512cd -ã ã·ã£ -ã¡ã€ãº -mpclmul -mfsgsbase -mrdrnd -mf16c -MFMA -mprefetchwt1 -msse4a
-m3dnow -mpopcnt -ããã -mbmi -MTBM -mfma4 -mxop -mlzcnt -mbmi2 -mfxsr -mxsave
-mxsaveopt -mrtm -mlwp -ããªã¹ã¬ãã -mno-align-stringops -minline-all-stringops
-minline-stringops-åçã« -mstringop-strategy =ALG -mmemcpy-strategy =æŠç¥
-mmemset-strategy =æŠç¥ -mpush-args -maccumulate-çºä¿¡åŒæ°
-m128bit-long-double -m96bit-long-double -mlong-double-64 -mlong-double-80
-mlong-double-128 -mregparm =NUM -msseregparm -mveclibabi =type -mvect8-ret-in-mem
-mpc32 -mpc64 -mpc80 -mstackrealign -momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ -mno-ã¬ãããŸãŒã³
-mno-tls-direct-seg-refs -mcmodel =ã³ãŒãã¢ãã« -mabi =å -maddress-mode =ã¢ãŒã -m32 -m64
-mx32 -m16 -mlarge-data-threshold =NUM -msse2avx - ãããã£ãŒ -m8bit-idiv
-mavx256-split-unaligned-load -mavx256-split-unaligned-store
-mstack-protector-guard =ã¬ãŒã
i386 ãš x86-64 Windows ãªãã·ã§ã³ -mconsole -ãã·ã°ãŠã£ã³ -mno-cygwin -mdll
-mnop-fun-dllimport -mã¹ã¬ãã -ãã¥ãã³ãŒã -mwin32 -mwindows -fno-set-stack-executable
IA-64 ãªãã·ã§ã³ -mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -mgnu-as -mgnu-ld -mno-pic
-mvolatile-asm-åæ¢ -mã¬ãžã¹ã¿å -msdata -mno-sdata -må®æ°-gp -mauto-pic
-æ··ä¹±-çã£ã -minline-float-divide-min-latency -minline-float-divide-max-ã¹ã«ãŒããã
-mno-inline-float-divide -minline-int-divide-min-latency
-minline-int-divide-max-ã¹ã«ãŒããã -mno-inline-int-divide -minline-sqrt-min-latency
-minline-sqrt-max-ã¹ã«ãŒããã -mno-ã€ã³ã©ã€ã³-sqrt -mdwarf2-asm -ã»ãŒåæ¢ããã
-mfixed-range =ã¬ãžã¹ã¿ç¯å² -mtls-size =TLS ãµã€ãº -mtune =CPUã¿ã€ã -ãã«ã32 -mlp64
-msched-br-ããŒã¿ä»æ§ -msched-ar-data-spec -msched-control-spec -msched-br-in-data-spec
-msched-ar-in-data-spec -msched-in-control-spec -msched-spec-ldc
-msched-spec-control-ldc -msched-prefer-non-data-spec-insns
-msched-prefer-non-control-spec-insn -msched-stop-bits-after-ever-cycle
ã¯ãªãã£ã«ã«ãã¹ã®-msched-count-spec-in-critical-path -msel-sched-dont-check-control-spec
-msched-fp-mem-deps-zero-cost -msched-max-memory-insn-ããŒããªããã
-msched-max-memory-insns =ããã¯ã¹ã€ã³SNS
LM32 ãªãã·ã§ã³ -mbarrel-shift-å¯Ÿå¿ -mdivideå¯Ÿå¿ -mmultiply-察å¿
-msign-extend-enabled -ãã¥ãŒã¶ãŒå¯Ÿå¿
M32R / D ãªãã·ã§ã³ -m32r2 -m32rx -m32r -mdebug -æªæ§ã«ãŒã -mno-align-loops
-missue-rate =æ° -mbranch-cost =æ° -mmodel =ã³ãŒããµã€ãºã¢ãã«ã¿ã€ã -msdata =sdata-
type -mno-flush-func -mflush-func =å -mno-flush-trap -mflush-trap =æ° -G NUM
M32C ãªãã·ã§ã³ -mcpu =CPU -msim -memregs =æ°
M680x0 ãªãã·ã§ã³ -XNUMXæ=ã¢ãŒã -mcpu =CPU -mtune =æ² -m68000 -m68020 -m68020-40
-m68020-60 -m68030 -m68040 -m68060 -mcpu32 -m5200 -m5206e -m528x -m5307 -m5407
-mcfv4e -mbitfield -mno-ããããã£ãŒã«ã -mc68000 -mc68020 -mnobitfield -mrtd -mno-rtd
-mdiv -mno-div -mshort -mno-short -mhard-float -m68881 -msoft-float -mpcrel
-æªæ§-int -mstrict-align -msep-ããŒã¿ -mno-sep-ããŒã¿ -mshared-library-id = n
-mid-å ±æã©ã€ãã©ãª -mno-id-å ±æã©ã€ãã©ãª -mxgot -mno-xgot
Mã³ã¢ ãªãã·ã§ã³ -ãã«ããªãã -mno-ããŒãã©ã€ã -mdiv -mno-div -mrelax-å³æ
-mno-relax-immediates -mwide-ããããã£ãŒã«ã -mno-wide-ããããã£ãŒã«ã -m4byte-é¢æ°
-mno-4byte-é¢æ° -mcallgraph-ããŒã¿ -mno-callgraph-data -mslow-bytes
-mno-slow-bytes -mno-lsim -mlittle-ãšã³ãã£ã¢ã³ -mbig-ãšã³ãã£ã¢ã³ -m210 -m340
-mstack-å¢å
ã¡ãã ãªãã·ã§ã³ -mabsdiff -ã¢ãŒã«-opts -å¹³å -mbased =n -mbitops -mc =n -mclip
-mconfig =å -mcop -mcop32 -mcop64 -mivc2 -mdc -mdiv -meb -ã¡ã« -mio-æ®çºæ§ -ml
-mleadz -ãã -mminmax -mmult -mno-opts -mrepeat -MS -msatur -msdram -msim -msimnovec
-mtf -mtiny =n
ãã€ã¯ããã¬ã€ãº ãªãã·ã§ã³ -msoft-float -mhard-float -msmall-åå² -mcpu =CPU -mmemcpy
-mxl-ãœãããã« -mxl-ãœãã-div -mxl-ãã¬ã«ã·ãã¿ -mxl-ãã¿ãŒã³-æ¯èŒ -mxl-ã¹ã¿ãã¯ãã§ãã¯
-mxl-gp-opt -mno-clearbss -mxl-ä¹ç®-é« -mxl-float-convert -mxl-float-sqrt
-mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -mxl-䞊ã¹æ¿ã -mxlã¢ãŒã-ã¢ããªã¢ãã«
MIPS ãªãã·ã§ã³ -THE -EB -XNUMXæ=ã¢ãŒã -mtune =ã¢ãŒã -ãããã¹1 -ãããã¹2 -ãããã¹3 -ãããã¹4
-ãããã¹32 -mips32r2 -ãããã¹64 -mips64r2 -ãããã¹16 -mno-mips16 -mflip-mips16
-minterlink-å§çž® -mno-interlink-compressed -minterlink-mips16
-mno-ã€ã³ã¿ãŒãªã³ã¯-mips16 -mabi =ABI -ããã³ãŒã« -mno-abicalls -mshared -mno-å ±æ
-mplt -mno-plt -mxgot -mno-xgot -mgp32 -mgp64 -MFP32 -MFP64 -mhard-float
-msoft-float -mno-float -msingle-float -mdouble-float -mabs =ã¢ãŒã -mnan =ãšã³ã³ãŒãã£ã³ã°
-mdsp -mno-dsp -mdspr2 -mno-dspr2 -mmcu -mmno-mcu -ã¡ã -mno-eva -mvirt -mno-virt
-ãã€ã¯ããããã¹ -mno-micromips -mfpu =fpuã¿ã€ã -msmartmips -mno-ã¹ããŒããããã¹ -é害ã®ããã·ã³ã°ã«
-mno-ãã¢ãªã³ã°-ã·ã³ã°ã« -mdmx -mno-mdmx -mips3d -mno-mips3d -mmt -mno-mt -mllsc
-mno-llsc -mlong64 -mlong32 -msym32 -mno-sym32 -GNUM -mlocal-sdata
-mno-local-sdata -mextern-sdata -mno-extern-sdata -mgpopt -mno-gopt -åã蟌ã¿ããŒã¿
-mno-embedded-data -muninit-const-in-rodata -mno-uninit-const-in-rodata
-mcode-èªã¿åãå¯èœ=èšå® -msplit-ã¢ãã¬ã¹ -mno-åå²ã¢ãã¬ã¹ -mexplicit-relocs
-mno-explicit-relocs -mcheck-ãŒãé€ç® -mno-check-zero-division -mdivide-ãã©ãã
-mdivide-breaks -mmemcpy -mno-memcpy -mlong-calls -mno-long-calls -ããã -mno-mad
-ãããã -mno-imadd -æ··ä¹±-çã£ã -mno-fusion-madd -nocpp -mfix-24k -mno-fix-24k
-mfix-r4000 -mno-fix-r4000 -mfix-r4400 -mno-fix-r4400 -mfix-r10000 -mno-fix-r10000
-mfix-rm7000 -mno-fix-rm7000 -mfix-vr4120 -mno-fix-vr4120 -mfix-vr4130
-mno-fix-vr4130 -mfix-sb1 -mno-fix-sb1 -mflush-func =ãã¡ã³ã¯ -mno-flush-func
-mbranch-cost =NUM -mbranch-å¯èœæ§ãé«ã -mno-ãã©ã³ãã®å¯èœæ§ãé«ã -mfp-äŸå€
-mno-fp-äŸå€ -mvr4130-æŽå -mno-vr4130-align -msynci -mno-synci
-mrelax-pic-calls -mno-relax-pic-calls -mmcount-ra-ã¢ãã¬ã¹
ãããã¯ã¹ ãªãã·ã§ã³ -mlibfuncs -mno-libfuncs -ã¡ãã·ãã³ -mno-ã€ãã·ãã³ -mabi = gnu
-mabi = mmixware -mzero-æ¡åŒµ -mknutthiv -mtoplevel-ã·ã³ãã« -ã¡ã«ã -mbranch-äºæž¬
-mno-ãã©ã³ãäºæž¬ -mbase-ã¢ãã¬ã¹ -mno-ããŒã¹ã¢ãã¬ã¹ -msingle-çµäº
-mno-åäžåºå£
MN10300 ãªãã·ã§ã³ -mmult-ãã° -mno-mult-bug -mno-am33 -ãã33 -mam33-2 -ãã34 -mtune =CPU-
type -mreturn-pointer-on-d0 -mno-crt0 -mãªã©ãã¯ã¹ -mliw -msetlb
åæ° ãªãã·ã§ã³ -meb -ã¡ã« -mno-crt0
MSP430 ãªãã·ã§ã³ -msim -masm-hex -mmcu = -mcpu = -æ¡å€§ -å°ãã -mãªã©ãã¯ã¹ -mhwmult = -minrt
NDS32 ãªãã·ã§ã³ -mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -mreduced-regs -mfull-regs -mcmov -mno-cmov
-mperf-ext -mno-perf-ext -mv3push -mno-v3push -m16ããã -mno-16ããã -mgp-ãã€ã¬ã¯ã
-mno-gp-direct -misr-vector-size =NUM -mcache-block-size =NUM -XNUMXæ=ã¢ãŒã
-mforce-fp-as-gp -mforbid-fp-as-gp -mex9 -mctor-dtor -mãªã©ãã¯ã¹
ããªã¹ II ãªãã·ã§ã³ -G NUM -mgpopt -mno-gpopt -ã¡ã« -meb -mno-ãã€ãã¹-ãã£ãã·ã¥ -mbypass-ãã£ãã·ã¥
-mno-ãã£ãã·ã¥-æ®çºæ§ -mcache-æ®çºæ§ -mno-fast-sw-div -mfast-sw-div -mhw-mul
-mno-hw-mul -mhw-ãã«ã¯ã¹ -mno-hw-mulx -mno-hw-div -mhw-div -mcustom-æ 通=N
-mno-ã«ã¹ã¿ã -æ 通 -mcustom-fpu-cfg =å -ãã« -msmallc -msys-crt0 =å -msys-lib =å
PDP-11 ãªãã·ã§ã³ -mfpu -msoft-float -mac0 -mno-ac0 -m40 -m45 -m10 -mbcopy
-mbcopy-ãã«ãã€ã³ -ãã³ã32 -mno-int16 -ãã³ã16 -mno-int32 -mfloat32 -mno-float64
-mfloat64 -mno-float32 -ããã· -mno-ã¢ãã· -mbranch-é«äŸ¡ -mbranch-å®ã
-munix-asm -mdec-asm
ãã³ããã ãªãã·ã§ã³ -å=ae_type -mvliw-lookahead =N -msymbol-as-ã¢ãã¬ã¹
-mno-éå¹çç-èŠå
PowerPC ãªãã·ã§ã³ RS / 6000ããã³PowerPCãªãã·ã§ã³ãåç §ããŠãã ããã
RL78 ãªãã·ã§ã³ -msim -mmul = none -mmul = g13 -mmul = rl78
RS / 6000 ãš PowerPC ãªãã·ã§ã³ -mcpu =CPUã¿ã€ã -mtune =CPUã¿ã€ã -mcmodel =ã³ãŒãã¢ãã«
-mpowerpc64 -ãã«ãã£ãã㯠-mno-altivec -mpowerpc-gpopt -mno-powerpc-gpopt
-mpowerpc-gfxopt -mno-powerpc-gfxopt -mmfcrf -mno-mfcrf -mpopcntb -mno-popcntb
-mpopcntd -mno-popcntd -mfprnd -mno-fprnd -mcmpb -mno-cmpb -mmfpgpr -mno-mfpgpr
-mhard-dfp -mno-ããŒã-dfp -mfull-toc -æå°-toc -mno-fp-in-toc -mno-sum-in-toc
-m64 -m32 -mxl-compat -mno-xl-compat -mpe -æªæ§ãã¯ãŒ -æªæ§-èªç¶
-msoft-float -mhard-float -è€æ° -mno-è€æ° -msingle-float -mdouble-float
-msimple-fpu -mstring -mno-string -mupdate -mno-ã¢ããããŒã -mavoid-indexed-addresses
-mno-avoid-indexed-addresses -æ··ä¹±-çã£ã -mno-fusion-madd -mbit-align
-mno-bit-align -mstrict-align -mno-strict-align -måé 眮å¯èœ -mno-åé 眮å¯èœ
-mrelocatable-lib -mno-åé 眮å¯èœã©ã€ãã©ãª -mtoc -mno-toc -å°ã -mlittle-ãšã³ãã£ã¢ã³
-mbig -mbig-ãšã³ãã£ã¢ã³ -mdynamic-no-pic -ãã«ãã£ãã㯠-mswdiv -msingle-pic-base
-mprioritize-restricted-insns =åªå é äœ -msched-costly-dep =äŸåé¢ä¿ã¿ã€ã
-minsert-sched-nops =ã¹ããŒã -mcall-sysv -mcall-netbsd -maix-struct-return
-msvr4-struct-return -mabi =ã¢ãã¿ã€ã -msecure-plt -mbss-plt
-mblock-move-inline-limit =NUM -ãã»ã« -mno-isel -misel = yes -misel = no -mspe -mno-spe
-mspe = yes -mspe = no -é害è -mgen-cell-ãã€ã¯ãã³ãŒã -mwarn-cell-ãã€ã¯ãã³ãŒã -mvrsave
-mno-vrsave -mmulhw -mno-mulhw -mdlmzb -mno-dlmzb -mfloat-gprs = yes -mfloat-gprs = no
-mfloat-gprs = single -mfloat-gprs = double -mãããã¿ã€ã -mno-ãããã¿ã€ã -msim -mmvme
-ããã -ãã€ãšããŒãã€ã -ã¡ã³ã -msdata -msdata =ãªãã -mvxworks -G NUM -pthread -mã¬ã·ã
-mrecip =ãªãã -mno-ã¬ã·ã -mrecip-粟床 -mno-recipe-precision -mveclibabi =type -mfriz
-mno-ããªãº -mpointers-to-nested-functions -mno-ãã¹ããããé¢æ°ãžã®ãã€ã³ã¿
-msave-toc-éæ¥ -mno-save-toc-indirect -mpower8-ãã¥ãŒãžã§ã³ -mno-mpower8-fusion
-mpower8-ãã¯ãã« -mno-power8-vector -mcrypto -mno-crypto -mdirect-移å -mno-direct-move
-mquad-ã¡ã¢ãª -mno-ã¯ã¢ããã¡ã¢ãª -mquad-ã¡ã¢ãª-ã¢ããã㯠-mno-quad-memory-atomic
-mcompat-align-parm -mno-compat-align-parm
RX ãªãã·ã§ã³ -m64ãããããã« -m32ãããããã« -fpu -ããã -mcpu = -mbig-ãšã³ãã£ã¢ã³-ããŒã¿
-mlittle-ãšã³ãã£ã¢ã³-ããŒã¿ -msmall-ããŒã¿ -msim -mno-sim -mas100-æ§æ -mno-as100-æ§æ
-mãªã©ãã¯ã¹ -mmax-constant-size = -mint-register = -mpid -mno-warn-è€æ°ã®é«éå²ã蟌ã¿
-msave-acc-in-interrupts
S / 390 ãš zã·ãªãŒãº ãªãã·ã§ã³ -mtune =CPUã¿ã€ã -XNUMXæ=CPUã¿ã€ã -mhard-float -msoft-float
-mhard-dfp -mno-ããŒã-dfp -mlong-double-64 -mlong-double-128 -mbackchain
-mno-ããã¯ãã§ãŒã³ -mpacked-ã¹ã¿ã㯠-mno-packed-stack -msmall-exec -mno-small-exec
-mmvcle -mno-mvcle -m64 -m31 -mdebug -mno-ãããã° -ã¡ãµ -mzach -mtpf-ãã¬ãŒã¹
-mno-tpf-ãã¬ãŒã¹ -æ··ä¹±-çã£ã -mno-fusion-madd -mwarn-ãã¬ãŒã ãµã€ãº -mwarn-dynamicstack
-mstack-size -mstack-guard -mhotpatch =ããŒãã¯ãŒã,ããŒãã¯ãŒã
ã¹ã³ã¢ ãªãã·ã§ã³ -meb -ã¡ã« -mnhwloop -ãã«ã¹ -mmac -mscore5 -mscore5u -mscore7 -mscore7d
SH ãªãã·ã§ã³ -m1 -m2 -m2e -m2a-nofpu -m2a-ã·ã³ã°ã«ã®ã¿ -m2a-ã·ã³ã°ã« -m2a -m3 -m3e
-m4-nofpu -m4-ã·ã³ã°ã«ã®ã¿ -m4-ã·ã³ã°ã« -m4 -m4a-nofpu -m4a-ã·ã³ã°ã«ã®ã¿ -m4a-ã·ã³ã°ã«
-m4a -m4al -m5-64ã¡ãã£ã¢ -m5-64ã¡ãã£ã¢-nofpu -m5-32ã¡ãã£ã¢ -m5-32ã¡ãã£ã¢-nofpu -m5-ã³ã³ãã¯ã
-m5-ã³ã³ãã¯ã-nofpu -mb -ml -mdalign -mãªã©ãã¯ã¹ -mbigtable -mfmovd -ãã¿ã -ã ã¬ããµã¹
-mno-ã«ããµã¹ -mnomacsave -ãã£ãŒ -mno-ieee -mbitops -ãã¹ãµã€ãº -minline-ic_invalidate
-mpadstruct -mspace -mprefergot -musermode -ãã«ãã³ã¹ã=æ° -mdiv =æŠç¥
-mdivsi3_libfunc =å -mfixed-range =ã¬ãžã¹ã¿ç¯å² -mindexed-addressing
-mgettrcost =æ° -mpt-ä¿®æ£æžã¿ -maccumulate-çºä¿¡åŒæ° -minvalid-ã·ã³ãã«
-matomic-model =ååã¢ãã« -mbranch-cost =NUM -mzdcbranch -mno-zdcbranch -æ··ä¹±-çã£ã
-mno-fusion-madd -mfsca -mno-fsca -mfsrra -mno-fsrra -mpreend-cmove -mtas
ãœã©ãªã¹ 2 ãªãã·ã§ã³ -mclear-hwcap -mno-clear-hwcap -mimpure-ããã¹ã -mno-äžçŽãªããã¹ã
-pã¹ã¬ãã -pthread
SPARC ãªãã·ã§ã³ -mcpu =CPUã¿ã€ã -mtune =CPUã¿ã€ã -mcmodel =ã³ãŒãã¢ãã« -mmemory-model =ã¡ã¢ãª-
-m32 -m64 -map-regs -mno-app-regs -mfaster-æ§é äœ -mno-faster-structs
-mãã©ãã -mno-ãã©ãã -mfpu -mno-fpu -mhard-float -msoft-float -mhard-quad-float
-msoft-quad-float -mstack-ãã€ã¢ã¹ -mno-ã¹ã¿ãã¯ãã€ã¢ã¹ -äžæŽåããã«ã¹
-mno-unaligned-doubles -ãã¥ãŒã¶ãŒã¢ãŒã -mno-ãŠãŒã¶ãŒã¢ãŒã -mv8plus -mno-v8plus -mvis
-mno-vis -mvis2 -mno-vis2 -mvis3 -mno-vis3 -mcbcond -mno-cbcond -mfmaf -mno-fmaf
-mpopc -mno-popc -mfix-at697f -mfix-ut699
SPU ãªãã·ã§ã³ -mwarn-åé 眮 -merror-reloc -msafe-dma -ã ã³ã»ãŒã-dma -mbranch-ãã³ã
-msmall-mem -mlarge-mem -mstdmain -mfixed-range =ã¬ãžã¹ã¿ç¯å² -mea32 -mea64
-maddress-space-conversion -mno-ã¢ãã¬ã¹ç©ºéå€æ -mcache-size =ãã£ãã·ã¥ãµã€ãº
-matomic-ã¢ããããŒã -mno-atomic-updates
ãšã³ãã«ã㌠V ãªãã·ã§ã³ -Qy -Qn -YPããã¹ -ããŒããDIR
ã¿ã€ã«Gx ãªãã·ã§ã³ -mcpu = CPU -m32 -m64 -mbig-ãšã³ãã£ã¢ã³ -mlittle-ãšã³ãã£ã¢ã³ -mcmodel =ã³ãŒãã¢ãã«
ã¿ã€ã«ãã ãªãã·ã§ã³ -mcpu =CPU -m32
VïŒïŒ ãªãã·ã§ã³ -mlong-calls -mno-long-calls -ã¡ãã -mno-ep -mprolog-é¢æ°
-mno-ããããŒã°é¢æ° -mspace -mtda =n -msda =n -mzda =n -map-regs -mno-app-regs
-mdisable-callt -mno-disable-callt -mv850e2v3 -mv850e2 -mv850e1 -mv850es -mv850e
-mv850 -mv850e3v5 -ã ã«ãŒã -mãªã©ãã¯ã¹ -mlong-ãžã£ã³ã -msoft-float -mhard-float -mgcc-ã¢ã
-mrh850-abi -mbig ã¹ã€ãã
VAX ãªãã·ã§ã³ -mg -mgnu -munix
VMS ãªãã·ã§ã³ -mvms-ãªã¿ãŒã³ã³ãŒã -mdebug-main =æ¥é èŸ -mmalloc64 -mpointer-size =ãµã€ãº
VxWorks ãªãã·ã§ã³ -mrtp -ééç -Bã¹ã¿ãã£ã㯠-ããã€ããã㯠-Xbind-lazy -Xbind-ä»
x86-64 ãªãã·ã§ã³ i386ããã³x86-64ãªãã·ã§ã³ãåç §ããŠãã ããã
ãšã¯ã¹ã¹ããŒããŒ16 ãªãã·ã§ã³ -msim
ãšã¯ã¹ãã³ãµ ãªãã·ã§ã³ -mconst16 -mno-const16 -æ··ä¹±-çã£ã -mno-fusion-madd -mforce-no-pic
-mserialize-volatile -mno-serialize-volatile -mtext-ã»ã¯ã·ã§ã³ãªãã©ã«
-mno-text-section-literals -mtarget-align -mno-ã¿ãŒã²ãã-ã¢ã©ã€ã³ -mlongcalls
-mno-longcalls
zã·ãªãŒãº ãªãã·ã§ã³ S / 390ããã³zSeriesãªãã·ã§ã³ãåç §ããŠãã ããã
Code äžä»£ ãªãã·ã§ã³
-fcall-ä¿åæžã¿-REG -fcall-used-REG -ä¿®æ£æžã¿-REG -äŸå€ -fnon-call-äŸå€
-fdelete-dead-äŸå€ -funwind-ããŒãã« -fasynchronous-unwind-tables -fno-gnu-ãŠããŒã¯
-finhibit ãµã€ãº ãã£ã¬ã¯ãã£ã -finstrument-é¢æ°
-finstrument-functions-exclude-function-list =sym,symã...
-finstrument-functions-exclude-file-list =file,fileã... -fno-common -fno-ident
-fpcc-æ§é äœ-ãªã¿ãŒã³ -fpic -fPIC -fpie -fPIE -fno-ãžã£ã³ãããŒãã« -frecord-gcc-ã¹ã€ãã
-freg-æ§é äœ-ãªã¿ãŒã³ -fshort-åæå -fshort-double -fshort-wchar -fverbose-asm
-fpack-struct [=n] -fstack-ãã§ã㯠-fstack-limit-register =REG -fstack-limit-symbol =sym
-fno-ã¹ã¿ãã¯å¶é -fsplit-ã¹ã¿ã㯠-fleading-ã¢ã³ããŒã¹ã³ã¢ -ftls-model =
-fstack-reuse =åå©çšã¬ãã« -ftrapv -fwrapv -fbounds-ãã§ã㯠-èŠèªæ§
-fstrict-volatile-ããããã£ãŒã«ã -fsync-libcalls
ãªãã·ã§ã³ å¶åŸ¡ ã çš®é¡ of åºå
ã³ã³ãã€ã«ã«ã¯ãååŠçãé©åãªã³ã³ãã€ã«ãã¢ã»ã³ããªãããã³æ倧XNUMXã€ã®æ®µéãå«ãŸããŸãã
ãªã³ã¯ãåžžã«ãã®é åºã§ã GCCã¯ãããã€ãã®ååŠçãšã³ã³ãã€ã«ãå¯èœã§ãã
è€æ°ã®ã¢ã»ã³ãã©ãŒå ¥åãã¡ã€ã«ããŸãã¯XNUMXã€ã®ã¢ã»ã³ãã©ãŒå ¥åãã¡ã€ã«ã®ããããã«ãã¡ã€ã«ããŸãã ãããã
åã¢ã»ã³ãã©å ¥åãã¡ã€ã«ã¯ãªããžã§ã¯ããã¡ã€ã«ãçæãããªã³ã¯ã¯ãã¹ãŠã®ãªããžã§ã¯ããçµåããŸã
ãã¡ã€ã«ïŒæ°ããã³ã³ãã€ã«ããããã®ãããã³å ¥åãšããŠæå®ããããã®ïŒãå®è¡å¯èœãã¡ã€ã«ã«å ¥ããŸãã
ç¹å®ã®å ¥åãã¡ã€ã«ã«ã€ããŠããã¡ã€ã«åã®ãµãã£ãã¯ã¹ã«ãã£ãŠã³ã³ãã€ã«ã®çš®é¡ã決ãŸããŸãã
çµããïŒ
file.c
ååŠçãå¿ èŠãªCãœãŒã¹ã³ãŒãã
file.i
ååŠçããŠã¯ãªããªãCãœãŒã¹ã³ãŒãã
file.ii
ååŠçããŠã¯ãªããªãC ++ãœãŒã¹ã³ãŒãã
file.m
Objective-Cã®ãœãŒã¹ã³ãŒãã ãšãªã³ã¯ããå¿ èŠãããããšã«æ³šæããŠãã ãã libobjc äœæããã©ã€ãã©ãª
Objective-Cããã°ã©ã ã®äœæ¥ã
file.mi
ååŠçããŠã¯ãªããªãObjective-CãœãŒã¹ã³ãŒãã
file.mm
file.M
ç®ç-C ++ãœãŒã¹ã³ãŒãã ãšãªã³ã¯ããå¿ èŠãããããšã«æ³šæããŠãã ãã libobjc äœæããã©ã€ãã©ãª
Objective-C ++ããã°ã©ã ã®åäœã ãäºæ¿ãã ãã .M æåéãã®å€§æåMãæããŸãã
file.mii
ç®ç-ååŠçããŠã¯ãªããªãC ++ãœãŒã¹ã³ãŒãã
file.h
ããªã³ã³ãã€ã«æžã¿ã«å€æãããCãC ++ãObjective-CããŸãã¯Objective-C ++ããããŒãã¡ã€ã«
ããããŒïŒããã©ã«ãïŒããŸãã¯CãC ++ããããŒãã¡ã€ã«ãAdaä»æ§ã«å€æããŸãïŒ
-fdump-ada-spec ã¹ã€ããïŒã
file.ccã«
file.cp
file.cxx
file.cpp
file.CPP
file.c ++
file.C
ååŠçãå¿ èŠãªC ++ãœãŒã¹ã³ãŒãã ã§æ³šæããŠãã ãã .cxxãæåŸã®XNUMXæå
äž¡æ¹ãšãæåéãã§ãªããã°ãªããŸãã xã åæ§ã«ã .C æåéãã®å€§æåCãæããŸãã
file.mm
file.M
ç®ç-ååŠçãå¿ èŠãªC ++ãœãŒã¹ã³ãŒãã
file.mii
ç®ç-ååŠçããŠã¯ãªããªãC ++ãœãŒã¹ã³ãŒãã
file.H H
file.H
file.hp
file.hxx
file.hpp
file.HPP
file.h ++
file.tcc
ããªã³ã³ãã€ã«æžã¿ããããŒãŸãã¯Adaä»æ§ã«å€æãããC ++ããããŒãã¡ã€ã«ã
file.f
fileãã«ãšã£ãŠ
file.ftn
ååŠçããŠã¯ãªããªãFortranãœãŒã¹ã³ãŒãã®åœ¢åŒãä¿®æ£ããŸããã
file.F
fileãã«ãšã£ãŠ
file.fpp
file.FPP
file.FTN
ååŠçãå¿ èŠãªåºå®åœ¢åŒã®FortranãœãŒã¹ã³ãŒãïŒåŸæ¥ã®
ããªããã»ããµïŒã
file.f90
file.f95
file.f03
file.f08
ååŠçããŠã¯ãªããªãèªç±åœ¢åŒã®FortranãœãŒã¹ã³ãŒãã
file.F90
file.F95
file.F03
file.F08
ååŠçãå¿ èŠãªèªç±åœ¢åŒã®FortranãœãŒã¹ã³ãŒãïŒåŸæ¥ã®
ããªããã»ããµïŒã
fileãè¡ã
ãœãŒã¹ã³ãŒãã«ç§»åããŸãã
file.ads
ã©ã€ãã©ãªãŠããã宣èšïŒã®å®£èšïŒãå«ãAdaãœãŒã¹ã³ãŒããã¡ã€ã«
ããã±ãŒãžããµãããã°ã©ã ããžã§ããªãã¯ããŸãã¯ãžã§ããªãã¯ã€ã³ã¹ã¿ã³ã¹åïŒããŸãã¯ã©ã€ãã©ãªãŠããã
ååå€æŽå®£èšïŒããã±ãŒãžããžã§ããªãã¯ããŸãã¯ãµãããã°ã©ã ã®ååå€æŽå®£èšïŒã ãã®ãããª
ãã¡ã€ã«ã¯ãŸãåŒã°ããŸã ã¹ããã¯.
file.adb
ã©ã€ãã©ãªãŠãããæ¬äœïŒãµãããã°ã©ã ãŸãã¯ããã±ãŒãžæ¬äœïŒãå«ãAdaãœãŒã¹ã³ãŒããã¡ã€ã«ã
ãã®ãããªãã¡ã€ã«ã¯ã ããã£.
file.d
DãœãŒã¹ã³ãŒããã¡ã€ã«ã
file.di
Dã€ã³ã¿ãŒãã§ãŒã¹ã³ãŒããã¡ã€ã«ã
file.dd
Dããã¥ã¡ã³ãã³ãŒããã¡ã€ã«ã
file.s
ã¢ã»ã³ãã©ã³ãŒãã
file.S
file.sx
ååŠçãå¿ èŠãªã¢ã»ã³ãã©ã³ãŒãã
ä»ã®
ãªã³ã¯ã«çŽæ¥ãã£ãŒãããããªããžã§ã¯ããã¡ã€ã«ã èªèãããŠããªããã¡ã€ã«å
æ¥å°ŸèŸã¯ãã®ããã«æ±ãããŸãã
å ¥åèšèªã¯ã -x ãªãã·ã§ã³ïŒ
-x èšèª
æ瀺çã«æå®ãã èšèª 次ã®å ¥åãã¡ã€ã«ã®å ŽåïŒ
ã³ã³ãã€ã©ã¯ããã¡ã€ã«åã®ãµãã£ãã¯ã¹ã«åºã¥ããŠããã©ã«ããéžæããŸãïŒã ãã®ãªãã·ã§ã³ã¯ãã¹ãŠã«é©çšãããŸã
次ã®å ¥åãã¡ã€ã«ãŸã§ -x ãªãã·ã§ã³ã ã®å¯èœãªå€ èšèª ã«ã¯æ¬¡ã®å€ããããŸã:
cc-ããããŒcpp-åºå
c ++ c ++-ããããŒc ++-cpp-åºå
Objective-C Objective-C-HeaderObjective-C-CPP-åºå
ç®ç-c ++ç®ç-c ++-ããããŒç®ç-c ++-cpp-åºå
ã¢ã»ã³ãã©ã¢ã»ã³ãã©-with-cpp
ãšã€ã
d
f77f77-cpp-å ¥åf95f95-cpp-å ¥å
go
ãžã£ã¯
-x ãªã
èšèªã®æå®ããªãã«ããŠãåŸç¶ã®ãã¡ã€ã«ãåŠçãããããã«ããŸã
ãã¡ã€ã«åã®ãµãã£ãã¯ã¹ã«å¿ããŠïŒ -x ãŸã£ãã䜿çšãããŠããŸããïŒã
-ãã¹çµäºã³ãŒã
éåžž gccã® ã³ã³ãã€ã©ã®ããããã®ãã§ãŒãºãæ»ã£ãå Žåãããã°ã©ã ã¯ã³ãŒã1ã§çµäºããŸã
倱æããæ»ãã³ãŒãã æå®ããå Žå -ãã¹çµäºã³ãŒã gcc㮠代ããã«ããã°ã©ã
ãšã©ãŒãè¿ãä»»æã®ãã§ãŒãºã«ãã£ãŠçæãããæ°å€çã«æãé«ããšã©ãŒã§æ»ããŸã
衚瀺ã CãC ++ãããã³Fortranã®ããã³ããšã³ãã¯ãå éšã³ã³ãã€ã©ãšã©ãŒã®å Žåã«4ãè¿ããŸãã
ã«ééããŸããã
ã³ã³ãã€ã«ã®äžéšã®æ®µéã®ã¿ãå¿ èŠãªå Žåã¯ã次ã䜿çšã§ããŸãã -x ïŒãŸãã¯ãã¡ã€ã«åã®ãµãã£ãã¯ã¹ïŒ
äŒãã gccã® ã©ãããå§ããã°ãããããããŠãªãã·ã§ã³ã®XNUMX〠-c, -SãŸã㯠-E ã©ãã«èšãã gccã® ã«ãã
æ¢ãŸãã ããã€ãã®çµã¿åããã«æ³šæããŠãã ããïŒããšãã°ã -x cpp-åºå -EïŒæ瀺ãã gccã® å®è¡ããŸã
äœããããŸããã
-c ãœãŒã¹ãã¡ã€ã«ãã³ã³ãã€ã«ãŸãã¯ã¢ã»ã³ãã«ããŸããããªã³ã¯ããªãã§ãã ããã ãªã³ã¯æ®µéã¯åçŽã§ã
ãŸã å®æããŠãªãã æçµçãªåºåã¯ãåãœãŒã¹ãã¡ã€ã«ã®ãªããžã§ã¯ããã¡ã€ã«ã®åœ¢åŒã«ãªããŸãã
ããã©ã«ãã§ã¯ããœãŒã¹ãã¡ã€ã«ã®ãªããžã§ã¯ããã¡ã€ã«åã¯ãæ¥å°ŸèŸã眮ãæããããšã«ãã£ãŠäœæãããŸã .c,
.i, .sããªã©ã .o.
ã³ã³ãã€ã«ãã¢ã»ã³ããªãå¿ èŠãšããªããèªèãããªãå ¥åãã¡ã€ã«ã¯ç¡èŠãããŸãã
-S é©åãªã³ã³ãã€ã«ã®æ®µéã®åŸã§åæ¢ããŸãã çµã¿ç«ãŠãªãã§ãã ããã åºåã¯ã«ãããŸã
æå®ãããéã¢ã»ã³ãã©å ¥åãã¡ã€ã«ããšã®ã¢ã»ã³ãã©ã³ãŒããã¡ã€ã«ã®åœ¢åŒã
ããã©ã«ãã§ã¯ããœãŒã¹ãã¡ã€ã«ã®ã¢ã»ã³ãã©ãã¡ã€ã«åã¯ãæ¥å°ŸèŸã眮ãæããããšã«ãã£ãŠäœæãããŸã
.c, .iããªã©ã .s.
ã³ã³ãã€ã«ãå¿ èŠãšããªãå ¥åãã¡ã€ã«ã¯ç¡èŠãããŸãã
-E ååŠç段éã®åŸã§åæ¢ããŸãã ã³ã³ãã€ã©ãé©åã«å®è¡ããªãã§ãã ããã åºåã¯ã«ãããŸã
æšæºåºåã«éä¿¡ãããååŠçããããœãŒã¹ã³ãŒãã®åœ¢åŒã
ååŠçãå¿ èŠãšããªãå ¥åãã¡ã€ã«ã¯ç¡èŠãããŸãã
-o file
åºåããã¡ã€ã«ã«é 眮 fileã ããã¯ãçæãããŠããããããçš®é¡ã®åºåã«é©çšãããŸãã
å®è¡å¯èœãã¡ã€ã«ããªããžã§ã¯ããã¡ã€ã«ãã¢ã»ã³ãã©ãã¡ã€ã«ããŸãã¯ååŠçãããCã®ãããã§ãã£ãŠã
ã³ãŒââãã
If -o ãæå®ãããŠããªãå Žåãããã©ã«ãã§ã¯å®è¡å¯èœãã¡ã€ã«ã ã¢ãŠãã ãªããžã§ã¯ã
ãã¡ã€ã« ãœãŒã¹.ãµãã£ãã¯ã¹ in ãœãŒã¹.oããã®ã¢ã»ã³ãã©ãã¡ã€ã« ãœãŒã¹ãããªã³ã³ãã€ã«æžã¿
ã®ããããŒãã¡ã€ã« ãœãŒã¹.ãµãã£ãã¯ã¹.gchãããã³æšæºåºåã®ãã¹ãŠã®ååŠçãããCãœãŒã¹ã
-v ã®ã¹ããŒãžãå®è¡ããããã«å®è¡ãããã³ãã³ããïŒæšæºãšã©ãŒåºåã«ïŒåºåããŸãã
ã³ã³ãã€ã«ã ãŸããã³ã³ãã€ã©ãã©ã€ãããã°ã©ã ãšã®ããŒãžã§ã³çªå·ãåºåããŸãã
ããªããã»ããµãšé©åãªã³ã³ãã€ã©ã
-###
ããã -v ãã ããã³ãã³ãã¯å®è¡ããããåŒæ°ã¯åŒçšç¬Šã§å²ãŸããŸãã
è±æ°åãŸãã¯ã./-_ãã®ã¿ãå«ã¿ãŸãã ããã¯ãã·ã§ã«ã¹ã¯ãªããã
ãã©ã€ããŒãçæããã³ãã³ãã©ã€ã³ããã£ããã£ããŸãã
-ãã€ã
ã®ããŸããŸãªæ®µééã®éä¿¡ã«ã¯ãäžæãã¡ã€ã«ã§ã¯ãªããã€ãã䜿çšããŸã
ã³ã³ãã€ã«ã ããã¯ãã¢ã»ã³ãã©ãèªã¿åãããšãã§ããªãäžéšã®ã·ã¹ãã ã§ã¯æ©èœããŸããã
ãã€ããã; ããããGNUã¢ã»ã³ãã©ã«ã¯åé¡ã¯ãããŸããã
- å©ããŠ
ã«ãã£ãŠç解ãããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®èª¬æãïŒæšæºåºåã«ïŒå°å·ããŸãã
gccã®ã ãã -v ãªãã·ã§ã³ãæå®ãããŸã - å©ã㊠æ§ã ãªã«ãåãç¶ãããŠããŸã
ã«ãã£ãŠåŒã³åºãããããã»ã¹ gccã®ãã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã衚瀺ã§ããããã«
åãå ¥ããã ã®å Žå -ãŠã§ã¯ã¹ãã© ãªãã·ã§ã³ãæå®ãããŠããŸãïŒ - å©ã㊠ãªãã·ã§ã³ïŒã
次ã«ãããã¥ã¡ã³ããé¢é£ä»ããããŠããªãã³ãã³ãã©ã€ã³ãªãã·ã§ã³ããããŸã
衚瀺ãããŸãã
--ã¿ãŒã²ãããã«ã
ã¿ãŒã²ããåºæã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®èª¬æãïŒæšæºåºåã«ïŒå°å·ããŸã
ããŒã«ããšã«ã äžéšã®ã¿ãŒã²ããã®å Žåãè¿œå ã®ã¿ãŒã²ããåºæã®æ å ±ã
å°å·ãããŸãã
--help = {class|[^]è³æ Œ}[ã...]
ã«ãã£ãŠç解ãããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®èª¬æãïŒæšæºåºåã«ïŒå°å·ããŸãã
æå®ããããã¹ãŠã®ã¯ã©ã¹ãšä¿®é£Ÿåã«é©åããã³ã³ãã€ã©ãŒã ãããã¯
ãµããŒããããŠããã¯ã©ã¹ïŒ
ãªããã£ãã€ã¶
ã³ã³ãã€ã©ãŒããµããŒããããã¹ãŠã®æé©åãªãã·ã§ã³ã衚瀺ããŸãã
èŠå
ã³ã³ãã€ã©ã«ãã£ãŠçæãããèŠåã¡ãã»ãŒãžãå¶åŸ¡ãããã¹ãŠã®ãªãã·ã§ã³ã衚瀺ããŸãã
ã¿ãŒã²ãã
ã¿ãŒã²ããåºæã®ãªãã·ã§ã³ã衚瀺ããŸãã ãšã¯ç°ãªã --ã¿ãŒã²ãããã«ã ãªãã·ã§ã³ããã ããã¿ãŒã²ãã-
ãªã³ã«ãšã¢ã»ã³ãã©ã®ç¹å®ã®ãªãã·ã§ã³ã¯è¡šç€ºãããŸããã ããã®èš³ã¯
ãããã®ããŒã«ã¯çŸåšãæ¡åŒµããµããŒãããŠããŸãã --help = æ§æã
paramsã¯
ã«ãã£ãŠèªèãããå€ã衚瀺ããŸã --ãã©ã¡ãŒã¿ ãªãã·ã§ã³ãéžæããŸãã
èšèª
ãµããŒããããŠãããªãã·ã§ã³ã衚瀺ãã èšèªããã§ã èšèª ã®XNUMXã€ã®ååã§ã
ãã®ããŒãžã§ã³ã®GCCã§ãµããŒããããŠããèšèªã
äžè¬çãª
ãã¹ãŠã®èšèªã«å ±éã®ãªãã·ã§ã³ã衚瀺ããŸãã
ãµããŒããããŠãã修食åã¯æ¬¡ã®ãšããã§ãã
ææžåãããŠããªã
ææžåãããŠããªããªãã·ã§ã³ã®ã¿ã衚瀺ããŸãã
åå ãã
åãã§çå·ã®åŸã«è¡šç€ºãããåŒæ°ãåã衚瀺ãªãã·ã§ã³
次ã®ãããªé£ç¶ããããã¹ãïŒ --help = target.
å¥
次ã®åèªã®åŸã«å¥ã®åèªãšããŠè¡šç€ºãããåŒæ°ãåããªãã·ã§ã³ã衚瀺ããŸã
次ã®ãããªå ã®ãªãã·ã§ã³ïŒ -o åºåãã¡ã€ã«.
ãããã£ãŠãããšãã°ãã«ãã£ãŠãµããŒããããŠãããã¹ãŠã®ææžåãããŠããªãã¿ãŒã²ããåºæã®ã¹ã€ããã衚瀺ããã«ã¯
ã³ã³ãã€ã©ã䜿çšïŒ
--help = targetãundocumented
修食åã®æå³ã¯ãæ¥é èŸãšã㊠^ ãã£ã©ã¯ã¿ãŒãªã®ã§
ãã¹ãŠã®ãã€ããªèŠåãªãã·ã§ã³ïŒã€ãŸãããªã³ãŸãã¯ãªãã®ããããã§ãããã®ïŒã衚瀺ããäŸ
åŒæ°ãåããªãïŒèª¬æãããå Žåã¯ã次ã䜿çšããŸãã
--help = warningsã^ joinedã^ undocumented
ãžã®è°è« --help = é修食åã®ã¿ã§æ§æãããã¹ãã§ã¯ãããŸããã
è€æ°ã®ã¯ã©ã¹ãçµã¿åãããããšãå¯èœã§ãããããã¯éåžžãåºåãå¶éããããã§ãã
衚瀺ãããã®ãäœããªããšããããšã§ãã ãã ãããããæ©èœããXNUMXã€ã®ã±ãŒã¹ã¯ã
ã¯ã©ã¹ã®XNUMXã€ã¯ ã¿ãŒã²ããã ããšãã°ããã¹ãŠã®ã¿ãŒã²ããåºæã衚瀺ããã«ã¯
æé©åãªãã·ã§ã³ã䜿çšïŒ
--help = targetãoptimizers
ãã® --help = ãªãã·ã§ã³ã¯ã³ãã³ãã©ã€ã³ã§ç¹°ãè¿ãããšãã§ããŸãã é£ç¶ããŠäœ¿çšãããã³ã«è¡šç€ºãããŸã
ãã§ã«è¡šç€ºãããŠãããªãã·ã§ã³ãã¹ãããããŠãèŠæ±ããããªãã·ã§ã³ã®ã¯ã©ã¹ã
Status -Q ãªãã·ã§ã³ã¯ãã³ãã³ãã©ã€ã³ã®åã«è¡šç€ºãããŸã --help = ãªãã·ã§ã³ã次ã«
ã«ãã£ãŠè¡šç€ºããã説æããã¹ã --help = å€æŽãããŸãã 衚瀺ããããã®ã説æãã代ããã«
ãªãã·ã§ã³ã®å Žåããªãã·ã§ã³ãæå¹ãç¡å¹ããŸãã¯èšå®ãããŠãããã©ããã瀺ãããŸã
ç¹å®ã®å€ã«ïŒã³ã³ãã€ã©ããããç¥ã£ãŠãããšä»®å®ããŠã
--help = ãªãã·ã§ã³ã䜿çšãããŸãïŒã
ããã¯ãã®ARMããŒãããã®åãæšãŠãããäŸã§ãã gccã®:
ïŒ gcc -Q -mabi = 2 --help = target -c
次ã®ãªãã·ã§ã³ã¯ã¿ãŒã²ããåºæã§ãã
-mabi = 2
-mabort-on-noreturn [ç¡å¹]
-mapcs [ç¡å¹]
åºåã¯ã以åã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®åœ±é¿ã«ææã§ããããã
äŸã§ã¯ãã©ã®æé©åãæå¹ã«ãªã£ãŠãããã確èªã§ããŸãã -O2 ã䜿çšããŠ:
-Q -O2 --help = optimizers
ãŸãã¯ã次ã®æ¹æ³ã§æå¹ã«ãªã£ãŠãããã€ããªæé©åãèŠã€ããããšãã§ããŸãã -O3 ã䜿çšããŠ:
gcc -c -Q -O3 --help = optimizers> / tmp / O3-opts
gcc -c -Q -O2 --help = optimizers> / tmp / O2-opts
diff / tmp / O2-opts / tmp / O3-opts | grepãæå¹
-no-canonical-prefixes
ã·ã³ããªãã¯ãªã³ã¯ãå±éããããžã®åç §ã解決ããŸã /../ or /./ããŸãã¯ãã¹ãäœæããŸã
çžå¯Ÿãã¬ãã£ãã¯ã¹ãçæããå Žåã¯çµ¶å¯Ÿã
- ããŒãžã§ã³
åŒã³åºãããGCCã®ããŒãžã§ã³çªå·ãšèäœæš©ã衚瀺ããŸãã
-ã©ãããŒ
ã©ãããŒããã°ã©ã ã®äžã§ãã¹ãŠã®ãµãã³ãã³ããåŒã³åºããŸãã ã©ãããŒããã°ã©ã ã®ååãš
ãã®ãã©ã¡ãŒã¿ãŒã¯ãã³ã³ãåºåãã®ãªã¹ããšããŠæž¡ãããŸãã
gcc -c tc -wrapper gdbã-args
ããã«ãããã®ãã¹ãŠã®ãµãããã°ã©ã ãåŒã³åºãããŸãã gccã® äž GDB --argsããããã£ãŠãã®åŒã³åºã cc1 is
GDB --args cc1 ....
-fplugin =åããã
ãã©ã°ã€ã³ã³ãŒãããã¡ã€ã«ã«ããŒãããŸã å.soãã«ãã£ãŠdlopenãããå ±æãªããžã§ã¯ãã§ãããšæ³å®ãããŸã
ã³ã³ãã€ã©ã å ±æãªããžã§ã¯ããã¡ã€ã«ã®ããŒã¹åã¯ããã©ã°ã€ã³ãèå¥ããããã«äœ¿çšãããŸã
åŒæ°ã®æ§æ解æã®ç®çã§ïŒåç § -fplugin-arg-å-ããŒ=å€ äžïŒã å
ãã©ã°ã€ã³ã¯ããã©ã°ã€ã³APIã§æå®ãããã³ãŒã«ããã¯é¢æ°ãå®çŸ©ããå¿ èŠããããŸãã
-fplugin-arg-å-ããŒ=å€
ãšåŒã°ããåŒæ°ãå®çŸ©ããŸã ã㌠å€ã¯ å€ ãšåŒã°ãããã©ã°ã€ã³ã®å Žå å.
-fdump-ada-spec[-ã¹ãªã ]
Cããã³C ++ãœãŒã¹ããã³ã€ã³ã¯ã«ãŒããã¡ã€ã«ã®å Žåã察å¿ããAdaä»æ§ãçæããŸãã
-fada-spec-parent =åäœ
ãšäžç·ã« -fdump-ada-spec[-ã¹ãªã ]äžèšã§ãAdaä»æ§ãã®åãŠããããšããŠçæããŸã
芪 åäœ.
-fdump-go-spec =file
ä»»æã®èšèªã®å ¥åãã¡ã€ã«ã®å Žåã察å¿ããGo宣èšãã§çæããŸã fileã ãã®
Goã®ãconstãããtypeãããvarããããã³ãfuncã宣èšãçæããŸããããã¯äŸ¿å©ãªæ¹æ³ã§ãã
ä»ã®èšèªã§æžãããã³ãŒããžã®Goã€ã³ã¿ãŒãã§ãŒã¹ã®äœæãéå§ããŸãã
@file
ããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ãèªã¿åã fileã èªã¿åããããªãã·ã§ã³ã¯ãã®ä»£ããã«æ¿å ¥ãããŸã
ãªãªãžãã« @file ãªãã·ã§ã³ã å Žå file ååšããªãããèªã¿åãããšãã§ããªãå Žåããªãã·ã§ã³
æåéãã«æ±ãããåé€ãããŸããã
ãªãã·ã§ã³ã§ file 空çœã§åºåãããŸãã 空çœæåãå«ãŸããå ŽåããããŸã
ãªãã·ã§ã³å šäœãäžéåŒçšç¬ŠãŸãã¯äºéåŒçšç¬Šã§å²ãããšã«ããããªãã·ã§ã³å ã§ã ã©ãã§ã
æåïŒããã¯ã¹ã©ãã·ã¥ãå«ãïŒã¯ãæåã®åã«ä»ããããšã§å«ããããšãã§ããŸã
ããã¯ã¹ã©ãã·ã¥ãå«ãŸããŠããŸãã NS file ããèªäœã«è¿œå ã®@ãå«ãŸããå ŽåããããŸãfile ãªãã·ã§ã³; ã©ãã
ãã®ãããªãªãã·ã§ã³ã¯ååž°çã«åŠçãããŸãã
ã³ã³ãã€ã« C + + ããã°ã©ã
C ++ãœãŒã¹ãã¡ã€ã«ã¯éåžžããµãã£ãã¯ã¹ã®XNUMXã€ã䜿çšããŸã .C, .ccã«, .cpp, .CPP, .c ++, .cpãŸãã¯
.cxx; C ++ããããŒãã¡ã€ã«ã¯ãã䜿çšããŸã .H H, .hpp, .HããŸãã¯ïŒå ±æãã³ãã¬ãŒãã³ãŒãã®å ŽåïŒ .tccãããã³
ååŠçãããC ++ãã¡ã€ã«ã¯ãµãã£ãã¯ã¹ã䜿çšããŸã .iiã GCCã¯ããããã®ååã®ãã¡ã€ã«ãèªèãã
ã³ã³ãã€ã«ãšåãæ¹æ³ã§ã³ã³ãã€ã©ãåŒã³åºããŠããC ++ããã°ã©ã ãšããŠã³ã³ãã€ã«ããŸãã
Cããã°ã©ã ïŒéåžžã¯ååä»ãïŒ gccã®).
ãã ãã gccã® C ++ã©ã€ãã©ãªãè¿œå ããŸããã g ++ GCCãåŒã³åºãããã°ã©ã ã§ããã
C ++ã©ã€ãã©ãªã«å¯Ÿãããªã³ã¯ãèªåçã«æå®ããŸãã ããã¯æ±ããŸã .c, .h ãš .i ãã¡ã€ã«ãšããŠ
CãœãŒã¹ãã¡ã€ã«ã®ä»£ããã«C ++ãœãŒã¹ãã¡ã€ã« -x 䜿çšãããŠããã ãã®ããã°ã©ã ã䟿å©ã§ã
CããããŒãã¡ã€ã«ãããªã³ã³ãã€ã«ããå Žå .h C ++ã³ã³ãã€ã«ã§äœ¿çšããããã®æ¡åŒµæ©èœã ã®äž
å€ãã®ã·ã¹ãã ã g ++ ååãã€ã³ã¹ããŒã«ãããŠããŸã C ++.
C ++ããã°ã©ã ãã³ã³ãã€ã«ãããšãã¯ãåãã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®å€ããæå®ã§ããŸãã
ä»»æã®èšèªã§ããã°ã©ã ãã³ã³ãã€ã«ããããã«äœ¿çšããŸãã ãŸãã¯Cã«ãšã£ãŠæå³ã®ããã³ãã³ãã©ã€ã³ãªãã·ã§ã³
ããã³é¢é£ããèšèªã ãŸãã¯ãC ++ããã°ã©ã ã§ã®ã¿æå³ã®ãããªãã·ã§ã³ã
ãªãã·ã§ã³ å¶åŸ¡ C æ¹èš
次ã®ãªãã·ã§ã³ã¯ãCã®æ¹èšïŒãŸãã¯C ++ãªã©ã®Cãã掟çããèšèªïŒãå¶åŸ¡ããŸãã
ã³ã³ãã€ã©ãåãå ¥ããObjective-Cããã³Objective-C ++ïŒïŒ
-ã¢ã³ã·
Cã¢ãŒãã§ã¯ãããã¯åçã§ã -std = c90ã C ++ã¢ãŒãã§ã¯ã
-std = c ++ 98.
ããã«ãããISO C90ãšäºææ§ã®ãªãGCCã®ç¹å®ã®æ©èœããªãã«ãªããŸãïŒ
Cã³ãŒãã®ã³ã³ãã€ã«ïŒããŸãã¯ãasmãããasmããªã©ã®æšæºC ++ïŒC ++ã³ãŒãã®ã³ã³ãã€ã«æïŒ
ãtypeofãããŒã¯ãŒããããã³ãunixãããvaxããªã©ã®äºåå®çŸ©ããããã¯ãã¯ã
䜿çšããŠããã·ã¹ãã ã®ã¿ã€ãã ãŸããæãŸãããªãããã£ãã«äœ¿çšãããªãISOãæå¹ã«ããŸã
ããªã°ã©ãæ©èœã Cã³ã³ãã€ã©ã®å ŽåãC ++ã¹ã¿ã€ã«ã®èªèãç¡å¹ã«ããŸã //
ã³ã¡ã³ããšãã€ã³ã©ã€ã³ãããŒã¯ãŒãã
代æ¿ããŒã¯ãŒãã__asm __ããã__ extension __ããã__ inline __ããã__ typeof__ã
ã«ããããããåãç¶ãã -ã¢ã³ã·ã ISOCããã°ã©ã ã§ãããã䜿çšããããªãã§ãããã
ãã¡ããã§ãããã«å«ãŸããŠããå¯èœæ§ã®ããããããŒãã¡ã€ã«ã«ããããå ¥ãããšäŸ¿å©ã§ã
ã§è¡ãããã³ã³ãã€ã« -ã¢ã³ã·ã ã__unix__ãã
ã__vax__ããå©çšå¯èœã§ãæç¡ã«ãããããå©çšã§ããŸã -ã¢ã³ã·.
ãã® -ã¢ã³ã· ãªãã·ã§ã³ãæå®ããŠããISO以å€ã®ããã°ã©ã ãäžåœã«æåŠãããããšã¯ãããŸããã ã«ãšã£ãŠ
ãã®ã -Wpedantic ã«å ããŠå¿ èŠã§ã -ã¢ã³ã·.
ãã¯ãã__STRICT_ANSI__ãã¯ã -ã¢ã³ã· ãªãã·ã§ã³ã䜿çšãããŸãã ããã€ãã®ããããŒ
ãã¡ã€ã«ã¯ãã®ãã¯ãã«æ°ã¥ããç¹å®ã®é¢æ°ã®å®£èšãå®çŸ©ãæ§ããããšããããŸã
ISOèŠæ Œã§èŠæ±ãããŠããªãç¹å®ã®ãã¯ãã ããã¯å¹²æžãé¿ããããã§ã
ãããã®ååãä»ã®ç®çã§äœ¿çšããå¯èœæ§ã®ããããã°ã©ã ã§ã
éåžžã¯çµã¿èŸŒãŸããŠããããISOCã§å®çŸ©ãããã»ãã³ãã£ã¯ã¹ãæããªãé¢æ°ïŒ
ãallocaããšãffsãïŒã¯ã次ã®å Žåã«çµã¿èŸŒã¿é¢æ°ã§ã¯ãããŸããã -ã¢ã³ã· 䜿çšãããŠããã
-std =
èšèªæšæºã決å®ããŸãã ãã®ãªãã·ã§ã³ã¯çŸåšã次ã®å Žåã«ã®ã¿ãµããŒããããŸã
CãŸãã¯C ++ã®ã³ã³ãã€ã«ã
ã³ã³ãã€ã©ã¯ã次ã®ãããªããã€ãã®åºæ¬æšæºãåãå ¥ããããšãã§ããŸãã c90 or c ++ 98ãããã³GNUæ¹èš
ãããã®æšæºã® ããŒ90 or gnu ++ 98ã åºæ¬èŠæ Œãæå®ãããšã
ã³ã³ãã€ã©ã¯ããã®æšæºã«åŸããã¹ãŠã®ããã°ã©ã ã«å ããŠãGNUæ¡åŒµæ©èœã䜿çšããããã°ã©ã ãåãå ¥ããŸã
ããã¯ãããšççŸããŸããã äŸãã°ã -std = c90 GCCã®ç¹å®ã®æ©èœããªãã«ããŸã
ãasmãããtypeofãããŒã¯ãŒããªã©ãISO C90ãšäºææ§ããªããã
ISO C90ã§æå³ãæããªãä»ã®GNUæ¡åŒµæ©èœïŒçç¥ãªã©ïŒ
ãïŒïŒãåŒã®äžé ã äžæ¹ãæšæºã®GNUæ¹èšã®å Žå
ãæå®ãããŠããå Žåãã³ã³ãã€ã©ã§ãµããŒããããŠãããã¹ãŠã®æ©èœãæå¹ã«ãªã£ãŠããŸãã
æ©èœã¯ãåºæ¬æšæºã®æå³ãå€æŽããŸãã ãã®çµæãããã€ãã®å³æ Œãªæºæ
ããã°ã©ã ã¯æåŠãããå ŽåããããŸãã ç¹å®ã®èŠæ Œã¯ã«ãã£ãŠäœ¿çšãããŸã -Wpedantic ç¹å®ãã
ãã®ããŒãžã§ã³ã®æšæºãæå®ãããšãã©ã®æ©èœãGNUæ¡åŒµæ©èœã«ãªããŸããã äŸãã°
-std = gnu90 -Wpedantic C ++ã¹ã¿ã€ã«ã«ã€ããŠèŠåããŸã // ã³ã¡ã³ãã -std = gnu99 -Wpedantic
ã§ã¯ãªãã
ãã®ãªãã·ã§ã³ã®å€ãæå®ããå¿ èŠããããŸãã å¯èœãªå€ã¯
c90
c89
iso9899ïŒ1990
ãã¹ãŠã®ISOC90ããã°ã©ã ããµããŒãããŸãïŒISO C90ãšç«¶åããç¹å®ã®GNUæ¡åŒµæ©èœïŒ
ç¡å¹ã«ãªã£ãŠããŸãïŒã ãšåã -ã¢ã³ã· Cã³ãŒãçšã
iso9899ïŒ199409
ä¿®æ£90ã§ä¿®æ£ãããISOC1ã
c99
c9x
iso9899ïŒ1999
iso9899ïŒ199x
ISOC99ã ãã®æšæºã¯å®è³ªçã«å®å šã«ãµããŒããããŠãããã¢ãžã¥ããã°ã
æ¡åŒµèå¥åïŒã³ãŒããŒã±ãŒã¹ãé€ããŠãµããŒããããå Žå
-æ¡åŒµèå¥å ã䜿çšãããŸãïŒããã³æµ®åå°æ°ç¹ã®åé¡ïŒäž»ã«ããã ãå®å šã§ã¯ãããŸããïŒ
ä»é²Fããã³Gã®ãªãã·ã§ã³ã®C99æ©èœã«é¢é£ããŸãïŒã èŠã
<http://gcc.gnu.org/c99status.html>詳现ã«ã€ããŠã¯ã å c9x ãš
iso9899ïŒ199x éæšå¥šã§ãã
c11
c1x
iso9899ïŒ2011
ISO C11ãISOCèŠæ Œã®2011幎æ¹èšã ãã®åºæºã¯å®è³ªçã«
å®å šã«ãµããŒããããŠãããã¢ãžã¥ããã°ãæ¡åŒµèå¥åïŒãã ãã
ã³ãŒããŒã±ãŒã¹ -æ¡åŒµèå¥å 䜿çšãããïŒãæµ®åå°æ°ç¹ã®åé¡ïŒäž»ã«
ãã ããä»é²Fããã³Gã®ãªãã·ã§ã³ã®C11æ©èœã«å®å šã«é¢é£ããŠããããã§ã¯ãããŸããã
ãªãã·ã§ã³ã®AnnexKïŒå¢çãã§ãã¯ã€ã³ã¿ãŒãã§ã€ã¹ïŒããã³LïŒåæå¯èœæ§ïŒã åå
c1x ã¯éæšå¥šã§ãã
ããŒ90
ããŒ89
ISO C90ã®GNUæ¹èšïŒäžéšã®C99æ©èœãå«ãïŒã ããã¯Cã®ããã©ã«ãã§ã
ã³ãŒââãã
ããŒ99
gnu9x
ISOC99ã®GNUæ¹èšã åå gnu9x ã¯éæšå¥šã§ãã
ããŒ11
gnu1x
ISOC11ã®GNUæ¹èšã ããã¯ãå°æ¥çã«ããã©ã«ãã«ãªãããšãç®çãšããŠããŸã
GCCã®ãªãªãŒã¹ã åå gnu1x ã¯éæšå¥šã§ãã
c ++ 98
c ++ 03
1998幎ã®ISOC ++æšæºã«å ããŠã2003幎ã®æè¡æ£èª€è¡šãšããã€ãã®è¿œå
æ¬ é¥ã¬ããŒãã ãšåã -ã¢ã³ã· C ++ã³ãŒãã®å Žåã
gnu ++ 98
gnu ++ 03
GNUæ¹èš -std = c ++ 98ã ããã¯C ++ã³ãŒãã®ããã©ã«ãã§ãã
c ++ 11
c ++ 0x
2011 ISO C ++æšæºãšä¿®æ£ã åå c ++ 0x ã¯éæšå¥šã§ãã
gnu ++ 11
gnu ++ 0x
GNUæ¹èš -std = c ++ 11ã åå gnu ++ 0x ã¯éæšå¥šã§ãã
c ++ 1y
2014幎ã«æ«å®çã«èšç»ãããŠããISOC ++æšæºã®æ¬¡ã®ãªããžã§ã³ããµããŒã
éåžžã«å®éšçã§ãããã»ãŒç¢ºå®ã«äºææ§ã®ãªãæ¹æ³ã§å€æŽãããŸã
å°æ¥ã®ãªãªãŒã¹ã
gnu ++ 1y
GNUæ¹èš -std = c ++ 1yã ãµããŒãã¯éââåžžã«å®éšçã§ãããã»ãšãã©
確ãã«ãå°æ¥ã®ãªãªãŒã¹ã§ã¯äºææ§ã®ãªãæ¹æ³ã§å€æŽãããŸãã
-fgnu89-ã€ã³ã©ã€ã³
ãªãã·ã§ã³ -fgnu89-ã€ã³ã©ã€ã³ ãã€ã³ã©ã€ã³ãã«åŸæ¥ã®GNUã»ãã³ãã£ã¯ã¹ã䜿çšããããã«GCCã«æ瀺ããŸã
C99ã¢ãŒãã§æ©èœããŸãã
ãã®ãªãã·ã§ã³ã¯ãGCCããŒãžã§ã³4.1.3ãŸã§ã§åãå ¥ããããç¡èŠãããŸãã
4.3ã GCCããŒãžã§ã³4.3以éã§ã¯ãC99ã¢ãŒãã§ã®GCCã®åäœãå€æŽãããŸãã 䜿çšãã
ãã®ãªãã·ã§ã³ã¯ããgnu_inlineãé¢æ°å±æ§ããã¹ãŠã«è¿œå ããããšãšã»ãŒåãã§ãã
ã€ã³ã©ã€ã³é¢æ°ã
ãªãã·ã§ã³ -fno-gnu89-ã€ã³ã©ã€ã³ GCCã«C99ã»ãã³ãã£ã¯ã¹ã䜿çšããããã«æ瀺çã«æ瀺ããŸã
C99ãŸãã¯gnu99ã¢ãŒãã®å Žåã¯ãã€ã³ã©ã€ã³ãïŒã€ãŸããããã©ã«ãã®åäœãæå®ããŸãïŒã ãã®
ãªãã·ã§ã³ã¯GCC4.3ã§æåã«ãµããŒããããŸããã ãã®ãªãã·ã§ã³ã¯ã§ãµããŒããããŠããŸãã -std = c90 or
-std = gnu90 ã¢ãŒãã
ããªããã»ããµãã¯ãã__GNUC_GNU_INLINE__ãããã³ã__GNUC_STDC_INLINE__ãã䜿çšã§ããŸã
ãã€ã³ã©ã€ã³ãé¢æ°ã«å¯ŸããŠã©ã®ã»ãã³ãã£ã¯ã¹ãæå¹ã§ãããã確èªããŸãã
-è£å©æ å ± ãã¡ã€ã«å
宣èšããããããã³/ãŸãã¯å®£èšããããã¹ãŠã®é¢æ°ã®ãããã¿ã€ã宣èšãæå®ããããã¡ã€ã«åã«åºåããŸã
ããããŒãã¡ã€ã«ãå«ãã翻蚳åäœã§å®çŸ©ãããŸãã ãã®ãªãã·ã§ã³ã¯
C以å€ã®èšèªã§ã¯é»ã£ãŠç¡èŠãããŸãã
宣èšã«å ããŠããã¡ã€ã«ã¯ã³ã¡ã³ãã§ãå宣èšã®èµ·æºã瀺ããŸã
ïŒãœãŒã¹ãã¡ã€ã«ãšè¡ïŒã宣èšãæé»çããããã¿ã€ãããŸãã¯
ãããã¿ã€ããªãïŒI, N æ°èŠãŸã㯠O ãããããåŸã®æåã®æåã®å€ã
è¡çªå·ãšã³ãã³ïŒãããã³ããã宣èšããã®ãã®ãå®çŸ©ããã®ãã®ã
(C or Fãããããã次ã®æåã§ïŒã æ©èœã®å Žå
å®çŸ©ãKïŒRã¹ã¿ã€ã«ã®åŒæ°ã®ãªã¹ããšããã«ç¶ã宣èšã
ã³ã¡ã³ãå ã§ã宣èšåŸã«æäŸãããŸãã
-äŒè-ãã©ã¡ãŒã¿ãªã-å¯å€ååŒæ°é¢æ°
ååä»ããã©ã¡ãŒã¿ãŒãªãã§å¯å€ååŒæ°é¢æ°ãåãå ¥ããŸãã
ãã®ãããªé¢æ°ãå®çŸ©ããããšã¯å¯èœã§ãããããã¯ãã®ãŸãŸã§ã¯ããŸã圹ã«ç«ã¡ãŸããã
åŒæ°ãèªã¿åãããšã¯ã§ããŸããã ãã®æ§æã¯Cã§ã®ã¿ãµããŒããããŠãããããããã¯Cã§ã®ã¿ãµããŒããããŸãã
C ++ã§èš±å¯ãããŠããŸãã
-fno-asm
ãasmãããinlineãããŸãã¯ãtypeofããããŒã¯ãŒããšããŠèªèããªãã§ãã ãããã³ãŒãã§ãããã䜿çšã§ããããã«ãªããŸãã
èå¥åãšããŠã®åèªã ããŒã¯ãŒãã__asm __ããã__ inline__ããããã³
代ããã«ã__typeof__ãã -ã¢ã³ã· å«æãã -fno-asm.
C ++ã§ã¯ããasmããšãinlineãã¯ãtypeofãããŒã¯ãŒãã«ã®ã¿åœ±é¿ããããããã®ã¹ã€ããã¯ãtypeofãããŒã¯ãŒãã«ã®ã¿åœ±é¿ããŸãã
æšæºããŒã¯ãŒãã ããªãã¯äœ¿çšããããããããŸãã -fno-gnu-ããŒã¯ãŒã 代ããã«ãã©ã°ããããŸã
åãå¹æã C99ã¢ãŒãã®å ŽåïŒ-std = c99 or -std = gnu99ïŒããã®ã¹ã€ããã¯ã«ã®ã¿åœ±é¿ããŸã
ãinlineãã¯ISOC99ã®æšæºããŒã¯ãŒãã§ããããããasmãããã³ãtypeofãããŒã¯ãŒãã
-fno-builtin
-fno-builtin-function
ã§å§ãŸããªãçµã¿èŸŒã¿é¢æ°ãèªèããªã __ãã«ãã€ã³_ ãã¬ãã£ãã¯ã¹ãšããŠã
GCCã¯éåžžãç¹å®ã®çµã¿èŸŒã¿é¢æ°ãããã«åŠçããããã®ç¹å¥ãªã³ãŒããçæããŸã
å¹çç; ããšãã°ããallocaããžã®åŒã³åºãã¯ãåäžã®åœä»€ã«ãªãå ŽåããããŸãã
ã¹ã¿ãã¯ãçŽæ¥èª¿æŽãããšããmemcpyãã®åŒã³åºããã€ã³ã©ã€ã³ã³ããŒã«ãŒãã«ãªãå¯èœæ§ããããŸãã The
çµæãšããŠåŸãããã³ãŒãã¯ãå€ãã®å Žåãå°ãããŠé«éã§ãããé¢æ°ã
ãã®ããã«è¡šç€ºãããªããªããšããããã®åŒã³åºãã«ãã¬ãŒã¯ãã€ã³ããèšå®ããããå€æŽãããããããšã¯ã§ããŸããã
å¥ã®ã©ã€ãã©ãªãšãªã³ã¯ããããšã«ããé¢æ°ã®åäœã ãŸãã
é¢æ°ã¯çµã¿èŸŒã¿é¢æ°ãšããŠèªèãããGCCã¯ããã«é¢ããæ å ±ã䜿çšããå ŽåããããŸã
ãã®é¢æ°ã®åŒã³åºãã«é¢ããåé¡ã«ã€ããŠèŠåããããŸãã¯ããå€ããçæããé¢æ°
çµæã®ã³ãŒãã«ãã®é¢æ°ãžã®åŒã³åºããå«ãŸããŠããå Žåã§ããå¹ççãªã³ãŒãã ã«ãšã£ãŠ
ããšãã°ãèŠåã¯æ¬¡ã®ããã«äžããããŸã -Wãã©ãŒããã ãprintfãã
çµã¿èŸŒã¿ã§ãstrlenãã¯ã°ããŒãã«ã¡ã¢ãªãå€æŽããªãããšãç¥ãããŠããŸãã
-fno-builtin-function çµã¿èŸŒã¿é¢æ°ã®ã¿ã®ãªãã·ã§ã³ function ç¡å¹ã«ãªã£ãŠããŸãã
function ã§å§ããŠã¯ãããŸãã __ãã«ãã€ã³_ã çµã¿èŸŒã¿ã§ã¯ãªãé¢æ°ã«ååãä»ããããŠããå Žå
ãã®ããŒãžã§ã³ã®GCCã§ã¯ããã®ãªãã·ã§ã³ã¯ç¡èŠãããŸãã 察å¿ãããã®ã¯ãããŸãã
-fbuiltin-function ãªãã·ã§ã³; çµã¿èŸŒã¿æ©èœãéžæçã«æå¹ã«ãããå Žå
-fno-builtin or -èªç«ã次ã®ãããªãã¯ããå®çŸ©ã§ããŸãã
#define absïŒnïŒ__ builtin_absïŒïŒnïŒïŒ
#define strcpyïŒdãsïŒ__ builtin_strcpyïŒïŒdïŒãïŒsïŒïŒ
-ãã³ãã
ã³ã³ãã€ã«ããã¹ããããç°å¢ã察象ãšããŠããããšãè¡šæããŸãã ããã¯ã -fbuiltinã A
ãã¹ããããç°å¢ã¯ãæšæºã©ã€ãã©ãªå šäœãå©çšå¯èœãªç°å¢ã§ãã
ã©ã®ãmainãã®æ»ãã¿ã€ãã¯ãintãã§ãã äŸã¯ã
ã«ãŒãã«ã ããã¯åçã§ã -fno-èªç«å.
-èªç«
ã³ã³ãã€ã«ãèªç«åç°å¢ã察象ãšããŠããããšãè¡šæããŸããããã¯ã
-fno-builtinã èªç«åç°å¢ãšã¯ãæšæºã©ã€ãã©ãªã§ã¯äžå¯èœãªç°å¢ã§ãã
ååšããããã°ã©ã ã®èµ·åã¯å¿ ããããã¡ã€ã³ãã§ãããšã¯éããŸããã æãæçœãªäŸ
OSã«ãŒãã«ã§ãã ããã¯åçã§ã -fno-hosted.
-fopenmp
C / C ++ã§ã¯OpenMPãã£ã¬ã¯ãã£ã "#pragma omp"ãFortranã§ã¯ "ïŒ$ omp"ã®åŠçãæå¹ã«ããŸãã
æ¥æ -fopenmp ãæå®ãããŠããå Žåãã³ã³ãã€ã©ã¯æ¬¡ã®ããã«äžŠåã³ãŒããçæããŸãã
OpenMPã¢ããªã±ãŒã·ã§ã³ããã°ã©ã ã€ã³ã¿ãŒãã§ã€ã¹v4.0http://www.openmp.org/>ã ãã®ãªãã·ã§ã³
å«æãã -pthreadããããã£ãŠãããµããŒãããŠããã¿ãŒã²ããã§ã®ã¿ãµããŒããããŸã
-pthread. -fopenmp å«æãã -fopenmp-simd.
-fopenmp-simd
C / C ++ã§ã¯ã#pragmaompããC / C ++ã§ã¯ãïŒ$ ompãã䜿çšããŠãOpenMPã®SIMDãã£ã¬ã¯ãã£ãã®åŠçãæå¹ã«ããŸãã
Fortranã ä»ã®OpenMPãã£ã¬ã¯ãã£ãã¯ç¡èŠãããŸãã
-fcilkplus
C / C ++çšã®CilkPlusèšèªæ¡åŒµæ©èœã®äœ¿çšãæå¹ã«ããŸãã ãªãã·ã§ã³ã®å Žå
-fcilkplus ãæå®ãããŠããå ŽåãCilkPlusèšèªæ¡åŒµæ©èœã®äœ¿çšãæå¹ã«ããŸã
C / C ++ã®å Žåã çŸåšã®å®è£ ã¯ãABIããŒãžã§ã³1.2ã«æºæ ããŠããŸãã ããã¯
éšåçã«ããå®æããŠããããã€ã³ã¿ãŒãã§ãŒã¹ãå€æŽãããå¯èœæ§ã®ããå®éšçãªæ©èœ
å ¬åŒä»æ§ã®å€æŽã«äŒŽããGCCã®å°æ¥ã®ããŒãžã§ã³ã§ã çŸåšããã¹ãŠ
æ©èœãå®è£ ãããŠããŸãããã_ Cilk_forããå®è£ ãããŠããŸãã
-fgnu-tm
ãªãã·ã§ã³ã®å Žå -fgnu-tm ãæå®ãããŠããå Žåãã³ã³ãã€ã©ã¯Linuxçšã®ã³ãŒããçæããŸã
ã€ã³ãã«ã®çŸåšã®ãã©ã³ã¶ã¯ã·ã§ã³ã¡ã¢ãªABIä»æ§æžã®å€çš®ïŒæ¹èš
1.1ã6幎2009æXNUMXæ¥ïŒã ããã¯å®éšçãªæ©èœã§ããããã®ã€ã³ã¿ãŒãã§ã€ã¹ã¯æ¬¡ã®ããã«å€æŽãããå¯èœæ§ããããŸã
å ¬åŒä»æ§ã®å€æŽã«äŒŽãGCCã®å°æ¥ã®ããŒãžã§ã³ã 泚æããŠãã ãã
ãã®æ©èœã§ã¯ããã¹ãŠã®ã¢ãŒããã¯ãã£ããµããŒããããŠããŸãã
ãã©ã³ã¶ã¯ã·ã§ã³ã¡ã¢ãªã«å¯ŸããGCCã®ãµããŒãã®è©³çŽ°ã«ã€ããŠã¯ã
ãã©ã³ã¶ã¯ã·ã§ã³ã¡ã¢ãªæ©èœã¯ãåŒã³åºã以å€ã®äŸå€ã§ã¯ãµããŒããããŠããªãããšã«æ³šæããŠãã ãã
(-fnon-call-äŸå€).
-fms-æ¡åŒµæ©èœ
MicrosoftããããŒãã¡ã€ã«ã§äœ¿çšãããããã€ãã®éæšæºæ§é ãåãå ¥ããŸãã
C ++ã³ãŒãã§ã¯ãããã«ãããæ§é äœã®ã¡ã³ããŒåã以åã®ã¿ã€ããšåæ§ã«ããããšãã§ããŸã
宣èšã
typedef int UOW;
æ§é äœABC {
ãããŒããããŒã
};
æ§é äœãšå ±çšäœã®ååã®ãªããã£ãŒã«ãã®äžéšã®ã±ãŒã¹ã¯ãããã§ã®ã¿åãå ¥ããããŸã
ãªãã·ã§ã³ãéžæããŸãã
ãã®ãªãã·ã§ã³ã¯ãms-abiã䜿çšããiïŒ86ããã³x86_64ã¿ãŒã²ãããé€ããã¹ãŠã®ã¿ãŒã²ããã§ãªãã«ãªã£ãŠããããšã«æ³šæããŠãã ããã
-fplan9-æ¡åŒµæ©èœ
Plan9ã³ãŒãã§äœ¿çšãããŠããããã€ãã®éæšæºæ§é ãåãå ¥ããŸãã
ããã«ããã -fms-æ¡åŒµæ©èœãå¿åã®æ§é äœãžã®ãã€ã³ã¿ã®åãæž¡ããèš±å¯ããŸã
ãã£ãŒã«ãã®ã¿ã€ãã®èŠçŽ ãžã®ãã€ã³ã¿ãæåŸ ããé¢æ°ãžã®ãã£ãŒã«ããããã³
typedefã䜿çšããŠå®£èšãããå¿åãã£ãŒã«ãã®åç §ãèš±å¯ããŸãã ããã ãã§ã
C ++ã§ã¯ãªããCã§ãµããŒããããŠããŸãã
-äžéé³å
ISOCãã©ã€ã°ã©ãããµããŒãããŸãã The -ã¢ã³ã· ãªãã·ã§ã³ïŒããã³ -æšæº å³å¯ãªISOCã®ãªãã·ã§ã³
é©åæ§ïŒã¯æå³ããŸã -äžéé³å.
-äŒçµ±çãª
-åŸæ¥ã®-cpp
以åã¯ããããã®ãªãã·ã§ã³ã«ãããGCCã¯å è¡æšæºã®Cã³ã³ãã€ã©ããšãã¥ã¬ãŒãããããšããŸããã
ãããã¯çŸåšã -E ã¹ã€ããã ããªããã»ããµã¯åŒãç¶ããµããŒãããŸã
ãã¬ã¹ã¿ã³ããŒãã¢ãŒãã 詳现ã«ã€ããŠã¯ãGNUCPPã®ããã¥ã¢ã«ãåç §ããŠãã ããã
-fcond-äžäžèŽ
XNUMXçªç®ãšXNUMXçªç®ã®åŒæ°ã§åãäžèŽããªãæ¡ä»¶åŒãèš±å¯ããŸãã
ãã®ãããªåŒã®å€ã¯ç¡å¹ã§ãã ãã®ãªãã·ã§ã³ã¯C ++ã§ã¯ãµããŒããããŠããŸããã
-äºéº»-ãã¯ãã«-å€æ
èŠçŽ æ°ãç°ãªããã¯ãã«éã§ã®æé»çãªå€æãèš±å¯ãããããã³/ãŸãã¯
äºææ§ã®ãªãèŠçŽ ã¿ã€ãã ãã®ãªãã·ã§ã³ã¯ãæ°ããã³ãŒãã«ã¯äœ¿çšããªãã§ãã ããã
-funsigned-char
ãunsignedcharãã®ããã«ãã¿ã€ããcharããunsignedãšããŸãã
ãã·ã³ã®çš®é¡ããšã«ããcharãã®ããã©ã«ãããããŸãã ã©ã¡ãã
ããã©ã«ãã§ã¯ãunsignedcharããããã©ã«ãã§ã¯ãsignedcharãã®ããã«ãªããŸãã
çæ³çã«ã¯ãããŒã¿ãã«ããã°ã©ã ã§ã¯ãåžžã«ãsignedcharããŸãã¯ãunsignedcharãã䜿çšããå¿ èŠããããŸãã
ãªããžã§ã¯ãã®ç¬Šå·ã«äŸåããŸãã ããããå€ãã®ããã°ã©ã ã䜿çšããããã«æžãããŠããŸã
ãã¬ãŒã³ãªãcharãã§ããã眲åãããŠãããã眲åãããŠããªããã«ãã£ãŠã
圌ããæžããããã·ã³ã ãã®ãªãã·ã§ã³ãšãã®éã¯ããã®ãããªãã®ãäœãããšãã§ããŸã
ããã°ã©ã ã¯å察ã®ããã©ã«ãã§åäœããŸãã
ã¿ã€ããcharãã¯ãåžžã«ãsignedcharããŸãã¯ãunsignedãã®ãããããšã¯ç°ãªãã¿ã€ãã§ãã
charãããã®åäœã¯åžžã«ãããXNUMXã€ã®ãã¡ã®XNUMXã€ãšåãã§ããã
-fsigned-char
ãsignedcharãã®ããã«ãã¿ã€ããcharãã«çœ²åããŸãã
ããã¯ãšåçã§ããããšã«æ³šæããŠãã ãã -fno-unsigned-charãã®è² ã®åœ¢åŒã§ã
-funsigned-charã åæ§ã«ããªãã·ã§ã³ -fno-signed-char ã«çžåœããŸã
-funsigned-char.
-fsigned-ããããã£ãŒã«ã
-funsigned-ããããã£ãŒã«ã
-fno-signed-ããããã£ãŒã«ã
-fno-unsigned-ããããã£ãŒã«ã
ãããã®ãªãã·ã§ã³ã¯ã宣èšæã«ããããã£ãŒã«ãã笊å·ä»ãã笊å·ãªãããå¶åŸ¡ããŸã
ãsignedããŸãã¯ãunsignedãã®ãããã䜿çšããŸããã ããã©ã«ãã§ã¯ããã®ãããªããããã£ãŒã«ãã¯çœ²åãããŠããŸãã
ããã¯äžè²«ããŠããããã§ãããintããªã©ã®åºæ¬çãªæŽæ°åã¯ç¬Šå·ä»ãåã§ãã
ãªãã·ã§ã³ å¶åŸ¡ C + + æ¹èš
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãC ++ããã°ã©ã ã§ã®ã¿æå³ã®ããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã«ã€ããŠèª¬æããŸãã
ããã°ã©ã ã®èšèªã«é¢ä¿ãªããã»ãšãã©ã®GNUã³ã³ãã€ã©ãªãã·ã§ã³ã䜿çšããããšãã§ããŸãã
ããšãã°ã次ã®ããã«ãã¡ã€ã«ãfirstClass.Cããã³ã³ãã€ã«ã§ããŸãã
g ++ -g -frepo -O -c firstClass.C
ãã®äŸã§ã¯ã -ãã¬ã C ++ããã°ã©ã å°çšã®ãªãã·ã§ã³ã§ãã ããªãã¯äœ¿çšããããšãã§ããŸã
GCCã§ãµããŒããããŠããä»»æã®èšèªã®ãã®ä»ã®ãªãã·ã§ã³ã
ããããªãã·ã§ã³ã®ãªã¹ãã§ã ã® C ++ããã°ã©ã ãã³ã³ãã€ã«ããå ŽåïŒ
-fabi-version =n
ããŒãžã§ã³ãäœ¿çš n C ++ ABIã®ã ããã©ã«ãã¯ããŒãžã§ã³2ã§ãã
ããŒãžã§ã³0ã¯ãC ++ ABIä»æ§ã«æãå³å¯ã«æºæ ããŠããããŒãžã§ã³ãæããŸãã
ãããã£ãŠãããŒãžã§ã³0ã䜿çšããŠååŸããABIã¯ãG ++ã®ããŒãžã§ã³ã«ãã£ãŠç°ãªããŸãã
ABIã®ãã°ãä¿®æ£ãããããã
ããŒãžã§ã³1ã¯ãG ++ 3.2ã§æåã«ç»å ŽããC ++ ABIã®ããŒãžã§ã³ã§ãã
ããŒãžã§ã³2ã¯ãG ++ 3.4ã§æåã«ç»å ŽããC ++ ABIã®ããŒãžã§ã³ã§ãã
ããŒãžã§ã³3ã¯ããã³ãã¬ãŒãåŒæ°ãšããŠå®æ°ã¢ãã¬ã¹ãæäœããéã®ãšã©ãŒãä¿®æ£ããŸãã
G ++ 4ã§æåã«ç»å ŽããããŒãžã§ã³4.5ã¯ããã¯ã¿ãŒã®æšæºçãªãã³ã°ãªã³ã°ãå®è£ ããŠããŸãã
ã¿ã€ãã
G ++ 5ã§æåã«ç»å ŽããããŒãžã§ã³4.6ã¯ãå±æ§ã®ãã³ã°ãªã³ã°ãä¿®æ£ããŸã
é¢æ°ãã€ã³ã¿åã®const / volatileããã¬ãŒã³declã®decltypeãããã³
å¥ã®ãã©ã¡ãŒã¿ãŒã®å®£èšã«ãããé¢æ°ãã©ã¡ãŒã¿ãŒã
G ++ 6ã§æåã«ç»å ŽããããŒãžã§ã³4.7ã¯ãC ++ 11ã®ããã¢ãŒã·ã§ã³åäœãä¿®æ£ããŸãã
ã¹ã³ãŒãä»ãåæåãšãã³ãã¬ãŒãåŒæ°ããã¯ã®ãã³ã°ãªã³ã°ãconst / static_castããã¬ãã£ãã¯ã¹++
ããã³-ãããã³ãã³ãã¬ãŒãåŒæ°ãšããŠäœ¿çšãããã¯ã©ã¹ã¹ã³ãŒãé¢æ°ã
åç § -ãã³.
-fno-ã¢ã¯ã»ã¹å¶åŸ¡
ãã¹ãŠã®ã¢ã¯ã»ã¹ãã§ãã¯ããªãã«ããŸãã ãã®ã¹ã€ããã¯ãäž»ã«æ¬¡ã®ãã°ãåé¿ããã®ã«åœ¹ç«ã¡ãŸãã
ã¢ã¯ã»ã¹å¶åŸ¡ã³ãŒãã
-fcheck-æ°ãã
ãoperatornewãã«ãã£ãŠè¿ããããã€ã³ã¿ãnullã§ãªãããšã確èªããŠããã
å²ãåœãŠãããã¹ãã¬ãŒãžãå€æŽããŸãã C ++ã§ããããããã®ãã§ãã¯ã¯éåžžäžèŠã§ãã
æšæºã§ã¯ããoperator newãã¯ã宣èšãããŠããå Žåã«ã®ã¿0ãè¿ãããã«æå®ãããŠããŸã æããïŒïŒã§
ãã®å Žåãã³ã³ãã€ã©ã¯ãã®ãªãã·ã§ã³ããªããŠãåžžã«æ»ãå€ããã§ãã¯ããŸãã ã®
ä»ã®ãã¹ãŠã®å Žåããoperator newãã«ç©ºã§ãªãäŸå€ä»æ§ãããå Žåãã¡ã¢ãª
æ¯æžã¯ããstd :: bad_allocããã¹ããŒããããšã«ãã£ãŠéç¥ãããŸãã ãåç §ããŠãã ãã æ°è£œå ïŒæããªãïŒ.
-fconstexpr-depth =n
C ++ 11constexpré¢æ°ã®ãã¹ããããè©äŸ¡ã®æ倧深床ãã«èšå®ããŸã nã éç
å®æ°åŒã®è©äŸ¡äžã«ç¡éã®ååž°ãæ€åºããããã«å¿ èŠã§ãã The
æšæºã§æå®ãããŠããæå°å€ã¯512ã§ãã
-fdeduce-init-list
äžæ¬åŒ§ãããstd :: initializer_listããšããŠãã³ãã¬ãŒãã¿ã€ããã©ã¡ãŒã¿ã®æšå®ãæå¹ã«ãã-
åå°ã®åæååãªã¹ããããªãã¡
ã¬ã³ãã¬ãŒãèªå転éïŒT tïŒ-> decltypeïŒrealfnïŒtïŒïŒ
{
realfnïŒtïŒ;ãè¿ããŸãã
}
void fïŒïŒ
{
forwardïŒ{1,2}ïŒ; //転éé»è©± >>
}
ãã®æ§é€ã¯ãåœåææ¡ããããã®ã®å¯èœãªæ¡åŒµãšããŠå®è£ ãããŸãã
C ++ 11æšæºã®ã»ãã³ãã£ã¯ã¹ã§ãããæçµçãªæšæºã®äžéšã§ã¯ãªãã£ãããã
ããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ãŠããŸãã ãã®ãªãã·ã§ã³ã¯å»æ¢ãããå°æ¥åé€ãããå¯èœæ§ããããŸã
G ++ã®ããŒãžã§ã³ã
-ffriend-æ³šå ¥
ãã¬ã³ãé¢æ°ãå²ãã§ããåå空éã«æ¿å ¥ããŠãå€éšããèŠããããã«ããŸã
ãããã宣èšãããŠããã¯ã©ã¹ã®ã¹ã³ãŒãã ãã¬ã³ãæ©èœãææžåãããŸãã
å€ã泚éä»ãC++ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ãããã³ä»¥åã®ããŒãžã§ã³ã®G++ã§ãã®ããã«æ©èœãã
4.1ã¯åžžã«ãã®ããã«æ©èœããŸããã ãã ããISO C ++ã§ã¯ãããã§ã¯ãªããã¬ã³ãé¢æ°
å²ãã§ããã¹ã³ãŒãã§å®£èšãããŠãããã®ã¯ãåŒæ°ã«äŸåããã«ãã¯ã¢ããã䜿çšããŠã®ã¿èŠã€ããããšãã§ããŸãã
ãã®ãªãã·ã§ã³ã䜿çšãããšã以åã®ãªãªãŒã¹ãšåãããã«åéãæ³šå ¥ãããŸãã
ãã®ãªãã·ã§ã³ã¯äºææ§ã®ããã®ãã®ã§ãããG ++ã®å°æ¥ã®ãªãªãŒã¹ã§åé€ãããå¯èœæ§ããããŸãã
-fno-elide-ã³ã³ã¹ãã©ã¯ã¿ãŒ
C ++æšæºã§ã¯ãå®è£ ã§äžæçãªãã®ã®äœæãçç¥ã§ããŸãã
åãã¿ã€ãã®å¥ã®ãªããžã§ã¯ããåæåããããã«äœ¿çšãããŸãã ãã®ãªãã·ã§ã³ãæå®ãããšãç¡å¹ã«ãªããŸã
ãã®æé©åã«ãããG ++ã¯ãã¹ãŠã®å Žåã«ã³ããŒã³ã³ã¹ãã©ã¯ã¿ãŒãåŒã³åºãããã«åŒ·å¶ãããŸãã
-fno-enforce-eh-specs
å®è¡æã«äŸå€ä»æ§ã®éåããã§ãã¯ããã³ãŒããçæããªãã§ãã ããã
ãã®ãªãã·ã§ã³ã¯C ++æšæºã«éåããŠããŸãããã³ãŒããµã€ãºãæžããã®ã«åœ¹ç«ã€å ŽåããããŸã
å®çŸ©ããã®ãšãã䌌ããããã¯ã·ã§ã³ãã«ã NDEBUGã ããã¯ãŠãŒã¶ãŒã³ãŒãã®èš±å¯ãäžããŸãã
äŸå€ä»æ§ã«éåããŠäŸå€ãã¹ããŒããã ã³ã³ãã€ã©ã¯ãŸã
ä»æ§ã«åºã¥ããŠæé©åããããããäºæããªãäŸå€ãã¹ããŒãããšã
å®è¡æã®æªå®çŸ©ã®åäœã
-fextern-tls-init
-fno-extern-tls-init
C++11ããã³OpenMPæšæºã§ã¯ ã¹ã¬ããããŒã«ã« ãš ã¹ã¬ãããã©ã€ããŒã æã€ã¹ãå€æ°
åçïŒå®è¡æïŒåæåã ããããµããŒãããããã«ããã®ãããªå€æ°ã®äœ¿çšã¯
å¿ èŠãªåæåãå®è¡ããã©ãããŒé¢æ°ãä»ããŠã 䜿çšããå Žå
å€æ°ã®å®çŸ©ãåãå€æåäœã«ããå Žåããã®ãªãŒããŒãããã¯æ¬¡ã®ããã«ãªããŸãã
æé©åãããŠããŸãããå¥ã®ç¿»èš³åäœã§äœ¿çšããå Žåã¯
å€æ°ãå®éã«åçã§ããå¿ èŠããªãå Žåã§ããããªãã®ãªãŒããŒããã
åæåã ããã°ã©ããŒããå€æ°ã䜿çšããªãããšã確èªã§ããå Žå
TUãå®çŸ©ãããšãåçåæåãããªã¬ãŒããå¿ èŠããããŸãïŒå€æ°ã
éçã«åæåãããããå®çŸ©ããTUã®å€æ°ã®äœ¿çšãå®è¡ãããŸã
å¥ã®TUã§äœ¿çšããåã«ïŒããã®ãªãŒããŒããããåé¿ã§ããŸãã
-fno-extern-tls-init ãªãã·ã§ã³ãéžæããŸãã
ã·ã³ãã«ãšã€ãªã¢ã¹ããµããŒãããã¿ãŒã²ããã§ã¯ãããã©ã«ã㯠-fextern-tls-initã ã¿ãŒã²ããäž
ã·ã³ãã«ãšã€ãªã¢ã¹ããµããŒãããªãå Žåãããã©ã«ã㯠-fno-extern-tls-init.
-ç¯å²å€
-fno-for-scope
If -ç¯å²å€ ãæå®ãããŠããå Žåãã§å®£èšãããŠããå€æ°ã®ã¹ã³ãŒã for-init ã¹ããŒãã¡ã³ã
ã«éå®ãããŠããŸã for C ++æšæºã§æå®ãããŠããããã«ãã«ãŒãèªäœã ããã
-fno-for-scope ãæå®ãããŠããå Žåãã§å®£èšãããŠããå€æ°ã®ã¹ã³ãŒã for-init ã¹ããŒãã¡ã³ã
å€ãããŒãžã§ã³ã®G ++ã®å Žåã®ããã«ãå²ãã§ããã¹ã³ãŒãã®æåŸãŸã§æ¡åŒµãã
C ++ã®ä»ã®ïŒåŸæ¥ã®ïŒå®è£ ã
ã©ã¡ãã®ãã©ã°ãæå®ãããŠããªãå Žåãããã©ã«ãã¯æšæºã«åŸããŸãããèš±å¯ããŠæå®ããŸã
ããã§ãªããã°ç¡å¹ã«ãªãããŸãã¯ç°ãªãå€ãã¹ã¿ã€ã«ã®ã³ãŒãã«å¯ŸããèŠå
è¡åã
-fno-gnu-ããŒã¯ãŒã
ãtypeofããããŒã¯ãŒããšããŠèªèããªãã§ãã ãããã³ãŒãã§ãã®åèªã䜿çšã§ããããã«ãªããŸãã
èå¥åã 代ããã«ãããŒã¯ãŒãã__typeof__ãã䜿çšã§ããŸãã -ã¢ã³ã· å«æãã
-fno-gnu-ããŒã¯ãŒã.
-fno-implicit-templates
æé»çã«ïŒã€ãŸããã«ãã£ãŠã€ã³ã¹ã¿ã³ã¹åãããïŒéã€ã³ã©ã€ã³ãã³ãã¬ãŒãã®ã³ãŒããçºè¡ããªãã§ãã ãã
䜿çšããïŒ; æ瀺çãªã€ã³ã¹ã¿ã³ã¹åã®ã³ãŒãã®ã¿ãçºè¡ããŸãã
-fno-implicit-inline-templates
ã€ã³ã©ã€ã³ãã³ãã¬ãŒãã®æé»çãªã€ã³ã¹ã¿ã³ã¹åã®ã³ãŒããçºè¡ããªãã§ãã ããã ããã©ã«ã
æé©åã®å¿ èŠãããå Žåãšãªãå Žåã§ã³ã³ãã€ã«ã§ããããã«ãã€ã³ã©ã€ã³ãç°ãªãæ¹æ³ã§åŠçããããšã§ã
æ瀺çãªã€ã³ã¹ã¿ã³ã¹åã®åãã»ããã
-fno-implement-inlines
ã¹ããŒã¹ãç¯çŽããããã«ãã«ãã£ãŠå¶åŸ¡ãããã€ã³ã©ã€ã³é¢æ°ã®ãªãã©ã€ã³ã³ããŒãçºè¡ããªãã§ãã ããã
#ãã©ã°ã å®è£ ã ãããã®é¢æ°ãã€ã³ã©ã€ã³åãããŠããªãå Žåãããã«ãããªã³ã«ãŒãšã©ãŒãçºçããŸã
圌ããåŒã°ãããšãããªãã©ãã§ãã
-fms-æ¡åŒµæ©èœ
æé»ã®intãæé»ã®intãªã©ãMFCã§äœ¿çšãããæ§é ã«é¢ããWpedanticèŠåãç¡å¹ã«ããŸã
éæšæºã®æ§æãä»ããŠã¡ã³ããŒé¢æ°ãžã®ãã€ã³ã¿ãŒãååŸããŸãã
-fno-nonansi-builtins
ANSI / ISOCã§çŸ©åä»ããããŠããªãé¢æ°ã®çµã¿èŸŒã¿å®£èšãç¡å¹ã«ããŸããããã
ãffsãããallocaããã_ exitãããindexãããbzeroãããconjfããããã³ãã®ä»ã®é¢é£ãããã®ãå«ãã
æ©èœããŸãã
-fnothrow-opt
ãthrowïŒïŒãäŸå€ä»æ§ããnoexceptãä»æ§ã§ãããã®ããã«æ±ããŸãã
äŸå€ãªããé¢æ°ã«æ¯ã¹ãŠããã¹ããµã€ãºã®ãªãŒããŒããããåæžãŸãã¯æé€ããŸã
ä»æ§ã é¢æ°ã«èªæã§ãªãã¿ã€ãã®ããŒã«ã«å€æ°ãããå Žå
ãã¹ãã©ã¯ã¿ãäŸå€ä»æ§ã¯å®éã«ã¯é¢æ°ãå°ããããŸãã
ãããã®å€æ°ã®EHã¯ãªãŒã³ã¢ããã¯æé©åã§ããŸãã ã»ãã³ãã£ãã¯å¹æã¯
ãã®ãããªäŸå€ä»æ§ãæã€é¢æ°ããã¹ããŒãããäŸå€
ãã®çµæããäºæããªããã§ã¯ãªããçµäºããããšããåŒã³åºããçºçããŸãã
-fno æŒç®åå
æŒç®ååã®ããŒã¯ãŒããandãããbitandãããbitorãããcomplãããnotãããorãã¯æ±ããªãã§ãã ããã
ããŒã¯ãŒããšããŠã®å矩èªãšããŠã®ãxorãã
-fno-ãªãã·ã§ã³-diags
ã³ã³ãã€ã©ãçºè¡ããå¿ èŠããªããšæšæºãèšã£ãŠãã蚺æãç¡å¹ã«ããŸãã
çŸåšãG ++ã«ãã£ãŠçºè¡ããããã®ãããªèšºæã¯ã
ã¯ã©ã¹å ã®è€æ°ã®æå³ã
-å¯å®¹
äžé©åã³ãŒãã«é¢ããããã€ãã®èšºæããšã©ãŒããèŠåã«ããŠã³ã°ã¬ãŒãããŸãã ãããã£ãŠã
-å¯å®¹ äžéšã®äžé©åã³ãŒãã®ã³ã³ãã€ã«ãèš±å¯ããŸãã
-fno-pretty-templates
ãšã©ãŒã¡ãã»ãŒãžãé¢æ°ãã³ãã¬ãŒãã®ç¹æ®åãåç §ããŠããå Žåãã³ã³ãã€ã©ã¯
éåžžããã³ãã¬ãŒãã®çœ²åã«ç¶ããŠãã³ãã¬ãŒãåŒæ°ãåºåãã
ã·ã°ããã£å ã®typedefãŸãã¯typenamesïŒäŸïŒãvoidfïŒTïŒ[with T = int]ã
"void fïŒintïŒ"ïŒããããã©ã®ãã³ãã¬ãŒããé¢ä¿ããŠããããæ確ã«ãªããŸãã ãšã©ãŒãçºçããå Žå
ã¡ãã»ãŒãžã¯ã¯ã©ã¹ãã³ãã¬ãŒãã®ç¹æ®åãåç §ããã³ã³ãã€ã©ã¯
ãã®ãã³ãã¬ãŒãã®ããã©ã«ãã®ãã³ãã¬ãŒãåŒæ°ãšäžèŽãããã³ãã¬ãŒãåŒæ°ã ããã
ãããã®åäœã®ããããã«ããããšã©ãŒã¡ãã»ãŒãžãç解ããã®ãé£ãããªããŸãã
ããç°¡åã«ãããªãã¯äœ¿ãããšãã§ããŸã -fno-pretty-templates ããããç¡å¹ã«ããŸãã
-ãã¬ã
ãªã³ã¯æã«ãã³ãã¬ãŒãã®èªåã€ã³ã¹ã¿ã³ã¹åãæå¹ã«ããŸãã ãã®ãªãã·ã§ã³ã¯ã
-fno-implicit-templates.
-fno-rtti
ã§äœ¿çšããä»®æ³é¢æ°ã䜿çšããŠããã¹ãŠã®ã¯ã©ã¹ã«é¢ããæ å ±ã®çæãç¡å¹ã«ããŸãã
C ++å®è¡æåèå¥æ©èœïŒãã€ãããã¯ãã£ã¹ã ãš ã¿ã€ãIDïŒã ããããªãå Žå
èšèªã®ãããã®éšåã䜿çšãããšããã®ãã©ã°ã䜿çšããŠã¹ããŒã¹ãç¯çŽã§ããŸãã ããŒã
ãã®äŸå€åŠçã¯åãæ å ±ã䜿çšããŸãããG++ã¯å¿ èŠã«å¿ããŠãããçæããŸãã The
ãã€ãããã¯ãã£ã¹ã æŒç®åã¯ãå®è¡æåãå¿ èŠãšããªããã£ã¹ãã«ãåŒãç¶ã䜿çšã§ããŸã
æ å ±ãã€ãŸããvoid*ããŸãã¯æ確ãªåºæ¬ã¯ã©ã¹ã«ãã£ã¹ãããŸãã
-fstats
ã³ã³ãã€ã«ã®æåŸã«ããã³ããšã³ãåŠçã«é¢ããçµ±èšãçºè¡ããŸãã ãã®
æ å ±ã¯éåžžãG ++éçºããŒã ã«ã®ã¿åœ¹ç«ã¡ãŸãã
-fstrict-åæå
åæåã®å€ã
ïŒC ++æšæºã§å®çŸ©ãããŠããããã«ïŒåæã®å€ã®XNUMXã€ã®ã¿ã«ããããšãã§ããŸãã
åºæ¬çã«ãå¿ èŠãªæå°ãããæ°ã§è¡šãããšãã§ããå€
ãã¹ãŠã®åæåãè¡šããŸãïŒã ããã°ã©ã ã䜿çšããå Žåããã®ä»®å®ã¯æå¹ã§ãªãå¯èœæ§ããããŸã
ä»»æã®æŽæ°å€ãåæåã«å€æããããã®ãã£ã¹ãã
-ftemplate-backtrace-limit =n
XNUMXã€ã®èŠåãŸãã¯ãšã©ãŒã«å¯Ÿãããã³ãã¬ãŒãã€ã³ã¹ã¿ã³ã¹åããŒãã®æ倧æ°ãèšå®ããŸã
ããž nã ããã©ã«ãå€ã¯10ã§ãã
-ftemplate-depth =n
ãã³ãã¬ãŒãã¯ã©ã¹ã®æ倧ã€ã³ã¹ã¿ã³ã¹å深床ãã«èšå®ããŸã nã ã®å¶é
ãã³ãã¬ãŒãã®ã€ã³ã¹ã¿ã³ã¹åã®æ·±ãã¯ããã³ãã¬ãŒãäžã«ç¡éã®ååž°ãæ€åºããããã«å¿ èŠã§ã
ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹åã ANSI / ISO C ++æºæ ããã°ã©ã ã¯ãæ倧å€ã«äŸåããŠã¯ãªããŸãã
17ãã倧ããæ·±ãïŒC ++ 1024ã§ã¯11ã«å€æŽïŒã ããã©ã«ãå€ã¯900ã§ãã
ã³ã³ãã€ã©ãŒã¯ãç¶æ³ã«ãã£ãŠã¯1024ã«éããåã«ã¹ã¿ãã¯ã¹ããŒã¹ã䜿ãæããå¯èœæ§ããããŸãã
-fno-threadsafe-statics
ã¹ã¬ããçšã«C ++ ABIã§æå®ãããã«ãŒãã³ã䜿çšããããã«äœåãªã³ãŒããåºåããªãã§ãã ãã-
ããŒã«ã«çµ±èšã®å®å šãªåæåã ãã®ãªãã·ã§ã³ã䜿çšããŠãã³ãŒããµã€ãºãæžããããšãã§ããŸã
ã¹ã¬ããã»ãŒãã§ããå¿ èŠã®ãªãã³ãŒãã§ãããã«ã
-fuse-cxa-atexit
ã__cxa_atexitãã䜿çšããŠãéçã¹ãã¬ãŒãžæéãæã€ãªããžã§ã¯ãã®ãã¹ãã©ã¯ã¿ãç»é²ããŸã
ãatexitãé¢æ°ã§ã¯ãªãé¢æ°ã ãã®ãªãã·ã§ã³ã¯å®å šã«å¿ èŠã§ã
éçãã¹ãã©ã¯ã¿ã®æšæºæºæ ã®åŠçããã ããCã©ã€ãã©ãªãæ©èœããå Žåã«ã®ã¿æ©èœããŸãã
ã__cxa_atexitãããµããŒãããŸãã
-fno-use-cxa-get-äŸå€-ptr
ã__cxa_get_exception_ptrãã©ã³ã¿ã€ã ã«ãŒãã³ã¯äœ¿çšããªãã§ãã ããã ããã¯ããã²ãèµ·ãã
ãstd :: uncaught_exceptionãã¯æ£ãããããŸããããã©ã³ã¿ã€ã ã«ãŒãã³ã
å©çšã§ããŸããã
-fvisibility-inlines-hidden
ãã®ã¹ã€ããã¯ããŠãŒã¶ãŒããã€ã³ã¿ãŒãã€ã³ã©ã€ã³ãšæ¯èŒããããšããªãããšã宣èšããŸã
XNUMXã€ã®é¢æ°ã®ã¢ãã¬ã¹ãç°ãªãé¢æ°ãŸãã¯ã¡ãœãã
å ±æãªããžã§ã¯ãã
ããã®å¹æã¯ãGCCãã€ã³ã©ã€ã³ã¡ãœãããå¹æçã«ããŒã¯ã§ããããšã§ãã
"__attribute __ïŒïŒvisibilityïŒ" hidden "ïŒïŒïŒ"ã§ããšã¯ã¹ããŒãã«è¡šç€ºãããªãããã«ããŸã
DSOã®ããŒãã«ã§ãããDSOå ã§äœ¿çšããå Žåã¯PLTéæ¥åç §ãå¿ èŠãšããŸããã
ãã®ãªãã·ã§ã³ãæå¹ã«ãããšãDSOã®ããŒãæéãšãªã³ã¯æéã«åçãªåœ±é¿ãäžããå¯èœæ§ããããŸãã
ã©ã€ãã©ãªãéããªããšãåçãšã¯ã¹ããŒãããŒãã«ã®ãµã€ãºãå€§å¹ ã«åæžãããŸã
ãã³ãã¬ãŒãã®äœ¿çšã
ãã®ã¹ã€ããã®åäœã¯ãã¡ãœãããé衚瀺ãšããŠããŒã¯ããããšãšã¯ãŸã£ããåãã§ã¯ãããŸããã
é¢æ°ã«ããŒã«ã«ãªéçå€æ°ãåå ã«åœ±é¿ãäžããªããããçŽæ¥
é¢æ°ãXNUMXã€ã®å ±æãªããžã§ã¯ãã§ã®ã¿å®çŸ©ãããŠãããšæšæž¬ããã³ã³ãã€ã©ãŒã
ã¡ãœãããæ瀺çã«å¯èŠæ§ãæã€ãã®ãšããŠããŒã¯ããŠãã®åœ±é¿ãç¡å¹ã«ããããšãã§ããŸãã
ãã®ã¡ãœããã«åãæ¿ããŸãã ããšãã°ããã€ã³ã¿ã
ç¹å®ã®ã€ã³ã©ã€ã³ã¡ãœããã§ã¯ãããã©ã«ãã®å¯èŠæ§ãæã€ãã®ãšããŠããŒã¯ããããšãã§ããŸãã ããŒãã³ã°
æ瀺çãªå¯èŠæ§ã§ã¯ã©ã¹ãå²ãããšã¯å¹æããããŸããã
æ瀺çã«ã€ã³ã¹ã¿ã³ã¹åãããã€ã³ã©ã€ã³ã¡ãœããã¯ããªã³ã±ãŒãžãšããŠãã®ãªãã·ã§ã³ã®åœ±é¿ãåããŸãã
ããããªããšãå ±æã©ã€ãã©ãªã®å¢çãè¶ããå¯èœæ§ããããŸãã
-fvisibility-ms-compat
ãã®ãã©ã°ã¯ãå¯èŠæ§èšå®ã䜿çšããŠGCCã®C ++ãªã³ã±ãŒãžã¢ãã«ãäœæããããšããŸã
Microsoft VisualStudioãšäºææ§ããããŸãã
ãã©ã°ã¯ãGCCã®ãªã³ã±ãŒãžã¢ãã«ã«æ¬¡ã®å€æŽãå ããŸãã
1.ããã©ã«ãã®å¯èŠæ§ããé衚瀺ãã«èšå®ããŸãã -fvisibility = hidden.
2.ã¿ã€ãã¯ãããã©ã«ãã§ã¯é衚瀺ã«ãªããŸããããã¡ã³ããŒã¯é衚瀺ã«ãªããŸããã
3.æ瀺çãªå¯èŠæ§ã®ãªãã¿ã€ãã«ã€ããŠã¯ãåäžå®çŸ©èŠåãç·©åãããŸã
è€æ°ã®å ±æãªããžã§ã¯ãã§å®çŸ©ãããŠããä»æ§ïŒãããã®å®£èš
ãã®ãªãã·ã§ã³ã䜿çšãããŠããªããšãã«èš±å¯ãããŠããå Žåã¯èš±å¯ãããŸãã
æ°ããã³ãŒãã§ã¯ãã䜿çšããããšããå§ãããŸã -fvisibility = hidden ãããŠããããã®ã¯ã©ã¹ããšã¯ã¹ããŒãããŸã
å€éšããèŠããããã«ããããšãç®çãšããŠããŸãã æ®å¿µãªãããã³ãŒããäŸåããå¯èœæ§ããããŸããã
ããããå¶ç¶ã«ãVisualStudioã®åäœã«ã€ããŠã
ãããã®å€æŽã®çµæã®äžã«ã¯ãåãã¿ã€ãã®éçããŒã¿ã¡ã³ããŒããããŸã
åãååã§ãç°ãªãå ±æãªããžã§ã¯ãã§å®çŸ©ãããŠãããã®ã¯ç°ãªããããå€æŽãã
äžæ¹ã¯ä»æ¹ãå€æŽããŸããã ãããŠãã§å®çŸ©ãããé¢æ°ã¡ã³ããŒãžã®ãã€ã³ã¿
ç°ãªãå ±æãªããžã§ã¯ãã¯çããæ¯èŒã§ããªãå ŽåããããŸãã ãã®ãã©ã°ãäžãããããšãããã¯
åãååã®ã¿ã€ããç°ãªãæ¹æ³ã§å®çŸ©ããããã®ODRã®éåã
-fvtable-verify =std | preinit | none
ãªã³ïŒãŸãã¯äœ¿çšããŠããå Žåã¯ãªãïŒ -fvtable-verify = noneïŒã§æ€èšŒããã»ãã¥ãªãã£æ©èœ
å®è¡æãè¡ããããã¹ãŠã®ä»®æ³åŒã³åºãã«ã€ããŠããã®vtableãã€ã³ã¿ãŒãééãã
åŒã³åºãããã®ã¯ãªããžã§ã¯ãã®ã¿ã€ãã«å¯ŸããŠæå¹ã§ãããç ŽæããŠããªããã
äžæžããããŸãã ç¡å¹ãªvtableãã€ã³ã¿ãŒãïŒå®è¡æã«ïŒæ€åºãããå Žåããšã©ãŒã¯æ¬¡ã®ããã«ãªããŸãã
å ±åãããããã°ã©ã ã®å®è¡ã¯çŽã¡ã«åæ¢ãããŸãã
ãã®ãªãã·ã§ã³ã䜿çšãããšãããã°ã©ã ã®èµ·åæã«ãã©ã³ã¿ã€ã ããŒã¿æ§é ãæ§ç¯ãããŸãã
vtableãã€ã³ã¿ãŒã確èªããŸãã ãªãã·ã§ã³ãstdããšãpreinitãã¯ãã®ã¿ã€ãã³ã°ãå¶åŸ¡ããŸã
ãããã®ããŒã¿æ§é ãæ§ç¯ããããšãã ã©ã¡ãã®å ŽåããããŒã¿æ§é ãæ§ç¯ãããŸã
å®è¡ããã¡ã€ã³ãã«éããåã The -fvtable-verify = std ãããã®ããŒã¿æ§é ãåŒãèµ·ãããŸã
å ±æã©ã€ãã©ãªãããŒããããåæåãããåŸã«ãã«ããããŸãã
-fvtable-verify = preinit å ±æã©ã€ãã©ãªãäœæãããåã«ãã«ããããŸã
ããŒããããåæåãããŸããã
ãã®ãªãã·ã§ã³ãã³ã³ãã€ã©è¡ã«è€æ°å衚瀺ãããå€ãç°ãªãå Žå
æå®ãããšããnoneãã¯ãstdããšãpreinitãã®äž¡æ¹ãããåªå ãããŸãã 'preinit'
'std'ãããåªå ãããŸãã
-fvtv-ãããã°
vtableæ€èšŒæ©èœã®ã©ã³ã¿ã€ã é¢æ°ã®ãããã°ããŒãžã§ã³ã次ã®ããã«ããŸã
åŒã°ããã ããã¯ã -fvtable-verify = std or -fvtable-verify = preinit ãããŠããŸã
䜿çšæžã¿ã ãã®ãã©ã°ã«ããââãã³ã³ãã€ã©ã¯ã©ã®vtableãã€ã³ã¿ã远跡ããããšãã§ããŸãã
ã¯ã©ã¹ããšã«æ€åºããããã®æ å ±ããã¡ã€ã«ã«èšé²ããŸã
ãŠãŒã¶ãŒã®ãã·ã³ã®ãã³ããã¡ã€ã«ãã£ã¬ã¯ããªã«ãããvtv_set_ptr_data.logãã
泚ïŒãã®æ©èœã¯ãããŒã¿ããã°ãã¡ã€ã«ã«è¿œå ããŸãã æ°ãããã°ãã¡ã€ã«ãå¿ èŠãªå Žåã¯ã
å¿ ãæ¢åã®ãã®ãåé€ããŠãã ããã
-fvtv-ã«ãŠã³ã
ããã¯ãããã°ãã©ã°ã§ãã ãšçµã¿åãããŠäœ¿çšââããå Žå -fvtable-verify = std or
-fvtable-verify = preinitãããã«ãããã³ã³ãã€ã©ã¯
æ€åºãããä»®æ³åŒã³åºããšæ¿å ¥ãããæ€èšŒã®æ°ã ãŸã
æ¿å ¥ããç¹å®ã®ã©ã³ã¿ã€ã ã©ã€ãã©ãªé¢æ°ãžã®åŒã³åºãã®æ°ãã«ãŠã³ãããŸãã ãã
ã³ã³ãã€ã«åäœããšã®æ å ±ã¯ããšããååã®ãã¡ã€ã«ã«æžã蟌ãŸããŸãã
ãŠãŒã¶ãŒã®ãã·ã³ã®dump_fileãã£ã¬ã¯ããªã«ãããvtv_count_data.logãã ãŸã
åã¯ã©ã¹ã®vtableãã€ã³ã¿ãŒã»ããã®ãµã€ãºãã«ãŠã³ããããã®æ å ±ãæžã蟌ã¿ãŸã
åããã£ã¬ã¯ããªã®ãvtv_class_set_sizes.logãã«ç§»åããŸãã
泚ïŒãã®æ©èœã¯ãããŒã¿ããã°ãã¡ã€ã«ã«è¿œå ããŸãã æ°ãããã°ãã¡ã€ã«ãååŸããã«ã¯ãå¿ ã
æ¢åã®ãã®ãåé€ããŸãã
-fno-匱ã
ãªã³ã«ã«ãã£ãŠæäŸãããŠããå Žåã§ãã匱ãèšå·ã®ãµããŒãã¯äœ¿çšããªãã§ãã ããã ããã©ã«ãã§ã¯ãG ++
å©çšå¯èœãªå Žåã¯åŒ±ãèšå·ã䜿çšããŸãã ãã®ãªãã·ã§ã³ã¯ãã¹ãçšã«ã®ã¿ååšãã
ãšã³ããŠãŒã¶ãŒã¯äœ¿çšããªãã§ãã ããã ãã®çµæãã³ãŒããå£ããã¡ãªããã¯ãããŸããã
ãã®ãªãã·ã§ã³ã¯ãG ++ã®å°æ¥ã®ãªãªãŒã¹ã§åé€ãããå¯èœæ§ããããŸãã
-nostdinc ++
C ++ã«åºæã®æšæºãã£ã¬ã¯ããªã§ããããŒãã¡ã€ã«ãæ€çŽ¢ããªãã§ãã ããããã ããæ€çŽ¢ããŠãã ããã
ããã§ãä»ã®æšæºãã£ã¬ã¯ããªãæ€çŽ¢ããŸãã ïŒãã®ãªãã·ã§ã³ã¯ããã«ãæã«äœ¿çšãããŸã
C ++ã©ã€ãã©ãªãïŒ
ããã«ããããã®æé©åãèŠåãããã³ã³ãŒãçæãªãã·ã§ã³ã«ã¯ãæå³ãããã ãã§ãã
C ++ããã°ã©ã ã®å ŽåïŒ
-ãã³ ïŒCãObjective-CãC ++ããã³Objective-C ++ã®ã¿ïŒ
G++ããã³ããŒäžç«ãšäºææ§ããªãå¯èœæ§ã®ããã³ãŒããçæãããšãã«èŠåãã
C++ABIã ãã®ãããªãã¹ãŠã®ã±ãŒã¹ã«ã€ããŠèŠåããããã®åªåããªãããŠããŸãããã
G ++ãçæããŠããã«ãããããããããããèŠåãããªãããã€ãã®ã±ãŒã¹
äºææ§ã®ãªãã³ãŒãã ãŸããèŠåãçºããããå ŽåããããŸãã
çæãããã³ãŒãã¯äºææ§ããããŸãã
æžå¿µãããå Žåã¯ããããã®èŠåãåé¿ããããã«ã³ãŒããæžãçŽãå¿ èŠããããŸãã
G ++ã«ãã£ãŠçæãããã³ãŒãã¯ã«ãã£ãŠçæãããã³ãŒããšãã€ããªäºæã§ã¯ãªãå¯èœæ§ããããšããäºå®
ä»ã®ã³ã³ãã€ã©ã
ã®æ¢ç¥ã®éäºææ§ -fabi-version = 2 ïŒããã©ã«ãïŒã€ã³ã¯ã«ãŒãïŒ
ã»åç §åã®éåãã³ãã¬ãŒããã©ã¡ãŒã¿ãæã€ãã³ãã¬ãŒãããã³ã°ã«ãããŸã
ééã£ãŠïŒ
extern int N;
ã¬ã³ãã¬ãŒãæ§é äœS {};
ãã€ãnïŒS ïŒ{2}
ããã¯ã§ä¿®æ£ãããŠããŸã -fabi-version = 3.
ã»ã__ attributeïŒïŒvector_sizeïŒïŒãã䜿çšããŠå®£èšãããSIMDãã¯ãã«ã¿ã€ãã¯ã
ãã¯ãã«ãåãé¢æ°ã®ãªãŒããŒããŒããèš±å¯ããªãéæšæºçãªæ¹æ³
ããŸããŸãªãµã€ãºã®ã
ãã³ã°ãªã³ã°ã¯ã§å€æŽãããŸã -fabi-version = 4.
ã®æ¢ç¥ã®éäºææ§ -fabi-version = 1 次ã®ãšããã§ãã
ã»ããããã£ãŒã«ãã®ããŒã«ããã£ã³ã°ã®äžé©åãªåŠçã G++ã¯ããŒã¿ã®ããã¯ãè©Šã¿ãå¯èœæ§ããããŸã
åºæ¬ã¯ã©ã¹ãšåããã€ãã«ã äŸãã°ïŒ
struct A {virtual void fïŒïŒ; int f1ïŒ1; };
struct BïŒpublic A {int f2ïŒ1; };
ãã®å ŽåãG++ã¯ãB::f2ãããA::f1ããšåããã€ãã«é 眮ããŸãã ä»ã®ã³ã³ãã€ã©ã¯
ãããã ãµã€ãºã
ãã©ãããã©ãŒã ã®ãã€ããµã€ãºã®åæ°ã ããã«ãããG++ããã³ãã®ä»ã®ã³ã³ãã€ã©ã¯
ãBããåãããã«é 眮ããŸãã
ã»ä»®æ³ããŒã¹ã®ããŒã«ããã£ã³ã°ã®äžé©åãªåŠçã G++ã¯ããŒã«ã䜿çšããŸãã
ä»®æ³ããŒã¹ãã¬ã€ã¢ãŠããããšãã®ããã£ã³ã°ã äŸãã°ïŒ
struct A {virtual void fïŒïŒ; char c1; };
æ§é äœB{BïŒïŒ; ã·ã£ãŒã«c2; };
æ§é äœCïŒãããªãã¯Aããããªãã¯ä»®æ³B {};
ãã®å ŽåãG++ã¯ãAãã®ããŒã«ããã£ã³ã°ã«ãBããé 眮ããŸããã ä»ã®
ã³ã³ãã€ã©ã¯ããããŸãã ãAããæ瀺çã«ããã£ã³ã°ããããšã§ããã®åé¡ãåé¿ã§ããŸãã
ãµã€ãºã¯ãã®é 眮ã®åæ°ã§ãïŒä»®æ³åºæ¬ã¯ã©ã¹ãç¡èŠããŸãïŒã ãã®åå
ãCããåãããã«ã¬ã€ã¢ãŠãããG++ããã³ãã®ä»ã®ã³ã³ãã€ã©ã
ã»å®£èšãããå¹ ããããã®å¹ ããã倧ããããããã£ãŒã«ãã®èª€ã£ãåŠç
ããããã£ãŒã«ãããŠããªã³ã«è¡šç€ºãããå Žåã®åºã«ãªãã¿ã€ãã äŸãã°ïŒ
ãŠããªã³U{intiïŒ4096; };
ãintãã«4096ãããããªããšä»®å®ãããšãG++ã¯çµåãå°ããããŸãã
ãintãã®ãããæ°ã
ã»ç©ºã®ã¯ã©ã¹ã¯ã誀ã£ããªãã»ããã«é 眮ãããå¯èœæ§ããããŸãã äŸãã°ïŒ
æ§é äœA{};
æ§é äœB{
ãã;
ä»®æ³ãã€ãfïŒïŒ;
};
æ§é äœCïŒãããªãã¯Bããããªãã¯A {};
G ++ã¯ããCãã®ãAãåºæ¬ã¯ã©ã¹ããŒã以å€ã®ãªãã»ããã«é 眮ããŸãã ã«é 眮ããå¿ èŠããããŸã
ãªãã»ãããŒãã G ++ã¯ããBãã®ãAãããŒã¿ã¡ã³ããŒããã§ã«ååšããŠãããšèª€ã£ãŠä¿¡ããŠããŸã
ãªãã»ãããŒãã§ã
ã»ã¿ã€ãã«ãtypenameããŸãã¯ãã³ãã¬ãŒããã³ãã¬ãŒããå«ãŸãããã³ãã¬ãŒãé¢æ°ã®åå
ãã©ã¡ãŒã¿ã誀ã£ãŠãã³ã°ã«ãããå¯èœæ§ããããŸãã
ãã³ãã¬ãŒã
void fïŒtypename Q :: XïŒ{}
ãã³ãã¬ãŒãã¯ã©ã¹Q>
void fïŒtypename Q ïŒïŒããïŒ {}
ãããã®ãã³ãã¬ãŒãã®ã€ã³ã¹ã¿ã³ã¹åã¯ã誀ã£ãŠãã³ã°ã«ãããå¯èœæ§ããããŸãã
ãŸããpsABIé¢é£ã®å€æŽã«ã€ããŠãèŠåããŸãã æ¢ç¥ã®psABIã¯ãã®æç¹ã§å€æŽãããŸã
次ã®ãšããã§ãã
ã»SysV / x86-64ã®å Žåããlongdoubleãã¡ã³ããŒãæã€ãŠããªã³ã¯æ¬¡ã®ããã«ã¡ã¢ãªã«æž¡ãããŸãã
psABIã§æå®ãããŠããŸãã äŸãã°ïŒ
ãŠããªã³U {
ãã³ã°ããã«ld;
int i;
};
ããŠããªã³Uãã¯åžžã«ã¡ã¢ãªã«æž¡ãããŸãã
-Wctor-dtor-ãã©ã€ãã·ãŒ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ãã®äžã®ãã¹ãŠã®ã³ã³ã¹ãã©ã¯ã¿ãŸãã¯ãã¹ãã©ã¯ã¿ãåå ã§ã¯ã©ã¹ã䜿çšã§ããªãããã«èŠããå Žåã«èŠåããŸã
ã¯ã©ã¹ã¯ãã©ã€ããŒãã§ããããã¬ã³ãããããªãã¯éçã¡ã³ããŒé¢æ°ããããŸããã
éãã©ã€ããŒãã¡ãœããããªããå°ãªããšãXNUMXã€ã®ãã©ã€ããŒãã¡ã³ããŒãããå Žåã«ãèŠåããŸã
ã³ã³ã¹ãã©ã¯ã¿ãŸãã¯ãã¹ãã©ã¯ã¿ã§ã¯ãªãé¢æ°ã
-Wdelete-éä»®æ³-dtor ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ãã€èŠåãã åé€ ä»®æ³é¢æ°ãæã€ã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãç Žæ£ããããã«äœ¿çšãããŸã
ããã³éä»®æ³ãã¹ãã©ã¯ã¿ã 掟çã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãåé€ããããšã¯å®å šã§ã¯ãããŸãã
åºæ¬ã¯ã©ã¹ã«ä»®æ³ããªãå Žåã¯ãåºæ¬ã¯ã©ã¹ãžã®ãã€ã³ã¿ãä»ããŠ
ãã¹ãã©ã¯ã¿ã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wliteral-ãµãã£ãã¯ã¹ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
æååãŸãã¯æåãªãã©ã«ã®åŸã«ãããã§ãªãudãµãââã£ãã¯ã¹ãç¶ãå Žåã«èŠåããŸã
ã¢ã³ããŒã¹ã³ã¢ã§å§ããŸãã æºæ ããæ¡åŒµæ©èœãšããŠãGCCã¯ãã®ãããªæ¥å°ŸèŸã次ã®ããã«æ±ããŸã
ã³ãŒããšã®äžäœäºææ§ãç¶æããããã«ãååŠçããŒã¯ã³ãåé¢ããŸã
"ããã®ãã©ãŒããããã¯ãã䜿çšããŸã"ã äŸãã°ïŒ
#å®çŸ©__STDC_FORMAT_MACROS
ïŒå«ã
#include
int mainïŒïŒ{
int64_t i64 = 123;
printfïŒ "My int64ïŒïŒ " PRId64 "\ n"ãi64ïŒ;
}
ãã®å ŽåããPRId64ãã¯åå¥ã®ååŠçããŒã¯ã³ãšããŠæ±ãããŸãã
ãã®èŠåã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-çãã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
C ++ 11ã§çŠæ¢ãããŠãããããŒã€ã³ã°å€æãçºçããå Žåã«èŠåããŸã { }ãäŸãã°
int i = {2.2}; //ãšã©ãŒïŒdoubleããintã«ãããŒã€ã³ã°
ãã®ãã©ã°ã¯ã«å«ãŸããŠããŸã -å£ ãš -Wc ++ 11-äºææ§.
é£çµ¡å -std = c ++ 11, -ãããŒã€ã³ã°ãªã æšæºã§å¿ èŠãªèšºæãæå¶ããŸãã
ããã¯æŽåœ¢åŒã³ãŒãã®æå³ã«åœ±é¿ãäžããªãããšã«æ³šæããŠãã ããã ã³ã³ããŒãžã§ã³ãçµã蟌ã
SFINAEã®ã³ã³ããã¹ãã§ã¯ãäŸç¶ãšããŠäžæ£ãªåœ¢åŒãšèŠãªãããŸãã
-Wnoä»¥å€ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
é¢æ°ã®åŒã³åºãã®ããã«noexcept-expressionãfalseãšè©äŸ¡ããããšãã«èŠåããŸã
ã¹ããŒããªãäŸå€ä»æ§ããªãïŒã€ãŸãã æããïŒïŒ or äŸå€ãªã)
ããããã³ã³ãã€ã©ãŒã¯äŸå€ãã¹ããŒããªãããšãç¥ã£ãŠããŸãã
-Wnon-virtual-dtor ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ã¯ã©ã¹ã«ä»®æ³é¢æ°ãšã¢ã¯ã»ã¹å¯èœãªéä»®æ³ãã¹ãã©ã¯ã¿ãããå Žåã«èŠåãã
ããèªäœãŸãã¯ã¢ã¯ã»ã¹å¯èœãªå€åœ¢åºæ¬ã¯ã©ã¹ã§ããã®å Žåã¯å¯èœã§ãã
ã¯ã©ã¹èªäœãžã®ãã€ã³ã¿ãä»ããŠæŽŸçã¯ã©ã¹ã®ã€ã³ã¹ã¿ã³ã¹ãåé€ããã®ã¯å®å šã§ã¯ãããŸãã
ãŸãã¯åºæ¬ã¯ã©ã¹ã ãã®èŠåã¯ã次ã®å Žåã«èªåçã«æå¹ã«ãªããŸã -Weffc ++ æå®ãããŠããŸãã
-ãªãªãŒã㌠ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ã³ãŒãã§æå®ãããã¡ã³ããŒåæååã®é åºãé åºãšäžèŽããªãå Žåã«èŠåããŸã
ããããå®è¡ãããªããã°ãªããªããäŸãã°ïŒ
æ§é äœA {
int i;
int j;
AïŒïŒïŒjïŒ0ïŒãiïŒ1ïŒ{}
};
ã³ã³ãã€ã©ãŒã¯ãã¡ã³ããŒåæååãåé 眮ããŸãã i ãš j 宣èšãšäžèŽãã
ã¡ã³ããŒã®é åºããã®æšã®èŠåãçºããŸãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã
-å£.
-fext-æ°å€ãªãã©ã« ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
èæ°ãåºå®å°æ°ç¹ããŸãã¯ãã·ã³å®çŸ©ã®ãªãã©ã«çªå·ã®æ¥å°ŸèŸãGNUãšããŠåãå ¥ãã
æ¡åŒµæ©èœã ãã®ãªãã·ã§ã³ããªãã«ãããšããããã®ãµãã£ãã¯ã¹ã¯C ++ 11ãŠãŒã¶ãŒãšããŠæ±ãããŸã-
ãªãã©ã«ã®æ°å€ãµãã£ãã¯ã¹ãå®çŸ©ããŸããã ããã¯ãC ++ 11ããåã®ãã¹ãŠã®æ¹èšã§ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸã
ããã³ãã¹ãŠã®GNUæ¹èšïŒ -std = c ++ 98, -std = gnu ++ 98, -std = gnu ++ 11, -std = gnu ++ 1yã ãã®
ISO C ++ 11以éã§ã¯ããªãã·ã§ã³ã¯ããã©ã«ãã§ãªãã«ãªã£ãŠããŸãïŒ-std = c ++ 11ã...ïŒã
ä»¥äž -W..ã ãªãã·ã§ã³ã¯åœ±é¿ãåããŸãã -å£.
-Weffc ++ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ã¹ã³ãããã€ã€ãŒãºããã®æ¬¡ã®ã¹ã¿ã€ã«ã¬ã€ãã©ã€ã³ã®éåã«ã€ããŠèŠåãã å¹æçãª
C + + äžé£ã®æ¬ïŒ
ã»åçã«ã¯ã©ã¹ã®ã³ããŒã³ã³ã¹ãã©ã¯ã¿ãšä»£å ¥æŒç®åãå®çŸ©ããŸã-
å²ãåœãŠãããã¡ã¢ãªã
ã»ã³ã³ã¹ãã©ã¯ã¿ãŒã§ã®å²ãåœãŠãããåæåãåªå ããŸãã
ã»ãoperator=ãã«*thisãžã®åç §ãè¿ããŠããããŸãã
ã»ãªããžã§ã¯ããè¿ãå¿ èŠãããå Žåã¯ãåç §ãè¿ããªãã§ãã ããã
ã»ã€ã³ã¯ãªã¡ã³ãæŒç®åãšãã¯ãªã¡ã³ãæŒç®åã®ãã¬ãã£ãã¯ã¹åœ¢åŒãšãã¹ããã£ãã¯ã¹åœ¢åŒãåºå¥ããŸãã
ã»ã&&ããã||ãããŸãã¯ãããããªãŒããŒããŒãããªãã§ãã ããã
ãã®ãªãã·ã§ã³ã¯ãŸãæå¹ã«ããŸã -Wnon-virtual-dtorããããå¹æçãªC ++ã®XNUMXã€ã§ã
æšå¥šäºé ã ãã ãããã§ãã¯ã¯ä»®æ³ã®æ¬ åŠã«ã€ããŠèŠåããããã«æ¡åŒµãããŠããŸã
ã¢ã¯ã»ã¹å¯èœãªéå€åããŒã¹ã¯ã©ã¹ã®ãã¹ãã©ã¯ã¿ãã
ãã®ãªãã·ã§ã³ãéžæãããšãã¯ãæšæºã©ã€ãã©ãªããããŒããã¹ãŠã«æºæ ããŠããããã§ã¯ãªãããšã«æ³šæããŠãã ãã
ãããã®ã¬ã€ãã©ã€ã³ã®; 䜿çšãã grep -v ãããã®èŠåãé€å€ããŸãã
-Wstrict-null-ã»ã³ããã« ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
çªå µãšããŠãã£ã¹ããããŠããªããNULLãã䜿çšããããšã«ã€ããŠèŠåããŸãã GCCã®ã¿ã§ã³ã³ãã€ã«ããå Žå
ãNULLãã¯ã__nullãã«å®çŸ©ãããŠãããããããã¯æå¹ãªçªå µã§ãã ãã«ã§ãã
ãã«ãã€ã³ã¿ã§ã¯ãªããã€ã³ã¿å®æ°ãåããµã€ãºã§ããããšãä¿èšŒãããŠããŸã
ãã€ã³ã¿ãšããŠã ãã ãããã®äœ¿çšæ³ã¯ãç°ãªãã³ã³ãã€ã©ãŒéã§ç§»æ€å¯èœã§ã¯ãããŸããã
-Wno-éãã³ãã¬ãŒããã¬ã³ã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ãã³ãã¬ãŒãåãããŠããªããã¬ã³ãé¢æ°ããã³ãã¬ãŒãå ã§å®£èšãããŠããå Žåã®èŠåãç¡å¹ã«ããŸãã
G ++ã§ã®æ瀺çãªãã³ãã¬ãŒãä»æ§ã®ãµããŒãã®åºçŸä»¥æ¥ã
å人ã¯ä¿®é£ŸãããŠããªãIDã§ãïŒã€ãŸãã å人 fooïŒintïŒïŒãC ++èšèªä»æ§
å人ãéåžžã®éãã³ãã¬ãŒãé¢æ°ã宣èšãŸãã¯å®çŸ©ããããšãèŠæ±ããŸãã ïŒã»ã¯ã·ã§ã³
14.5.3ïŒã G ++ãæ瀺çãªä»æ§ãå®è£ ããåã¯ãunqualified-idsã¯
ãã³ãã¬ãŒãåãããé¢æ°ã®ç¹å®ã®ç¹æ®åãšããŠè§£éãããŸãã ããã¯
äžé©åãªåäœã¯ãG ++ã®ããã©ã«ãã®åäœã§ã¯ãªããªããŸããã
-éãã³ãã¬ãŒããã¬ã³ã ã³ã³ãã€ã©ãæœåšçãªåé¡ã«ã€ããŠæ¢åã®ã³ãŒãããã§ãã¯ã§ããããã«ããŸã
ã¹ãããããããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã ãã®æ°ããã³ã³ãã€ã©ã®åäœã¯ã次ã®ã³ãã³ãã§ãªãã«ã§ããŸãã
-Wno-éãã³ãã¬ãŒããã¬ã³ããæºæ ããã³ã³ãã€ã©ã³ãŒããä¿æããŸããã
圹ç«ã€èŠåã
-ãŠã©ã«ãã¹ã¿ã€ã«ãã£ã¹ã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
évoidåã«ãã£ã¹ããããå€ãã¹ã¿ã€ã«ïŒCã¹ã¿ã€ã«ïŒãC ++ããã°ã©ã å ã§äœ¿çšãããŠããå Žåã«èŠåããŸãã
æ°ããã¹ã¿ã€ã«ã®ãã£ã¹ãïŒãã€ãããã¯ãã£ã¹ã, static_cast, reinterpret_cast, const_castïŒã¯
æå³ããªã圱é¿ã«å¯Ÿããè匱æ§ãäœããæ€çŽ¢ãã¯ããã«ç°¡åã§ãã
-ãªãŒããŒããŒã-ä»®æ³ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
é¢æ°å®£èšãä»®æ³é¢æ°ãåºæ¬ã¯ã©ã¹ããé衚瀺ã«ãããšãã«èŠåããŸãã ã«ãšã£ãŠ
äŸïŒ
æ§é äœA {
ä»®æ³ãã€ãfïŒïŒ;
};
æ§é äœBïŒpublic A {
void fïŒintïŒ;
};
ãfãã®ãAãã¯ã©ã¹ããŒãžã§ã³ã¯ãBãã«é ãããŠããã次ã®ãããªã³ãŒãããããŸãã
B * b;
b-> fïŒïŒ;
ã³ã³ãã€ã«ã«å€±æããŸãã
-Wno-pmf-ã³ã³ããŒãžã§ã³ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ã¡ã³ããŒé¢æ°ãžã®ãã€ã³ãããããã€ã³ã¿ãŒããã¬ãŒã³ã«å€æããããã®èšºæãç¡å¹ã«ããŸã
ãã€ã³ã¿ãŒã
-Wsign-ããã¢ãŒã·ã§ã³ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
éè² è·è§£æ±ºã眲åãããŠããªãã¿ã€ããŸãã¯åæåããã®ããã¢ãŒã·ã§ã³ãéžæãããšãã«èŠåããŸã
åããµã€ãºã®ç¬Šå·ãªãåãžã®å€æãä»ãã笊å·ä»ãåã å
G ++ã®ããŒãžã§ã³ã¯çœ²åãããŠããªãç¶æ ãç¶æããããšããŸããããæšæºã§ã¯çŸåšã®
è¡åã
ãªãã·ã§ã³ å¶åŸ¡ ãªããžã§ã¯ãã£ãC ãš Objective-C ++ æ¹èš
ïŒæ³šïŒãã®ããã¥ã¢ã«ã§ã¯ãObjective-Cããã³Objective-C ++èšèªã«ã€ããŠã¯èª¬æããŠããŸããã
èªåèªèº«ã
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãObjective-Cã§ã®ã¿æå³ã®ããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã«ã€ããŠèª¬æããŸãã
ããã³Objective-C ++ããã°ã©ã ã èšèªã«äŸåããªãGNUã®ã»ãšãã©ã䜿çšããããšãã§ããŸã
ã³ã³ãã€ã©ãªãã·ã§ã³ã ããšãã°ã次ã®ããã«ãã¡ã€ã«ãsome_class.mããã³ã³ãã€ã«ã§ããŸãã
gcc -g -fgnu-runtime -O -c some_class.m
ãã®äŸã§ã¯ã -fgnu-ã©ã³ã¿ã€ã Objective-Cããã³Objective-C ++å°çšã®ãªãã·ã§ã³ã§ã
ããã°ã©ã ; ä»ã®ãªãã·ã§ã³ã¯ãGCCã§ãµããŒããããŠããä»»æã®èšèªã§äœ¿çšã§ããŸãã
Objective-Cã¯Cèšèªã®æ¡åŒµã§ãããããObjective-Cã®ã³ã³ãã€ã«ã¯
Cããã³ããšã³ãã«åºæã®ãªãã·ã§ã³ã䜿çšããããšãã§ããŸãïŒäŸïŒ -äŒçµ±çãªïŒã åæ§ã«ã
ç®ç-C ++ã³ã³ãã€ã«ã§ã¯ãC ++åºæã®ãªãã·ã§ã³ã䜿çšã§ããŸãïŒäŸïŒ -ãã³).
ããããªãã·ã§ã³ã®ãªã¹ãã§ã ã® Objective-Cããã³Objective-C ++ãã³ã³ãã€ã«ãããã
ããã°ã©ã ïŒ
-fconstant-string-class =ã¯ã©ã¹å
ã ã¯ã©ã¹å åãªãã©ã«æååã«å¯ŸããŠã€ã³ã¹ã¿ã³ã¹åããã¯ã©ã¹ã®ååãšããŠ
æ§æ "@" ... ""ã§æå®ãããŸãã ããã©ã«ãã®ã¯ã©ã¹åã¯ãNXConstantStringãã§ãã
GNUã©ã³ã¿ã€ã ã䜿çšãããŠãããNeXTã©ã³ã¿ã€ã ã䜿çšãããŠããå Žåã¯ãNSConstantStringã
䜿çšæžã¿ïŒä»¥äžãåç §ïŒã The -fconstant-cfstrings ãªãã·ã§ã³ãååšããå Žåã¯ã
-få®æ°æååã¯ã©ã¹ ã@ "..."ããªãã©ã«ãèšå®ããŠå®æ°ãšããŠé 眮ãã
CoreFoundationæååã
-fgnu-ã©ã³ã¿ã€ã
æšæºã®GNUObjective-Cã©ã³ã¿ã€ã ãšäºææ§ã®ãããªããžã§ã¯ãã³ãŒããçæããŸãã ããã¯
ã»ãšãã©ã®ã¿ã€ãã®ã·ã¹ãã ã®ããã©ã«ãã
-fnext-ã©ã³ã¿ã€ã
NeXTã©ã³ã¿ã€ã ãšäºææ§ã®ããåºåãçæããŸãã ããã¯NeXTããŒã¹ã®ããã©ã«ãã§ã
ããŒãŠã£ã³ãMacOSXãªã©ã®ã·ã¹ãã ããã¯ãã__NEXT_RUNTIME__ãã¯æ¬¡ã®å Žåã«äºåå®çŸ©ãããŠããŸãã
ïŒãããŠãã®å Žåã®ã¿ïŒãã®ãªãã·ã§ã³ã䜿çšãããŸãã
-fno-nil-ã¬ã·ãŒããŒ
ãã®äžã§ãã¹ãŠã®Objective-Cã¡ãã»ãŒãžããã£ã¹ãããïŒ "[receiver messageïŒarg]"ïŒãããšä»®å®ããŸã
翻蚳ãŠãããã¯ãåä¿¡æ©ãããŒããã§ãªãããšã確èªããŸãã ããã«ãããããå€ãã®ããšãå¯èœã«ãªããŸã
䜿çšããã©ã³ã¿ã€ã ã®å¹ççãªãšã³ããªãã€ã³ãã ãã®ãªãã·ã§ã³ã¯ã
NeXTã©ã³ã¿ã€ã ããã³ABIããŒãžã§ã³0ãŸãã¯1ãšçµã¿åãããŠäœ¿çšââããŸãã
-fobjc-abi-version =n
ããŒãžã§ã³ãäœ¿çš n éžæããã©ã³ã¿ã€ã ã®Objective-CABIã®ãã®ãªãã·ã§ã³ã¯
çŸåšãNeXTã©ã³ã¿ã€ã ã§ã®ã¿ãµããŒããããŠããŸãã ãã®å ŽåãããŒãžã§ã³0ã¯
ããããã£ããã®ä»ã®Objective-C32ããµããŒãããªãåŸæ¥ã®ïŒ2.0ãããïŒABI
è¿œå ã ããŒãžã§ã³1ã¯ãããããã£ãšããµããŒãããåŸæ¥ã®ïŒ32ãããïŒABIã§ãã
ãã®ä»ã®Objective-C2.0ã®è¿œå ã ããŒãžã§ã³2ã¯ãææ°ã®ïŒ64ãããïŒABIã§ãã äœããªãå Žå
æå®ãããšãããã©ã«ãã¯0ãããã¿ãŒã²ãããã·ã³ã§ã¯ããŒãžã§ã³32ã2ãããã§ã¯ããŒãžã§ã³64ã§ãã
ã¿ãŒã²ãããã·ã³ã
-fobjc-call-cxx-cdtors
Objective-Cã¯ã©ã¹ããšã«ããã®ã€ã³ã¹ã¿ã³ã¹å€æ°ã®ãããããC ++ãªããžã§ã¯ãã§ãããã©ããã確èªããŸã
èªæã§ã¯ãªãããã©ã«ãã®ã³ã³ã¹ãã©ã¯ã¿ãŒã䜿çšããŸãã ãããããªããç¹å¥ãª "-ïŒidïŒãåæããŸã
.cxx_construct "ã€ã³ã¹ã¿ã³ã¹ã¡ãœããã¯ãä»»æã®ã§éèŠãªããã©ã«ãã³ã³ã¹ãã©ã¯ã¿ãŒãå®è¡ããŸã
ãã®ãããªã€ã³ã¹ã¿ã³ã¹å€æ°ãé çªã«ããããŠãselfããè¿ããŸãã åæ§ã«ãããããã°ãã§ãã¯ããŠãã ãã
ã€ã³ã¹ã¿ã³ã¹å€æ°ã¯ãèªæã§ã¯ãªããã¹ãã©ã¯ã¿ãæã€C ++ãªããžã§ã¯ãã§ãããããã§ããå Žåã¯ãåæããŸãã
ãã®ãããªããã©ã«ãã®ãã¹ãã©ã¯ã¿ããã¹ãŠå®è¡ããç¹å¥ãªã-ïŒvoidïŒ.cxx_destructãã¡ãœãã
éé ã
ãã®ããã«çæãããã-ïŒidïŒ.cxx_constructãããã³ã-ïŒvoidïŒ.cxx_destructãã¡ãœããã®ã¿
çŸåšã®Objective-Cã¯ã©ã¹ã§å®£èšãããŠããã€ã³ã¹ã¿ã³ã¹å€æ°ãæäœããŸãã
ã¹ãŒããŒã¯ã©ã¹ããç¶æ¿ãããŸãã Objective-Cã©ã³ã¿ã€ã ã®è²¬ä»»ã¯
ãªããžã§ã¯ãã®ç¶æ¿éå±€ã§ãã®ãããªãã¹ãŠã®ã¡ãœãããåŒã³åºããŸãã ã-ïŒidïŒ
.cxx_construct "ã¡ãœããã¯ãæ°ãããªããžã§ã¯ãã®çŽåŸã«ã©ã³ã¿ã€ã ã«ãã£ãŠåŒã³åºãããŸã
ã€ã³ã¹ã¿ã³ã¹ãå²ãåœãŠãããŸãã ã-ïŒvoidïŒ.cxx_destructãã¡ãœããã¯ããã«åŒã³åºãããŸã
ã©ã³ã¿ã€ã ããªããžã§ã¯ãã€ã³ã¹ã¿ã³ã¹ã®å²ãåœãŠã解é€ããåã
ãã®èšäºã®å·çæç¹ã§ã¯ãMac OS X10.4以éã®NeXTã©ã³ã¿ã€ã ã®ã¿ããµããŒããããŠããŸãã
ã-ïŒidïŒ.cxx_constructãããã³ã-ïŒvoidïŒ.cxx_destructãã¡ãœãããåŒã³åºããŸãã
-fobjc-çŽæ¥çºé
ã¡ãã»ãŒãžãã£ã¹ãããã£ãžã®é«éãžã£ã³ããèš±å¯ããŸãã ããŒãŠã£ã³ã§ã¯ãããã¯
éä¿¡ããŒãžã
-fobjc-äŸå€
Objective-Cã§æ§é åäŸå€åŠçã®æ§æãµããŒããæå¹ã«ããŸãã
C ++ãšJavaã«ãã£ãŠæäŸããããã®ã ãã®ãªãã·ã§ã³ã¯ãObjective-Cã䜿çšããããã«å¿ èŠã§ã
ããŒã¯ãŒã@ tryã@ throwã@ catchã@ finallyã@ synchronizedã ãã®ãªãã·ã§ã³ãå©çšå¯èœã§ã
GNUã©ã³ã¿ã€ã ãšNeXTã©ã³ã¿ã€ã ã®äž¡æ¹ã§ïŒãã ãã
Mac OS X 10.2以åã®NeXTã©ã³ã¿ã€ã ïŒã
-fobjc-gc
Objective-Cããã³Objective-C ++ããã°ã©ã ã§ã¬ããŒãžã³ã¬ã¯ã·ã§ã³ïŒGCïŒãæå¹ã«ããŸãã ãã®ãªãã·ã§ã³
NeXTã©ã³ã¿ã€ã ã§ã®ã¿äœ¿çšã§ããŸãã GNUã©ã³ã¿ã€ã ã«ã¯å¥ã®ã¬ããŒãžããããŸã
ç¹å¥ãªã³ã³ãã€ã©ãã©ã°ãå¿ èŠãšããªãã³ã¬ã¯ã·ã§ã³ã®å®è£ ã
-fobjc-nilcheck
ABIã®ããŒãžã§ã³2ã䜿çšããNeXTã©ã³ã¿ã€ã ã®å Žåãã¡ãœããã§nilã¬ã·ãŒããŒã確èªããŸã
å®éã®ã¡ãœããåŒã³åºããè¡ãåã®åŒã³åºãã ããã¯ããã©ã«ãã§ããã
ã䜿çšããŠç¡å¹ã«ãã -fno-objc-nilcheckã ã¯ã©ã¹ã¡ãœãããšã¹ãŒããŒã³ãŒã«ã¯ãã§ãã¯ãããŸãã
ãã®ãã©ã°ãäœã«èšå®ãããŠããŠãããã®ããã«nilã®å Žåã çŸåšããã®ãã©ã°ã¯
GNUã©ã³ã¿ã€ã ããŸãã¯å€ãããŒãžã§ã³ã®NeXTã©ã³ã¿ã€ã ABIã䜿çšãããŠããå Žåã¯äœããããŸããã
-fobjc-std = objc1
GCC1.0ã§èªèãããèšèªã§ããObjective-C4.0ã®èšèªæ§æã«æºæ ããŸãã
ããã¯ãC / C ++èšèªãžã®Objective-Cã®è¿œå ã«ã®ã¿åœ±é¿ããŸãã 圱é¿ã¯ãããŸãã
åå¥ã®C / C ++æ¹èšã«ãã£ãŠå¶åŸ¡ãããC / C ++æšæºãžã®æºæ
ãªãã·ã§ã³ãã©ã°ã ãã®ãªãã·ã§ã³ãObjective-CãŸãã¯Objective-C ++ã§äœ¿çšããå Žå
ã³ã³ãã€ã©ãŒãGCC4.0ã§èªèãããªãObjective-Cæ§æã¯æåŠãããŸãã ãã®
Objective-Cã³ãŒããã§ã³ã³ãã€ã«ã§ããããšã確èªããå¿ èŠãããå Žåã«äŸ¿å©ã§ã
GCCã®å€ãããŒãžã§ã³ã
-freplace-objc-classes
æ瀺ããç¹å¥ãªããŒã«ãŒãçºãã ld(1) çµæã®ãªããžã§ã¯ããéçã«ãªã³ã¯ããªã
ãã¡ã€ã«ãããã³èš±å¯ ãã€ã«ã(1) 代ããã«å®è¡æã«ããŒãããŸãã ããã¯ã§äœ¿çšãããŸã
Fix-and-Continueãããã°ã¢ãŒããšçµã¿åãããŠããªããžã§ã¯ããã¡ã€ã«ã
質åã¯ãããã°ã©ã ã®éçšã§åã³ã³ãã€ã«ããã³åçã«åããŒããããå ŽåããããŸã
ããã°ã©ã èªäœãåèµ·åããå¿ èŠãªãã«å®è¡ã çŸåšãFix-and-
ç¶è¡æ©èœã¯ãMacã®NeXTã©ã³ã¿ã€ã ãšçµã¿åãããå Žåã«ã®ã¿äœ¿çšã§ããŸã
OS X10.3以éã
-fzero-ãªã³ã¯
NeXTã©ã³ã¿ã€ã çšã«ã³ã³ãã€ã«ããå Žåãã³ã³ãã€ã©ãŒã¯éåžžã
"objc_getClassïŒ" ... "ïŒ"ïŒã³ã³ãã€ã«æã«ã¯ã©ã¹ã®ååãããã£ãŠããå ŽåïŒ
ããŒãæã«åæåãããéçã¯ã©ã¹åç §ãããã«ãããå®è¡æãæ¹åãããŸãã
ããã©ãŒãã³ã¹ã ã®æå® -fzero-ãªã³ã¯ ãã©ã°ã¯ãã®åäœãæå¶ããåå ãšãªããŸã
ãobjc_getClassïŒ "..."ïŒããžã®åŒã³åºãã¯ä¿æãããŸãã ããã¯ãŒããªã³ã¯ã§åœ¹ç«ã¡ãŸã
åã ã®ã¯ã©ã¹ã®å®è£ ãå€æŽã§ããããããããã°ã¢ãŒã
ããã°ã©ã å®è¡äžã GNUã©ã³ã¿ã€ã ã¯çŸåšãåžžã«ãžã®åŒã³åºããä¿æããŸã
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã«é¢ä¿ãªãã "objc_get_classïŒ" ... "ïŒ"ã
-gen-decls
ãœãŒã¹ãã¡ã€ã«ã«ãããã¹ãŠã®ã¯ã©ã¹ã®ã€ã³ã¿ãŒãã§ã€ã¹å®£èšãããšããååã®ãã¡ã€ã«ã«ãã³ãããŸã
ãœãŒã¹å.decl.
-Wassign-ã€ã³ã¿ãŒã»ãã ïŒObjective-Cããã³Objective-C ++ã®ã¿ïŒ
Objective-Cã®å²ãåœãŠãã¬ããŒãžã³ã¬ã¯ã¿ãŒã«ãã£ãŠã€ã³ã¿ãŒã»ããããããã³ã«èŠåããŸãã
-ãããã³ã«ãªã ïŒObjective-Cããã³Objective-C ++ã®ã¿ïŒ
ã¯ã©ã¹ããããã³ã«ãå®è£ ããããã«å®£èšãããŠããå Žåããã¹ãŠã®ã¡ãœããã«å¯ŸããŠèŠåãçºè¡ãããŸã
ã¯ã©ã¹ã«ãã£ãŠå®è£ ãããŠããªããããã³ã«ã§ã ããã©ã«ãã®åäœã¯
ã¯ã©ã¹ã«æ瀺çã«å®è£ ãããŠããªããã¹ãŠã®ã¡ãœããã«å¯ŸããŠèŠåãçºè¡ããŸãã
ã¡ãœããã®å®è£ ã¯ã¹ãŒããŒã¯ã©ã¹ããç¶æ¿ãããŸãã ã䜿çšããå Žå -ãããã³ã«ãªã
ãªãã·ã§ã³ã®å Žåãã¹ãŒããŒã¯ã©ã¹ããç¶æ¿ãããã¡ãœããã¯å®è£ ãããŠãããšèŠãªãããŸãã
èŠåã¯åºãããŸããã
-Wã»ã¬ã¯ã¿ãŒ ïŒObjective-Cããã³Objective-C ++ã®ã¿ïŒ
åãã»ã¬ã¯ã¿ãŒã«å¯ŸããŠç°ãªãã¿ã€ãã®è€æ°ã®ã¡ãœãããäžã«èŠã€ãã£ãå Žåã«èŠåããŸã
ã³ã³ãã€ã«ã ãã§ãã¯ã¯ãã®æçµæ®µéã§ã¡ãœããã®ãªã¹ãã«å¯ŸããŠå®è¡ãããŸãã
ã³ã³ãã€ã«ã ããã«ãã«è¡šç€ºãããã»ã¬ã¯ã¿ãŒããšã«ãã§ãã¯ãå®è¡ãããŸãã
ã@selectorïŒ...ïŒãåŒãããã³ãã®ã»ã¬ã¯ã¿ãŒã«å¯Ÿå¿ããã¡ãœããã¯
ã³ã³ãã€ã«äžã«èŠã€ãããŸããã ãããã®ãã§ãã¯ã¯æåŸã«ã®ã¿ã¡ãœããããŒãã«ãã¹ãã£ã³ãããã
ã³ã³ãã€ã«ã®æçµæ®µéã次ã®å Žåããããã®èŠåã¯çæãããŸããã
ã³ã³ãã€ã«äžã«ãšã©ãŒãèŠã€ãã£ãããããŸãã¯
-fsyntaxã®ã¿ ãªãã·ã§ã³ã䜿çšãããŠããŸãã
-Wstrict-selector-match ïŒObjective-Cããã³Objective-C ++ã®ã¿ïŒ
åŒæ°ãæ»ãå€ã®ã¿ã€ããç°ãªãè€æ°ã®ã¡ãœãããèŠã€ãã£ãå Žåã«èŠåããŸãã
ãã®ã»ã¬ã¯ã¿ãŒã䜿çšããŠã¡ãã»ãŒãžãéä¿¡ããããšãããšãã«æå®ãããã»ã¬ã¯ã¿ãŒ
ãidããŸãã¯ãClassããšå ¥åããŸãã ãã®ãã©ã°ããªãã®å ŽåïŒããã¯ããã©ã«ãã®åäœã§ãïŒã
èŠã€ãã£ãéããå ±æããåã«éå®ãããŠããå Žåãã³ã³ãã€ã©ã¯ãã®ãããªèŠåãçç¥ããŸã
åããµã€ãºãšé 眮ã
-Wundeclared-ã»ã¬ã¯ã¿ãŒ ïŒObjective-Cããã³Objective-C ++ã®ã¿ïŒ
宣èšãããŠããªãã»ã¬ã¯ã¿ãŒãåç §ããã@selectorïŒ...ïŒãåŒãèŠã€ãã£ãå Žåã«èŠåããŸãã A
ãã®ååã®ã¡ãœããã以åã«å®£èšãããŠããªãå Žåãã»ã¬ã¯ã¿ãŒã¯å®£èšãããŠããªããšèŠãªãããŸã
ã@selectorïŒ...ïŒãåŒã@ interfaceãŸãã¯@protocolã§æ瀺çã«
宣èšããŸãã¯æé»çã«@implementationã»ã¯ã·ã§ã³ã§ã ãã®ãªãã·ã§ã³ã¯åžžã«å®è¡ããŸã
ã@selectorïŒ...ïŒãåŒãèŠã€ãããšããã«ãã§ãã¯ããŸãã -Wã»ã¬ã¯ã¿ãŒ ã®
ã³ã³ãã€ã«ã®æçµæ®µéã§ãã§ãã¯ãå®è¡ããŸãã ããã«ãããã³ãŒãã£ã³ã°ã匷å¶ãããŸã
ã¡ãœãããšã»ã¬ã¯ã¿ãŒã䜿çšããåã«å®£èšããå¿ èŠããããšããã¹ã¿ã€ã«èŠåã
-print-objc-ã©ã³ã¿ã€ã æ å ±
å€ã«ãã£ãŠæž¡ãããæ倧ã®æ§é ãèšè¿°ããCããããŒãããã°ããããçæããŸãã
ãªãã·ã§ã³ ã㞠管ç 蚺æç ã¡ãã»ãŒãž æžåŒèšå®
åŸæ¥ã蚺æã¡ãã»ãŒãžã¯åºåããã€ã¹ã«é¢ä¿ãªããã©ãŒããããããŠããŸãã
ã¢ã¹ãã¯ãïŒäŸãã°ããã®å¹ ã...ïŒã 以äžã«èª¬æãããªãã·ã§ã³ã䜿çšããŠã
蚺æã¡ãã»ãŒãžã®ãã©ãŒãããã¢ã«ãŽãªãºã ãããšãã°ãXNUMXè¡ãããã®æåæ°ãé »åºŠ
ãœãŒã¹ã®å Žææ å ±ãå ±åããå¿ èŠããããŸãã äžéšã®èšèªã®ããã³ããšã³ãã¯
ãããã®ãªãã·ã§ã³ãå°éããªãã§ãã ããã
-fmessage-length =n
ãšã©ãŒã¡ãã»ãŒãžãçŽXNUMXè¡ã«åãŸãããã«ãã©ãŒãããããŠã¿ãŠãã ãã n æåã ã¶ã»
ããã©ã«ãã¯72æåã§ã g ++ ã«ãã£ãŠãµããŒããããæ®ãã®ããã³ããšã³ãã®å Žåã¯0
GCCã ããã n ããŒãã®å Žåãè¡ã®æãè¿ãã¯è¡ãããŸããã åãšã©ãŒã¡ãã»ãŒãžã¯ã«è¡šç€ºãããŸã
åç·ã
-fdiagnostics-show-location = once
è¡æãè¿ãã¢ãŒãã§ã®ã¿æå³ããããŸãã 蚺æã¡ãã»ãŒãžã¬ããŒã¿ãŒã«æ¬¡ã®ããã«æ瀺ããŸã
ãœãŒã¹ã®äœçœ®æ å ±ãåºåãã ãã€ãŠ; ã€ãŸããã¡ãã»ãŒãžãé·ãããŠåãŸããªãå Žå
åäžã®ç©çã©ã€ã³äžã§ã©ããããå¿ èŠãããå ŽåããœãŒã¹ã®å Žæã¯åºåãããŸãã
ïŒæ¥é èŸãšããŠïŒåŸç¶ã®ç¶ç¶è¡ã§äœåºŠãäœåºŠãç¹°ãè¿ããŸãã ããã¯
ããã©ã«ãã®åäœã
-fdiagnostics-show-location = every-line
è¡æãè¿ãã¢ãŒãã§ã®ã¿æå³ããããŸãã 蚺æã¡ãã»ãŒãžã¬ããŒã¿ãŒã«æ¬¡ã®ããã«æ瀺ããŸã
çµæãšããŠçããç©çåç·ã«å¯ŸããŠïŒãã¬ãã£ãã¯ã¹ãšããŠïŒåããœãŒã¹ãã±ãŒã·ã§ã³æ å ±ãéä¿¡ããŸã
é·ãããŠXNUMXè¡ã«åãŸããªãã¡ãã»ãŒãžãå£ãããã»ã¹ããã
-fdiagnostics-color [=WHEN]
-fno-蚺æè²
蚺æã«ã¯è²ã䜿çšããŸãã WHEN is 決ããŠ, åžžã«ãŸã㯠ãªãŒãã ããã©ã«ã㯠決ã㊠if
GCC_COLORS ç°å¢å€æ°ãç°å¢ã«ååšããã ãªãŒã ãããªããšã
ãªãŒã æšæºãšã©ãŒã端æ«ã§ããå Žåã«ã®ã¿è²ã䜿çšããããšãæå³ããŸãã ãã©ãŒã
-fdiagnostics-color ãš -fno-蚺æè² ã®ãšã€ãªã¢ã¹ã§ã
-fdiagnostics-color =åžžã« ãš -fdiagnostics-color = neverããããã
è²ã¯ç°å¢å€æ°ã«ãã£ãŠå®çŸ©ãããŸã GCC_COLORSã ãã®å€ã¯ã³ãã³ã§ã-
æ©èœã®åå¥ã®ãªã¹ããšã°ã©ãã£ãã¯ã¬ã³ãã£ã·ã§ã³ïŒSGRïŒãµãã¹ããªã³ã°ã®éžæã SGR
ã³ãã³ãã¯ãã¿ãŒããã«ãŸãã¯ã¿ãŒããã«ãšãã¥ã¬ãŒã¿ã«ãã£ãŠè§£éãããŸãã ïŒã®ã»ã¯ã·ã§ã³ãåç §ããŠãã ãã
èš±å¯ãããå€ãšãã®æå³ã«ã€ããŠã®ããã¹ã端æ«ã®ããã¥ã¡ã³ã
æåå±æ§ãïŒãããã®ãµãã¹ããªã³ã°å€ã¯ãXNUMXé²è¡šçŸã®æŽæ°ã§ãã
ã»ãã³ãã³ãšé£çµã§ããŸãã é£çµããäžè¬çãªå€ã¯æ¬¡ã®ãšããã§ãã 1 for
倧èãªã 4 äžç·ã«ã€ããŠã¯ã 5 ãŸã°ããã®ããã«ã 7 éã®å Žåã 39 ããã©ã«ãã®åæ¯è²ã®å Žåã 30
ããž 37 åæ¯è²ã®å Žåã 90 ããž 97 16è²ã¢ãŒãã®åæ¯è²ã®å Žåã 38; 5; 0 ããž
38; 5; 255 88è²ããã³256è²ã¢ãŒãã®åæ¯è²ã®å Žåã 49 ããã©ã«ãã®èæ¯
è²ã 40 ããž 47 èæ¯è²ã«ã€ããŠã¯ã 100 ããž 107 16è²ã¢ãŒãã®èæ¯è²ã®å Žåã
ãš 48; 5; 0 ããž 48; 5; 255 88è²ããã³256è²ã¢ãŒãã®èæ¯è²çšã
ããã©ã«ã GCC_COLORS is
error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01 ã³ã©ãã¬ãŒ 01ã31 倪åã§ã
èµ€ã 01ã35 倧èãªããŒã³ã¿ã 01ã36 倧èãªã·ã¢ã³ã§ãã 01ã32 倧èãªç·è²ã§ 01 倪åã§ãã
èšå® GCC_COLORS 空ã®æååã«å€æŽãããšãè²ãç¡å¹ã«ãªããŸãã ãµããŒããããŠããæ©èœã¯æ¬¡ã®ãšããã§ã
ç¶ãã
"ãšã©ãŒ="
ãšã©ãŒã®SGRãµãã¹ããªã³ã°ïŒããŒã«ãŒã
"èŠå="
èŠåã®SGRãµãã¹ããªã³ã°ïŒããŒã«ãŒã
"note ="
泚ã®SGRãµãã¹ããªã³ã°ïŒããŒã«ãŒã
"ãã£ã¬ãã="
ã«ã¬ããã©ã€ã³ã®SGRãµãã¹ããªã³ã°ã
"locus ="
äœçœ®æ å ±ã®SGRãµãã¹ããªã³ã°ã fileïŒline or fileïŒlineïŒcolumn çã
"quote ="
åŒçšç¬Šã§å²ãŸããæ å ±ã®SGRãµãã¹ããªã³ã°ã
-fno-diagnostics-show-option
ããã©ã«ãã§ã¯ãçºè¡ãããå蚺æã«ã¯ãã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã瀺ãããã¹ããå«ãŸããŠããŸã
蚺æãçŽæ¥å¶åŸ¡ããŸãïŒãã®ãããªãªãã·ã§ã³ã蚺æã«ç¥ãããŠããå Žå
æ©æ¢°ïŒã ã®æå® -fno-diagnostics-show-option ãã©ã°ã¯ãããæå¶ããŸã
è¡åã
-fno-diagnostics-show-caret
ããã©ã«ãã§ã¯ãçºè¡ãããå蚺æã«ã¯ãå ã®ãœãŒã¹è¡ãšãã£ã¬ãã '^'ãå«ãŸããŸã
åã瀺ããŸãã ãã®ãªãã·ã§ã³ã¯ããã®æ å ±ãæå¶ããŸãã
ãªãã·ã§ã³ ããž ãªã¯ãšã¹ã or æå¶ãã èŠå
èŠåã¯ãæ¬è³ªçã«ã§ã¯ãªãæ§é ãå ±åãã蚺æã¡ãã»ãŒãžã§ãã
ãšã©ãŒããããŸãããããã¯å±éºã§ãããããšã©ãŒããã£ãå¯èœæ§ãããããšã瀺åããŠããŸãã
次ã®èšèªã«äŸåããªããªãã·ã§ã³ã¯ãç¹å®ã®èŠåãæå¹ã«ããŸãããã
GCCã«ãã£ãŠçæããã蚺æã®çš®é¡ã
-fsyntaxã®ã¿
ã³ãŒãã«æ§æãšã©ãŒããªãã確èªããŸããããã以äžã®ããšã¯ããªãã§ãã ããã
-fmax-errors =n
ãšã©ãŒã¡ãã»ãŒãžã®æ倧æ°ãã«å¶éããŸã nããã®æç¹ã§GCCã¯ããããã€ã«ã¢ãŠãããŸã
ãœãŒã¹ã³ãŒãã®åŠçãç¶è¡ããããšãããããã ããã n 0ïŒããã©ã«ãïŒã
çæããããšã©ãŒã¡ãã»ãŒãžã®æ°ã«å¶éã¯ãããŸããã ããã -Wfatal-ãšã©ãŒ ã
æå®ããŠãã -Wfatal-ãšã©ãŒ ãã®ãªãã·ã§ã³ãããåªå ãããŸãã
-w ãã¹ãŠã®èŠåã¡ãã»ãŒãžãçŠæ¢ããŸãã
-ãšã©ãŒ
ãã¹ãŠã®èŠåããšã©ãŒã«ããŸãã
-ãšã©ãŒ=
æå®ãããèŠåããšã©ãŒã«ããŸãã èŠåã®æå®åãè¿œå ãããŸãã
äŸãã° -Werror = switch ã«ãã£ãŠå¶åŸ¡ãããèŠåããªã³ã«ããŸã -Wã¹ã€ãã ãšã©ãŒã«ã
ãã®ã¹ã€ããã¯åŠå®çãªåœ¢åŒãåããåŠå®ããããã«äœ¿çšãããŸã -ãšã©ãŒ ç¹å®ã®èŠåã«ã€ããŠ;
äŸãã° -Wno-error = switch MAKES -Wã¹ã€ãã èŠåã¯ãšã©ãŒã§ã¯ãããŸãã -ãšã©ãŒ
æå¹ã§ãã
å¶åŸ¡å¯èœãªåèŠåã®èŠåã¡ãã»ãŒãžã«ã¯ãå¶åŸ¡ãããªãã·ã§ã³ãå«ãŸããŠããŸã
èŠåã ãã®ãªãã·ã§ã³ã¯ã -ãšã©ãŒ= ãš -Wno-error = 説æããããã«
ãã®äžã ïŒèŠåã¡ãã»ãŒãžã®ãªãã·ã§ã³ã®å°å·ã¯ã
-fno-diagnostics-show-option åœæãïŒ
æå®ããããšã«æ³šæããŠãã ãã -ãšã©ãŒ=foo èªåçã«æå³ããŸã -Wfooã ãããã -Wno-error =foo
äœãæå³ããŸããã
-Wfatal-ãšã©ãŒ
ãã®ãªãã·ã§ã³ã«ãããã³ã³ãã€ã©ã¯æåã®ãšã©ãŒãçºçãããšãã«ã³ã³ãã€ã«ãäžæ¢ããŸã
ç¶è¡ããŠããã«ãšã©ãŒã¡ãã»ãŒãžãåºåããããšããã®ã§ã¯ãªãã
ããªãã¯ã§å§ãŸããªãã·ã§ã³ã§å€ãã®ç¹å®ã®èŠåãèŠæ±ããããšãã§ããŸã -WäŸãã°ã
-æé»ã®äºè§£ æé»ã®å®£èšã«é¢ããèŠåãèŠæ±ããŸãã ãããã®ç¹å®ã®èŠåã®ãããã
ãªãã·ã§ã³ãè² ã®åœ¢åŒã§å§ãŸããŸã -ããã- èŠåããªãã«ããŸãã äŸãã°ã
-æé»çã ãã®ããã¥ã¢ã«ã«ã¯ãXNUMXã€ã®åœ¢åŒã®ãã¡ãããã©ã«ãã§ã¯ãªãæ¹ã®ã¿ãèšèŒãããŠããŸãã
èšèªåºæã®ãªãã·ã§ã³ã®è©³çŽ°ã«ã€ããŠã¯ã以äžãåç §ããŠãã ããã C + + æ¹èš ãªãã·ã§ã³ ãš ãªããžã§ã¯ãã£ãC
ãš Objective-C ++ æ¹èš ãªãã·ã§ã³.
èªèãããªãèŠåãªãã·ã§ã³ãèŠæ±ãããå ŽåïŒäŸïŒ -äžæ-èŠåïŒãGCCã¯
ãªãã·ã§ã³ãèªèãããªãããšã瀺ã蚺æã ãã ãã -ããã- ãã©ãŒã ã䜿çšããã
åäœã¯ãããã«ç°ãªããŸãã蚺æã¯çæãããŸãã -ããããªã-èŠå
ä»ã®èšºæãäœæãããŠããªãéãã ããã«ãããæ°ãããã®ã䜿çšã§ããŸã -ããã- ãªãã·ã§ã³
å€ãã³ã³ãã€ã©ã䜿çšããŸãããåé¡ãçºçããå Žåãã³ã³ãã€ã©ã¯èªèãããªãããšãèŠåããŸã
ãªãã·ã§ã³ããããŸãã
-Wpedantic
-è¡åŠè
å³å¯ãªISOCããã³ISOC ++ã§èŠæ±ããããã¹ãŠã®èŠåãçºè¡ããŸãã 次ã®ãããªãã¹ãŠã®ããã°ã©ã ãæåŠãã
çŠæ¢ãããŠããæ¡åŒµæ©èœãããã³ISOCããã³ISOã«æºæ ããŠããªããã®ä»ã®ããã°ã©ã ã䜿çšãã
C ++ã ISO Cã®å Žåãä»»æã®ã§æå®ãããISOCæšæºã®ããŒãžã§ã³ã«åŸããŸãã -æšæº
䜿çšããããªãã·ã§ã³ã
æå¹ãªISOCããã³ISOC ++ããã°ã©ã ã¯ããã®ãªãã·ã§ã³ã®æç¡ã«ãããããæ£ããã³ã³ãã€ã«ããå¿ èŠããããŸã
ïŒãŸããªå°æ°ãå¿ èŠã§ãã -ã¢ã³ã· ãŸã㯠-æšæº ã®å¿ èŠãªããŒãžã§ã³ãæå®ãããªãã·ã§ã³
ISO CïŒã ãã ãããã®ãªãã·ã§ã³ããªããšãç¹å®ã®GNUæ¡åŒµæ©èœãšåŸæ¥ã®Cããã³
C ++æ©èœããµããŒããããŠããŸãã ãã®ãªãã·ã§ã³ã䜿çšãããšãæåŠãããŸãã
-Wpedantic 代æ¿ããŒã¯ãŒãã®äœ¿çšã«é¢ããèŠåã¡ãã»ãŒãžã¯è¡šç€ºãããŸããã
ååã®å§ãŸããšçµãã __ã è¡åŠçèŠåãåŒã§ç¡å¹ã«ãªã£ãŠããŸã
ã__extension__ãã«ç¶ãã ãã ãããããã䜿çšããå¿ èŠãããã®ã¯ã·ã¹ãã ããããŒãã¡ã€ã«ã®ã¿ã§ã
è±åºã«ãŒã; ã¢ããªã±ãŒã·ã§ã³ããã°ã©ã ã¯ããããé¿ããã¹ãã§ãã
äžéšã®ãŠãŒã¶ãŒã¯äœ¿çšããããšããŸã -Wpedantic ããã°ã©ã ãISOCã«å³å¯ã«æºæ ããŠãããã©ããã確èªããŸãã 圌ã
ããã«ãããã圌ããæãã§ããããšãå®å šã«å®è¡ããŠããªãããšã«æ°ä»ããŸããããã¯ãããã€ãã®éISOæ £è¡ãèŠã€ããŸãã
ãã¹ãŠã§ã¯ãããŸãã--- ISOCã®å¯Ÿè±¡ãšãªããã®ã®ã¿ å¿ èŠ èšºæãããã³ä»ã®ããã€ãã®
ã©ã®èšºæãè¿œå ãããŸãããã
ISO Cã«æºæ ããŠããªãããšãå ±åããæ©èœã¯ãå Žåã«ãã£ãŠã¯åœ¹ç«ã€å ŽåããããŸãã
ããããããªãã®è¿œå äœæ¥ãå¿ èŠã«ãªãã
-Wpedanticã è¿ãå°æ¥ããã®ãããªæ©èœããµããŒãããäºå®ã¯ãããŸããã
ã§æå®ãããèŠæ Œ -æšæº Cã®GNUæ¡åŒµæ¹èšãè¡šããŸãã
ããŒ90 or ããŒ99ã察å¿ãããã®ããããŸã ããŒã¹ æšæºãISOCã®ããŒãžã§ã³
GNUæ¡åŒµæ¹èšãåºã¥ããŠããŸãã ããã®èŠå -Wpedantic 圌ãããããšããã«äžããããŸã
åºæ¬èŠæ Œã§èŠæ±ãããŸãã ïŒãã®ãããªèŠåãåºãããã®ã¯æå³ããããŸãã
å®çŸ©äžGNUã§ãããããæå®ãããGNUCæ¹èšã«ãªãæ©èœã®å Žåã®ã¿
Cã®æ¹èšã«ã¯ãã³ã³ãã€ã©ãæå®ããããªãã·ã§ã³ã§ãµããŒããããã¹ãŠã®æ©èœãå«ãŸããŠããŸãã
èŠåãããã®ã¯äœããããŸãããïŒ
-è¡åŠçãšã©ãŒ
ããã -Wpedanticãã ããèŠåã§ã¯ãªããšã©ãŒãçæãããŸãã
-å£
ããã«ãããäžéšã®ãŠãŒã¶ãŒãæ€èšããæ§é ã«é¢ãããã¹ãŠã®èŠåãæå¹ã«ãªããŸã
çãããããããŠããã¯é¿ããããïŒãŸãã¯èŠåãé²ãããã«ä¿®æ£ããïŒ
ãã¯ããšçµã¿åãããŠã ããã«ããã説æãããŠããèšèªåºæã®èŠåãæå¹ã«ãªããŸã
in C + + æ¹èš ãªãã·ã§ã³ ãš ãªããžã§ã¯ãã£ãC ãš Objective-C ++ æ¹èš ãªãã·ã§ã³.
-å£ æ¬¡ã®èŠåãã©ã°ããªã³ã«ããŸãã
-äœæ -Warray å¢ç ïŒã®ã¿ -O2) -Wc ++ 11-äºææ§ -Wchar-æ·»ãå
-ãŠã§ãã -æ¯èŒ ïŒC / ObjCã®å Žåãããã¯C ++ã§ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãïŒ -Wimplicit-int ïŒCããã³
Objective-Cã®ã¿ïŒ -Wimplicit é¢æ°å®£èš ïŒCããã³Objective-Cã®ã¿ïŒ -ã³ã¡ã³ã
-Wãã©ãŒããã -Wã¡ã€ã³ ïŒC / ObjCã®å Žåã®ã¿ã -èªç«) -ãããã-åæåãããŠããŸãã
-äžæ¬åŒ§ããããŸãã ïŒC / ObjCã®ã¿ïŒ -éãã« -Wopenmp-simd -ãã£ã
-Wpointer ãµã€ã³ -ãªãªãŒã㌠-Wreturnã¿ã€ã -Wã·ãŒã±ã³ã¹ãã€ã³ã -Wsign-æ¯èŒ ïŒC ++ã®ã¿ïŒ
-Wstrict-ãšã€ãªã¢ã·ã³ã° -Wstrict-overflow = 1 -Wã¹ã€ãã -çæå -åæåãããŠããŸãã
-äžæ-ãã©ã°ã -æªäœ¿çšæ©èœ -Wunused-ã¬ãŒãã« -æªäœ¿çšå€ -Wunused-å€æ°
-Wvolatile ã¬ãžã¹ã¿å€æ°
äžéšã®èŠåãã©ã°ã¯ãã«ãã£ãŠæ瀺ãããŠããªãããšã«æ³šæããŠãã ãã -å£ã ãããã®ããã€ãã¯èŠåããŸã
ãŠãŒã¶ãŒãäžè¬çã«çããããšã¯æããªããã
æã ããªãã¯ãã§ãã¯ããããããããŸããã ä»ã®äººã¯ã
å Žåã«ãã£ãŠã¯åé¿ããå¿ èŠããããå°é£ã§ãããå€æŽããç°¡åãªæ¹æ³ã¯ãããŸãã
èŠåãæå¶ããã³ãŒãã ãããã®ããã€ãã¯ã«ãã£ãŠæå¹ã«ãªããŸã -ãŠã§ã¯ã¹ãã© ããããããã®å€ãã¯
åå¥ã«æå¹ã«ããå¿ èŠããããŸãã
-ãŠã§ã¯ã¹ãã©
ããã«ãããã«ãã£ãŠæå¹ã«ãããªãããã€ãã®è¿œå ã®èŠåãã©ã°ãæå¹ã«ãªããŸã -å£ã ïŒãã®ãªãã·ã§ã³ã¯äœ¿çšãããŸã
åŒã°ãã -Wã å€ãååã¯åŒãç¶ããµããŒããããŸãããæ°ããååã®æ¹ãå€ããªããŸã
説æçã§ããïŒ
-ç Žå£ããã -空ã£ãœã®äœ -ç¡èŠ-修食å -äžè¶³ãã£ãŒã«ãåæåå
-æ¬ èœãã©ã¡ãŒã¿ã®çš®é¡ ïŒCã®ã¿ïŒ -Wold ã¹ã¿ã€ã«å®£èš ïŒCã®ã¿ïŒ -Woverride-init
-Wsign-æ¯èŒ -Wtype-limits -åæåãããŠããŸãã -Wunused-ãã©ã¡ãŒã¿ ïŒã®ã¿ -æªäœ¿çš or
-å£) -䜿çšãããŠããªãããã©ã¡ãŒã¿ãèšå® ïŒã®ã¿ -æªäœ¿çš or -å£)
ãªãã·ã§ã³ -ãŠã§ã¯ã¹ãã© ãŸãã次ã®å Žåã®èŠåã¡ãã»ãŒãžãåºåããŸãã
ã»ãã€ã³ã¿ã¯æŽæ°ãŒããšæ¯èŒãããŸãã <, <=, >ãŸã㯠>=.
ã»ïŒC ++ã®ã¿ïŒåæåãšéåæåã®äž¡æ¹ãæ¡ä»¶ä»ãã§è¡šç€ºãããŸã
åŒã§ãã
ã»ïŒC ++ã®ã¿ïŒãããŸããªä»®æ³ããŒã¹ã
ã»ïŒC ++ã®ã¿ïŒå®£èšãããé åã®æ·»ãå ç»é².
ã»ïŒC ++ã®ã¿ïŒå®£èšãããå€æ°ã®ã¢ãã¬ã¹ãååŸãã ç»é².
ã»ïŒC ++ã®ã¿ïŒåºæ¬ã¯ã©ã¹ã¯ã掟çã¯ã©ã¹ã®ã³ããŒã³ã³ã¹ãã©ã¯ã¿ãŒã§åæåãããŸããã
-Wchar-æ·»ãå
é åã®æ·»ãåã®ã¿ã€ãããcharãã®å Žåã«èŠåããŸãã ããã¯ãšã©ãŒã®äžè¬çãªåå ã§ãã
ããã°ã©ããŒã¯ããã®ã¿ã€ããäžéšã®ãã·ã³ã§çœ²åãããŠããããšãå¿ããã¡ã§ãã ãã®èŠåã¯
æå¹ã«ãã -å£.
-ã³ã¡ã³ã
ã³ã¡ã³ãéå§ã·ãŒã±ã³ã¹ãçºçãããã³ã«èŠåãã /* ã«è¡šç€ºãããŸã /* ã³ã¡ã³ãããŸãã¯ãã€ã§ã
ããã¯ã¹ã©ãã·ã¥-æ¹è¡ã¯ // ã³ã¡ã³ãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wno-coverage-mismatch
ã䜿çšãããšãã«ãã£ãŒãããã¯ãããã¡ã€ã«ãäžèŽããªãå Žåã«èŠåãã -fprofile-äœ¿çš ãªãã·ã§ã³ã ãã
ãœãŒã¹ãã¡ã€ã«ã¯ãã³ã³ãã€ã«éã§å€æŽãããŸã -fprofile-gen ãšãš -fprofile-䜿çš,
ãããã¡ã€ã«ãã£ãŒãããã¯ã®ãããã¡ã€ã«ã¯ãœãŒã¹ãã¡ã€ã«ãšäžèŽããªãå¯èœæ§ããããGCCã¯äžèŽããªãå¯èœæ§ããããŸã
ãããã¡ã€ã«ãã£ãŒãããã¯æ å ±ã䜿çšããŸãã ããã©ã«ãã§ã¯ããã®èŠåã¯æå¹ã«ãªã£ãŠããã
ãšã©ãŒãšããŠæ±ãããŸãã -Wno-coverage-mismatch èŠåãç¡å¹ã«ããããã«äœ¿çšã§ããŸããŸãã¯
-Wno-error = coverage-mismatch ãšã©ãŒãç¡å¹ã«ããããã«äœ¿çšã§ããŸãã ãšã©ãŒãç¡å¹ã«ãã
ãã®èŠåã¯ãã³ãŒãã®æé©åãäžååã«ãªãå¯èœæ§ãããã次ã®å Žåã«ã®ã¿åœ¹ç«ã¡ãŸãã
æ¢åã®ã³ãŒãããŒã¹ã®ãã°ä¿®æ£ãªã©ãããããããªå€æŽã å®å šã«ç¡å¹ã«ãã
èŠåã¯ãå§ãããŸããã
-Wno-cpp
ïŒCãObjective-CãC ++ãObjective-C ++ããã³Fortranã®ã¿ïŒ
ã#warningããã£ã¬ã¯ãã£ãã«ãã£ãŠçºè¡ãããèŠåã¡ãã»ãŒãžãæå¶ããŸãã
-Wdouble-ããã¢ãŒã·ã§ã³ ïŒCãC ++ãObjective-Cããã³Objective-C ++ã®ã¿ïŒ
ã¿ã€ããfloatãã®å€ãæé»çã«ãdoubleãã«ããã¢ãŒãããããšãã«èŠåãåºããŸãã CPU
32ãããã®ãå粟床ãæµ®åå°æ°ç¹ãŠãããã䜿çšãããšãããŒããŠã§ã¢ã«ãæµ®åå°æ°ç¹ããå®è£ ãããŸãã
ãããããœãããŠã§ã¢ã§ãdoubleãããšãã¥ã¬ãŒãããŸãã ãã®ãããªãã·ã³ã§ãã䜿çšããŠèšç®ãè¡ã
ãdoubleãå€ã¯ããœãããŠã§ã¢ã«å¿ èŠãªãªãŒããŒãããã®ãããã¯ããã«é«äŸ¡ã§ã
ãšãã¥ã¬ãŒã·ã§ã³ã
æµ®åå°æ°ç¹ã®ããã誀ã£ãŠãdoubleãã䜿çšããŠèšç®ãè¡ãã®ã¯ç°¡åã§ãã
ãªãã©ã«ã¯æé»çã«ãdoubleãåã§ãã ããšãã°ã次ã®ããã«ãªããŸãã
ãããŒãé¢ç©ïŒãããŒãååŸïŒ
{
3.14159 *ååŸ*ååŸãè¿ããŸãã
}
æµ®åå°æ°ç¹ã®ãããã³ã³ãã€ã©ã¯ãdoubleãã䜿çšããŠèšç®å šäœãå®è¡ããŸãã
ãªãã©ã«ã¯ãããã«ãã§ãã
-Wãã©ãŒããã
-Wformat =n
ãprintfãããscanfããªã©ã®åŒã³åºãããã§ãã¯ããŠãåŒæ°ãæå®ãããŠããããšã確èªããŸã
æå®ããããã©ãŒãããæååã«é©ããã¿ã€ããæã¡ãå€æã
ãã©ãŒãããæååã§æå®ããã®ã¯çã«ããªã£ãŠããŸãã ããã«ã¯æšæºæ©èœãå«ãŸãã
ãprintfãããscanfãããstrftimeããããã³
ãstrfmonãïŒCæšæºã§ã¯ãªãX / Openæ¡åŒµïŒãã¡ããªïŒãŸãã¯ä»ã®ã¿ãŒã²ãã-
ç¹å®ã®å®¶æïŒã ãã©ãŒãããå±æ§ãèšå®ãããŠããªãç¶æ ã§ãã§ãã¯ãããé¢æ°
æå®ãããã®ã¯ãéžæãããæšæºããŒãžã§ã³ãããã³ãã®ãããªæ©èœã®ãã§ãã¯ã«ãã£ãŠç°ãªããŸã
å±æ§ãæå®ãããŠããªãå Žåã -èªç« or -fno-builtin.
ãã©ãŒãããã¯ãGNUlibcããŒãžã§ã³2.2ã§ãµããŒããããŠãããã©ãŒãããæ©èœãšç §åãããŸãã
ãããã«ã¯ããã¹ãŠã®ISO C90ããã³C99æ©èœãããã³SingleUnixã®æ©èœãå«ãŸããŸãã
ä»æ§ãšããã€ãã®BSDããã³GNUæ¡åŒµã ä»ã®ã©ã€ãã©ãªã®å®è£ ã¯ããã§ã¯ãªããããããŸãã
ããããã¹ãŠã®æ©èœããµããŒãããŸãã GCCã¯ããããè¶ ããæ©èœã«é¢ããèŠåããµããŒãããŠããŸãã
ç¹å®ã®ã©ã€ãã©ãªã®å¶éã ãã ãã -Wpedantic ãšäžç·ã«äœ¿çšãããŸã -Wãã©ãŒããã,
éžæããæšæºããŒãžã§ã³ã«ãªããã©ãŒãããæ©èœã«ã€ããŠèŠåã衚瀺ãããŸãïŒãã ãã
ãstrfmonã圢åŒã®å Žåããããã¯Cæšæºã®ã©ã®ããŒãžã§ã³ã«ãå«ãŸããŠããªãããïŒã
-Wformat = 1
-Wãã©ãŒããã
ãªãã·ã§ã³ -Wãã©ãŒããã ã«çžåœããŸã -Wformat = 1, -Wnoåœ¢åŒ ã«çžåœããŸã
-Wformat = 0ã ãã -Wãã©ãŒããã ãŸããããã€ãã®null圢åŒã®åŒæ°ããã§ãã¯ããŸã
æ©èœã -Wãã©ãŒããã ãŸãæå³ããŸã -éãã«ã ãã®ã¬ãã«ã®ãã©ãŒãããã®ããã€ãã®åŽé¢
ãã§ãã¯ã¯ãªãã·ã§ã³ã§ç¡å¹ã«ã§ããŸãïŒ -Wno-format-contains-null,
-Wno-format-extra-args, -Wno-format-zero-length. -Wãã©ãŒããã ã«ãã£ãŠæå¹ã«ãªããŸã
-å£.
-Wno-format-contains-null
If -Wãã©ãŒããã ãæå®ãããŠããå ŽåãNULãã€ããå«ããã©ãŒãããæååã«ã€ããŠèŠåããªãã§ãã ããã
-Wno-format-extra-args
If -Wãã©ãŒããã ãæå®ãããŠããå ŽåããprintfããŸãã¯ãprintfããžã®éå°ãªåŒæ°ã«ã€ããŠèŠåããªãã§ãã ããã
ãscanfããã©ãŒãããé¢æ°ã Cæšæºã§ã¯ããã®ãããªåŒæ°ã¯æ¬¡ã®ããã«æå®ãããŠããŸãã
ç¡èŠãããŸãã
æªäœ¿çšã®åŒæ°ããã§æå®ããã䜿çšæžã¿ã®åŒæ°ã®éã«ããå Žå $
ãªãã©ã³ãçªå·ã®æå®ã§ã¯ãéåžžã¯èŠåã衚瀺ãããŸãã
å®è£ ã¯ãæªäœ¿çšãã¹ãããããããã«ãva_argãã«æž¡ãã¿ã€ããç¥ãããšãã§ããŸããã§ãã
åŒæ°ã ãã ãããscanfã圢åŒã®å Žåããã®ãªãã·ã§ã³ã¯
ã·ã³ã°ã«Unix以éãæªäœ¿çšã®åŒæ°ããã¹ãŠãã€ã³ã¿ã§ããå Žåã®èŠå
ä»æ§ã«ãããšããã®ãããªæªäœ¿çšã®åŒæ°ã¯èš±å¯ãããŠããŸãã
-Wno-format-zero-length
If -Wãã©ãŒããã ãæå®ãããŠããå Žåãé·ãããŒãã®ãã©ãŒãããã«ã€ããŠèŠåããªãã§ãã ããã Cæšæº
é·ããŒãã®ãã©ãŒããããèš±å¯ãããããšãæå®ããŸãã
-Wformat = 2
æå¹ã«ãã -Wãã©ãŒããã ããã«ãè¿œå ã®ãã©ãŒããããã§ãã¯ã çŸåšãšåç -Wãã©ãŒããã
-Wformat-éæå -Wformat-ã»ãã¥ãªã㣠-Wformat-y2k.
-Wformat-éæå
If -Wãã©ãŒããã ãæå®ãããŠããŸãããã©ãŒãããæååãæååãªãã©ã«ã§ãªãå Žåã«ãèŠåããŸã
ãããã£ãŠãformaté¢æ°ããã®ãã©ãŒãããåŒæ°ã次ã®ããã«åãåããªãéãããã§ãã¯ããããšã¯ã§ããŸããã
ãva_listãã
-Wformat-ã»ãã¥ãªãã£
If -Wãã©ãŒããã ãæå®ããããè¡šããã©ãŒãããé¢æ°ã®äœ¿çšã«ã€ããŠãèŠåããŸã
èããããã»ãã¥ãªãã£ã®åé¡ã çŸåšãããã¯ãprintfããš
ãã©ãŒãããæååãæååãªãã©ã«ã§ã¯ãªããæååããªãå Žåã®ãscanfãé¢æ°
ãprintfïŒfooïŒ;ãã®ããã«åŒæ°ããã©ãŒãããããŸãã ããã¯ã次ã®å Žåã«ã»ãã¥ãªãã£ããŒã«ã«ãªãå¯èœæ§ããããŸã
ãã©ãŒãããæååã¯ä¿¡é Œã§ããªãå ¥åããæ¥ãŠããã %nã ïŒããã¯çŸåšã
äœã®ãµãã»ãã -Wformat-éæå èŠåããŸãããå°æ¥ã®èŠåã¯
ã«è¿œå -Wformat-ã»ãã¥ãªã㣠ã«å«ãŸããŠããªããã® -Wformat-éæå.)
泚ïŒUbuntu 8.10以éã®ããŒãžã§ã³ã§ã¯ããã®ãªãã·ã§ã³ã¯Cã§ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
C ++ãObjCãObjC++ã ç¡å¹ã«ããã«ã¯ã -Wno-ãã©ãŒãããã»ãã¥ãªãã£ããŸãã¯ãã¹ãŠã®åœ¢åŒãç¡å¹ã«ãã
ãšã®èŠå -Wformat = 0ã ãã©ãŒãããã®ã»ãã¥ãªãã£èŠåãèŽåœçã«ããã«ã¯ã次ã®ããã«æå®ããŸã
-Werror = format-security.
-Wformat-y2k
If -Wãã©ãŒããã ãæå®ãããŠããå Žåã¯ããstrftimeã圢åŒã«ã€ããŠãèŠåããŸãã
XNUMXæ¡ã®å¹Žã
-éãã«
null以å€ã®å€ãå¿ èŠã§ãããšããŒã¯ãããåŒæ°ã«nullãã€ã³ã¿ãæž¡ãããšã«ã€ããŠèŠåãã
ãéãã«ãé¢æ°å±æ§ã«ããã
-éãã« ã«å«ãŸããŠããŸã -å£ ãš -Wãã©ãŒãããã ã§ç¡å¹ã«ããããšãã§ããŸã -Wno-énull
ãªãã·ã§ã³ãéžæããŸãã
-Winit-self ïŒCãC ++ãObjective-Cããã³Objective-C ++ã®ã¿ïŒ
èªåèªèº«ã§åæåãããåæåãããŠããªãå€æ°ã«ã€ããŠèŠåããŸãã ããã«æ³šæããŠãã ãã
ãªãã·ã§ã³ã¯ã -åæåãããŠããŸãã ãªãã·ã§ã³ãéžæããŸãã
ããšãã°ãGCCã¯ã次ã®ã¹ããããã§ã®ã¿ãiããåæåãããŠããªãããšãèŠåããŸã
ã〠-Winit-self æå®ãããŠããŸãïŒ
int fïŒïŒ
{
int i = i;
return i;
}
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£ C++ ã§ã
-Wimplicit-int ïŒCããã³Objective-Cã®ã¿ïŒ
宣èšã§ã¿ã€ããæå®ãããŠããªãå Žåã«èŠåããŸãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wimplicit é¢æ°å®£èš ïŒCããã³Objective-Cã®ã¿ïŒ
é¢æ°ã宣èšãããåã«äœ¿çšããããšãã¯ãã€ã§ãèŠåãåºããŸãã C99ã¢ãŒãã®å Žå
(-std = c99 or -std = gnu99ïŒããã®èŠåã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããã
ã«ãããšã©ãŒ -è¡åŠçãšã©ãŒã ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -å£.
-æé»ã®äºè§£ ïŒCããã³Objective-Cã®ã¿ïŒ
ãšåã -Wimplicit-int ãš -Wimplicit é¢æ°å®£èšã ãã®èŠåã¯æå¹ã«ãªã£ãŠããŸã
by -å£.
-ç¡èŠ-修食å ïŒCããã³C ++ã®ã¿ïŒ
é¢æ°ã®æ»ãåã«ãconstããªã©ã®å修食åãããå Žåã«èŠåããŸãã ISOCã®å Žå
é¢æ°ã«ãã£ãŠè¿ãããå€ã¯
巊蟺å€ã C ++ã®å ŽåãèŠåã¯ã¹ã«ã©ãŒåãŸãã¯ãvoidãã«å¯ŸããŠã®ã¿çºè¡ãããŸãã ISO C
é¢æ°å®çŸ©ã§ä¿®é£Ÿããããvoidãæ»ãåãçŠæ¢ããŠããããããã®ãããªæ»ãåã¯
ãã®ãªãã·ã§ã³ããªããŠããåžžã«èŠåãåãåããŸãã
ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -ãŠã§ã¯ã¹ãã©.
-Wã¡ã€ã³
次ã®ã¿ã€ãã®å Žåã«èŠåããŸã ã¡ã€ã³ çãããã§ãã ã¡ã€ã³ å€éšã®é¢æ°ã§ããå¿ èŠããããŸã
ãªã³ã±ãŒãžãintãè¿ãããŒãåŒæ°ãXNUMXã€ããŸãã¯XNUMXã€ã®åŒæ°ãåã
é©åãªã¿ã€ãã ãã®èŠåã¯ãC ++ã§ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããã次ã®ããããã«ãã£ãŠæå¹ã«ãªããŸãã
-å£ or -Wpedantic.
-äžæ¬åŒ§ããããŸãã
ã¢ã°ãªã²ãŒããŸãã¯ãŠããªã³åæååãå®å šã«æ¬åŒ§ã§å²ãŸããŠããªãå Žåã«èŠåããŸãã 以äžã§ã¯
ããšãã°ãã®ã€ãã·ã£ã©ã€ã¶ a å®å šã«æ¬åŒ§ã§å²ãŸããŠããŸãããã b å®å šã§ã
æ¬åŒ§ã§å²ãŸããŠããŸãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£ Cã§ã
int a [2] [2] = {0ã1ã2ã3};
int b [2] [2] = {{0ã1}ã{2ã3}};
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-è¡æ¹äžæã®ã€ã³ã¯ã«ãŒããã£ã¬ã¯ã㪠ïŒCãC ++ãObjective-Cããã³Objective-C ++ã®ã¿ïŒ
ãŠãŒã¶ãŒæå®ã®ã€ã³ã¯ã«ãŒããã£ã¬ã¯ããªãååšããªãå Žåã«èŠåããŸãã
-ãã£ã
æ¬åŒ§ãããå Žåãªã©ãç¹å®ã®ã³ã³ããã¹ãã§æ¬åŒ§ãçç¥ãããŠããå Žåã«èŠåããŸãã
ççå€ãæåŸ ãããã³ã³ããã¹ãã§ã®å²ãåœãŠããŸãã¯æŒç®åããã¹ããããŠããå Žå
ãã®åªå é äœã®äººã ã¯ãã°ãã°æ··ä¹±ããŸãã
ãŸãã次ã®ãããªæ¯èŒã®å Žåã¯èŠåããŸã x <= y <= z 衚瀺ãããŸãã ããã¯ãšåçã§ã ïŒx <= y ? 1 : 0)
<= zãããã¯éåžžã®æ°åŠè¡šèšãšã¯ç°ãªã解éã§ãã
ãŸãããifãã¹ããŒãã¡ã³ããæ··ä¹±ããå¯èœæ§ã®ããæ§é ã«ã€ããŠãèŠåããŸãã
ãelseããã©ã³ããå±ããŸãã ãã®ãããªå Žåã®äŸã次ã«ç€ºããŸãã
{
ããïŒ
ïŒbïŒã®å Žå
fooïŒïŒ;
ã»ãã«
ã㌠ïŒïŒ;
}
C / C ++ã§ã¯ããã¹ãŠã®ãelseããã©ã³ãã¯ãå¯èœãªéãæãå åŽã®ãifãã¹ããŒãã¡ã³ãã«å±ããŸãã
ãã®äŸã§ã¯ãifïŒbïŒãã§ãã å€ãã®å Žåãããã¯ããã°ã©ããŒãæåŸ ãããã®ã§ã¯ãããŸããã
äžèšã®äŸã§ã¯ãããã°ã©ããŒãéžæããã€ã³ãã³ãã«ãã£ãŠç€ºãããŠããŸãã ãããšã
ãã®æ··ä¹±ã®å¯èœæ§ãããããããã®ãã©ã°ãæå®ããããšãGCCã¯èŠåãçºè¡ããŸãã
èŠåãåé€ããã«ã¯ãæãå åŽã®ãifãã¹ããŒãã¡ã³ãã®ååŸã«æ瀺çãªäžæ¬åŒ§ãè¿œå ããŸãã
ãelseããå²ãã§ãããifãã«å±ããããšã¯ã§ããŸããã çµæã®ã³ãŒãã¯æ¬¡ã®ããã«ãªããŸã
ãã®ãããªïŒ
{
ããïŒ
{
ïŒbïŒã®å Žå
fooïŒïŒ;
ã»ãã«
ã㌠ïŒïŒ;
}
}
ãŸããäžéãªãã©ã³ããçç¥ãããïŒïŒããžã®GNUæ¡åŒµã®å±éºãªäœ¿çšã«ã€ããŠãèŠåããŸãã
ãïŒãïŒæŒç®åã®æ¡ä»¶ãããŒã«åŒã®å Žåãçç¥ãããå€ã¯æ¬¡ã®ããã«ãªããŸãã
åžžã«1ãå€ãã®å Žåãããã°ã©ããŒã¯ãæ¡ä»¶å ã§èšç®ãããå€ã§ãããšæåŸ ããŸãã
代ããã«åŒã
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wã·ãŒã±ã³ã¹ãã€ã³ã
ã·ãŒã±ã³ã¹éåã®ããã«ã»ãã³ãã£ã¯ã¹ãå®çŸ©ãããŠããªãå¯èœæ§ã®ããã³ãŒãã«ã€ããŠèŠåãã
Cããã³C++æšæºã®ãã€ã³ãã«ãŒã«ã
Cããã³C++æšæºã¯ãC /C++ããã°ã©ã ã®åŒã®é åºãå®çŸ©ããŸãã
ã®èŠ³ç¹ããè©äŸ¡ ã·ãŒã±ã³ã¹ ãã€ã³ãã
ããã°ã©ã ã®äžéšã®å®è¡ïŒã·ãŒã±ã³ã¹ãã€ã³ãã®åã«å®è¡ãããéšåãšã
ãã®åŸå®è¡ãããŸãã ãããã¯ãå®å šãªåŒïŒ
ã®æåã®ãªãã©ã³ãã®è©äŸ¡åŸããã倧ããªåŒã®äžéšã§ã¯ãããŸããïŒ
"&&"ã "||"ã "ïŒïŒ"ãŸã㯠"ã"ïŒã³ã³ãïŒæŒç®åãé¢æ°ãåŒã³åºãããåïŒãã ãã
ãã®åŒæ°ãšåŒã³åºãããé¢æ°ã瀺ãåŒã®è©äŸ¡ïŒãããã³
ä»ã®ç¹å®ã®å Žæã ã·ãŒã±ã³ã¹ãã€ã³ãã«ãŒã«ã§è¡šçŸãããŠãã以å€ã®é åº
åŒã®éšååŒã®è©äŸ¡ã®å²åã¯æå®ãããŠããŸããã ããããã¹ãŠã®ã«ãŒã«
ããšãã°ãXNUMXã€ã®å Žåãå šäœã®é åºã§ã¯ãªããéšåçãªé åºã®ã¿ãèšè¿°ããŸãã
é¢æ°ã¯XNUMXã€ã®åŒå ã§åŒã³åºãããéã«ã·ãŒã±ã³ã¹ãã€ã³ãã¯ãããŸããã
é¢æ°ãåŒã³åºãããé åºã¯æå®ãããŠããŸããã ãã ããæšæº
å§å¡äŒã¯ãé¢æ°åŒã³åºããéè€ããªãããšã決å®ããŸããã
ã·ãŒã±ã³ã¹ãã€ã³ãéã§ã®å€ã®å€æŽæã«æå®ãããŸãã
ãªããžã§ã¯ããæå¹ã«ãªããŸãã åäœãããã«äŸåããããã°ã©ã ã«ã¯ãæªå®çŸ©ã®åäœããããŸãã
Cããã³C++æšæºã§ã¯ããåã®ã·ãŒã±ã³ã¹ãã€ã³ããšæ¬¡ã®ã·ãŒã±ã³ã¹ãã€ã³ãã®éã§
ãªããžã§ã¯ãã¯ããã®ä¿åãããå€ããè©äŸ¡ã«ãã£ãŠæ倧XNUMXåå€æŽããå¿ èŠããããŸãã
è¡šçŸã ããã«ãåã®å€ã¯ãå€ã決å®ããããã«ã®ã¿èªã¿åããããã®ãšããŸãã
ããã°ã©ã ããããã®ã«ãŒã«ã«éåããå Žåãç¹å®ã®çµæ
å®è£ ã¯å®å šã«äºæž¬äžå¯èœã§ãã
æªå®çŸ©åäœã®ã³ãŒãã®äŸã¯ããa = a ++;ãããa [n] = b [n ++]ãããa [i++]=ãã§ãã
i; "ãããã€ãã®ããè€éãªã±ãŒã¹ã¯ãã®ãªãã·ã§ã³ã§ã¯èšºæãããã
ææã®èª€æ€ç¥ã®çµæã§ãããäžè¬çã«ã¯ã
ããã°ã©ã ã§ãã®çš®ã®åé¡ãæ€åºããŸãã
èŠæ Œã¯çŽããããèšãåãã§ãããããæ£ç¢ºãªãã®ã«ã€ããŠã¯ããã€ãã®è°è«ããããŸã
埮åŠãªå Žåã®ã·ãŒã±ã³ã¹ãã€ã³ãã«ãŒã«ã®æå³ã ã®è°è«ãžã®ãªã³ã¯
ææ¡ãããæ£åŒãªå®çŸ©ãå«ãåé¡ã¯ãGCCã®èªã¿ã®ããŒãžã§èŠã€ããããšãã§ããŸãã
ã§http://gcc.gnu.org/readings.html>.
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£ Cããã³C ++ã®å Žåã
-Wno-return-local-addr
次ã®å€æ°ãžã®ãã€ã³ã¿ïŒãŸãã¯C ++ã§ã¯åç §ïŒãè¿ãããšã«ã€ããŠèŠåããªãã§ãã ããã
é¢æ°ãæ»ã£ãåŸãã¹ã³ãŒãå€ã«ãªããŸãã
-Wreturnã¿ã€ã
é¢æ°ãããã©ã«ãã§ãintãã«èšå®ãããæ»ãåã§å®çŸ©ãããŠããå Žåã¯åžžã«èŠåããŸãã ãŸã
æ»ãåãé¢æ°ã®æ»ãå€ã®ãªããreturnãã¹ããŒãã¡ã³ãã«ã€ããŠèŠåãã
ãvoidãã§ã¯ãããŸããïŒé¢æ°æ¬äœã®ç«¯ããèœã¡ããšãæ»ããšèŠãªãããŸã
å€ãªãïŒãããã³é¢æ°å ã®åŒãå«ããreturnãã¹ããŒãã¡ã³ãã«ã€ããŠ
ãã®æ»ãã¿ã€ãã¯ãvoidãã§ãã
C ++ã®å Žåãæ»ãå€ã®ãªãé¢æ°ã¯åžžã«èšºæã¡ãã»ãŒãžãçæããŸãã
ã〠-WããŒãªã¿ãŒã³å ãæå®ãããŠããŸãã å¯äžã®äŸå€ã¯ ã¡ã€ã³ ãšæ©èœ
ã·ã¹ãã ããããŒã§å®çŸ©ãããŸãã
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wã¹ã€ãã
ãswitchãã¹ããŒãã¡ã³ãã«åæåã®ã€ã³ããã¯ã¹ãããããcaseãããªãå Žåã¯åžžã«èŠåããŸã
ãã®åæã®XNUMXã€ä»¥äžã®ååä»ãã³ãŒãã ïŒãããã©ã«ããã®ååš
labelã¯ããã®èŠåãé²ããŸããïŒåæç¯å²å€ã®ãcaseãã©ãã«ã
ãã®ãªãã·ã§ã³ã䜿çšãããšãèŠåã衚瀺ãããŸãïŒãããã©ã«ããã®ã©ãã«ãããå Žåã§ãïŒã ãã
èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wswitch-ããã©ã«ã
ãswitchãã¹ããŒãã¡ã³ãã«ãdefaultãã±ãŒã¹ããªãå Žåã¯åžžã«èŠåããŸãã
-Wswitch-enum
ãswitchãã¹ããŒãã¡ã³ãã«åæåã®ã€ã³ããã¯ã¹ãããããcaseãããªãå Žåã¯åžžã«èŠåããŸã
ãã®åæã®XNUMXã€ä»¥äžã®ååä»ãã³ãŒãã ã®å€åŽã®ãã±ãŒã¹ãã©ãã«
ãã®ãªãã·ã§ã³ã䜿çšãããšãåæç¯å²ãèŠåãçºããŸãã å¯äžã®éã
ã®éã« -Wã¹ã€ãã ãã®ãªãã·ã§ã³ã¯ããã®ãªãã·ã§ã³ãçç¥ã«ã€ããŠèŠåãåºãããšã§ã
ãããã©ã«ããã®ã©ãã«ãããå Žåã§ããåæã³ãŒãã
-Wsync-nand ïŒCããã³C ++ã®ã¿ïŒ
ã__sync_fetch_and_nandãããã³ã__sync_nand_and_fetchãçµã¿èŸŒã¿é¢æ°ã
äžå€ã ãããã®é¢æ°ã¯ãGCC4.4ã§ã»ãã³ãã£ã¯ã¹ãå€æŽããŸããã
-çæå
ããã°ã©ã ã®æå³ãå€ããå¯èœæ§ã®ããäžéé³åã«ééããå Žåã«èŠåãã
ïŒã³ã¡ã³ãå ã®äžéé³åã«ã€ããŠã¯èŠåãããŸããïŒã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-䜿çšãããŠããªãããã©ã¡ãŒã¿ãèšå®
é¢æ°ãã©ã¡ãŒã¿ãå²ãåœãŠãããŠãããããã以å€ã¯äœ¿çšãããŠããªãå Žåã¯åžžã«èŠåããŸãïŒ
ãã®å®£èšïŒã
ãã®èŠåãæå¶ããã«ã¯ã æªäœ¿çš å±æ§ã
ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -æªäœ¿çš ãšãšãââã« -ãŠã§ã¯ã¹ãã©.
-䜿çšãããŠããªããå€æ°ãèšå®
ããŒã«ã«å€æ°ãå²ãåœãŠãããŠãããããã以å€ã¯äœ¿çšãããŠããªãå Žåã¯åžžã«èŠåããŸãïŒ
宣èšïŒã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
ãã®èŠåãæå¶ããã«ã¯ã æªäœ¿çš å±æ§ã
ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -æªäœ¿çšãã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-æªäœ¿çšæ©èœ
éçé¢æ°ã宣èšãããŠãããå®çŸ©ãããŠããªãããéã€ã³ã©ã€ã³éçé¢æ°ã§ããå Žåã¯åžžã«èŠåããŸã
æ©èœã¯æªäœ¿çšã§ãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wunused-ã¬ãŒãã«
ã©ãã«ã宣èšãããŠããã䜿çšãããŠããªãå Žåã¯åžžã«èŠåããŸãã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
ãã®èŠåãæå¶ããã«ã¯ã æªäœ¿çš å±æ§ã
-Wunused-local-typedefs ïŒCãObjective-CãC ++ããã³Objective-C ++ã®ã¿ïŒ
é¢æ°ã§ããŒã«ã«ã«å®çŸ©ãããtypedefã䜿çšãããŠããªãå Žåã«èŠåããŸãã ãã®èŠåã¯
æå¹ã«ãã -å£.
-Wunused-ãã©ã¡ãŒã¿
é¢æ°ãã©ã¡ãŒã¿ãŒã宣èšä»¥å€ã«äœ¿çšãããŠããªãå Žåã¯åžžã«èŠåããŸãã
ãã®èŠåãæå¶ããã«ã¯ã æªäœ¿çš å±æ§ã
-Wno-æªäœ¿çš-çµæ
å±æ§ãwarn_unused_resultãã§ããŒã¯ãããé¢æ°ã®åŒã³åºãå ãèŠåãçºããå Žåã§ãèŠåããªã
æ»ãå€ã¯äœ¿çšããªãã§ãã ããã ããã©ã«ã㯠-Wunused-çµæ.
-Wunused-å€æ°
ããŒã«ã«å€æ°ãŸãã¯éå®æ°éçå€æ°ã䜿çšãããŠããªãå Žåã¯åžžã«èŠåããŸãã
ãã®å®£èšã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
ãã®èŠåãæå¶ããã«ã¯ã æªäœ¿çš å±æ§ã
-æªäœ¿çšå€
ã¹ããŒãã¡ã³ããæ瀺çã«äœ¿çšãããŠããªãçµæãèšç®ãããã³ã«èŠåããŸãã æå¶ããã«ã¯
ãã®èŠåã¯ãæªäœ¿çšã®åŒãã«ãã£ã¹ãããŸã ãã€ãã ããã«ã¯åŒã¹ããŒãã¡ã³ããå«ãŸããŸã
ãŸãã¯ãå¯äœçšãå«ãŸãªãã³ã³ãåŒã®å·ŠåŽã çºã«
ããšãã°ã次ã®ãããªåŒ x [iãj] èŠåãçºçãããŸãã x [ïŒvoidïŒiãj] ã§ã¯ãªãã
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-æªäœ¿çš
äžèšã®ãã¹ãŠ -æªäœ¿çš ãªãã·ã§ã³ã®çµã¿åããã
æªäœ¿çšã®é¢æ°ãã©ã¡ãŒã¿ãŒã«é¢ããèŠåãåãåãã«ã¯ã次ã®ãããããæå®ããå¿ èŠããããŸãã
-ãŠã§ã¯ã¹ãã© -æªäœ¿çš ïŒãäºæ¿ãã ãã -å£ å«æãã -æªäœ¿çšïŒããŸãã¯åå¥ã«æå®
-Wunused-ãã©ã¡ãŒã¿.
-åæåãããŠããŸãã
èªåå€æ°ãæåã«åæåãããã«äœ¿çšãããå ŽåããŸãã¯å€æ°ã䜿çšãããå Žåã«èŠåããŸã
ãsetjmpãåŒã³åºãã«ãã£ãŠç Žå£ãããå¯èœæ§ããããŸãã C ++ã§ã¯ãééçåç §ãŸãã¯ééçåç §ã®å Žåã«èŠåããŸã
éç㪠å®æ° ã¡ã³ããŒã¯ãã³ã³ã¹ãã©ã¯ã¿ãŒã®ãªãã¯ã©ã¹ã«è¡šç€ºãããŸãã
å€æ°ã®åæåãããŠããªãå€ã䜿çšããã³ãŒãã«ã€ããŠèŠåãããå Žå
ç¬èªã®ã€ãã·ã£ã©ã€ã¶ããäœ¿çš -Winit-self ãªãã·ã§ã³ãéžæããŸãã
ãããã®èŠåã¯ãæ§é ã®åæåãããŠããªãããŸãã¯ç Žå£ãããåã ã®èŠçŽ ã«å¯ŸããŠçºçããŸãã
ãŠããªã³å€æ°ãŸãã¯é åå€æ°ãããã³åæåãããŠããªãå€æ°ãŸãã¯ã¯ããŒããŒãããå€æ°
å šäœãšããŠã ãæ®çºæ§ããšå®£èšãããå€æ°ãŸãã¯èŠçŽ ã§ã¯çºçããŸããã ãªããªã
ãããã®èŠåã¯ãæé©åãæ£ç¢ºãªå€æ°ãŸãã¯èŠçŽ ã«ãã£ãŠç°ãªããŸãã
èŠåã¯ã䜿çšãããŠããGCCã®æ£ç¢ºãªæé©åãªãã·ã§ã³ãšããŒãžã§ã³ã«ãã£ãŠç°ãªããŸãã
èšç®ã«ã®ã¿äœ¿çšãããå€æ°ã«ã€ããŠã®èŠåããªãå Žåãããããšã«æ³šæããŠãã ããã
ãã®ãããªèšç®ã¯ããŒã¿ãããŒã«ãã£ãŠåé€ãããå¯èœæ§ããããããããèªäœã䜿çšãããããšã®ãªãå€
èŠåãåºåãããåã®åæã
-ãããã-åæåãããŠããŸãã
èªåå€æ°ã®å Žåãé¢æ°ãšã³ããªããã®äœ¿çšãžã®ãã¹ãååšããå Žå
åæåãããå€æ°ã§ãããä»ã®ãã¹ãããã€ãååšããŸãã
å€æ°ãåæåãããŠããªãå Žåãã³ã³ãã€ã©ã¯ã蚌æã§ããªãå Žåã«èŠåãçºããŸãã
åæåãããŠããªããã¹ã¯å®è¡æã«å®è¡ãããŸããã ãããã®èŠåã¯ãªãã·ã§ã³ã«ãªããŸã
GCCã¯ãã³ãŒããæ£ããå¯èœæ§ããããã¹ãŠã®çç±ãç解ããã®ã«ååãªã»ã©è³¢ããªãããã§ã
ãšã©ãŒãããããã«èŠããŸããã ãããã©ã®ããã«çºçãããã®äžäŸã次ã«ç€ºããŸãã
{
int x;
ã¹ã€ããïŒyïŒ
{
ã±ãŒã¹1ïŒx = 1;
ç Žã;
ã±ãŒã¹2ïŒx = 4;
ç Žã;
ã±ãŒã¹3ïŒx = 5;
}
fooïŒxïŒ;
}
ãyãã®å€ãåžžã«1ã2ããŸãã¯3ã®å Žåããxãã¯åžžã«åæåãããŸãããGCC
ãããç¥ããŸããã èŠåãæå¶ããã«ã¯ãããã©ã«ãã®ã±ãŒã¹ãæå®ããå¿ èŠããããŸã
ã¢ãµãŒãïŒ0ïŒãŸãã¯åæ§ã®ã³ãŒãã
ãã®ãªãã·ã§ã³ã¯ãäžæ®çºæ§èªåå€æ°ã次ã®ããã«å€æŽãããå¯èœæ§ãããå Žåã«ãèŠåããŸãã
ãlongjmpããåŒã³åºããŸãã ãããã®èŠåããæé©åã®å Žåã«ã®ã¿å¯èœã§ãã
ã³ã³ãã€ã«ã
ã³ã³ãã€ã©ã¯ãsetjmpãã®åŒã³åºãã®ã¿ãèªèããŸãã ãlongjmpããã©ãã«ãããããããŸãã
ãšåŒã°ãã; å®éãã·ã°ãã«ãã³ãã©ãŒã¯ãã³ãŒãå ã®ä»»æã®æç¹ã§ãããåŒã³åºãããšãã§ããŸãã ãšããŠ
ãã®çµæããlongjmpãã®ãããå®éã«ã¯åé¡ããªãå Žåã§ãèŠåã衚瀺ãããå ŽåããããŸãã
å®éãåé¡ãåŒãèµ·ããå Žæã«é»è©±ããããããšã¯ã§ããŸããã
䜿çšãããã¹ãŠã®é¢æ°ã宣èšããã°ãããã€ãã®èª€ã£ãèŠåãåé¿ã§ããŸãã
ãnoreturnããšããŠæ»ãããšã¯ãããŸããã
ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£ or -ãŠã§ã¯ã¹ãã©.
-äžæ-ãã©ã°ã
GCCãç解ã§ããªãã#pragmaããã£ã¬ã¯ãã£ããæ€åºãããå Žåã«èŠåããŸãã ãããªã
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã䜿çšãããã·ã¹ãã å ã®äžæãªãã©ã°ãã«å¯ŸããŠãèŠåãçºè¡ãããŸã
ããããŒãã¡ã€ã«ã ããã¯ãèŠåã -å£
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
-Wno-ãã©ã°ã
誀ã£ããã©ã¡ãŒã¿ãç¡å¹ãªæ§æããŸãã¯
ãã©ã°ãéã®ç«¶åã ãåç §ããŠãã ãã -äžæ-ãã©ã°ã.
-Wstrict-ãšã€ãªã¢ã·ã³ã°
ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ã¢ã¯ãã£ãã«ãªããŸã -fstrict-ãšã€ãªã¢ã·ã³ã° ã¢ã¯ãã£ãã§ãã ããã¯ã³ãŒãã«ã€ããŠèŠåããŸã
ã³ã³ãã€ã©ãæé©åã«äœ¿çšããŠããå³å¯ãªãšã€ãªã¢ã·ã³ã°ã«ãŒã«ã«éåããå¯èœæ§ããããŸãã
èŠåã¯ãã¹ãŠã®ã±ãŒã¹ããã£ããããããã§ã¯ãããŸããããããäžè¬çãªã±ãŒã¹ããã£ããããããšããŸã
èœãšãç©Žã ã«å«ãŸããŠããŸã -å£ã ã«çžåœ -Wstrict-aliasing = 3
-Wstrict-aliasing = n
ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ã¢ã¯ãã£ãã«ãªããŸã -fstrict-ãšã€ãªã¢ã·ã³ã° ã¢ã¯ãã£ãã§ãã ããã¯ã³ãŒãã«ã€ããŠèŠåããŸã
ã³ã³ãã€ã©ãæé©åã«äœ¿çšããŠããå³å¯ãªãšã€ãªã¢ã·ã³ã°ã«ãŒã«ã«éåããå¯èœæ§ããããŸãã
ã¬ãã«ãé«ãã»ã©ã粟床ãé«ããªããŸãïŒèª€æ€ç¥ãå°ãªããªããŸãïŒã ããé«ãã¬ãã«
æ¹æ³ãšåæ§ã«ãããå€ãã®åªåã«ã察å¿ããŸã -O äœåã -Wstrict-ãšã€ãªã¢ã·ã³ã° is
ã«çžåœ -Wstrict-aliasing = 3.
ã¬ãã«1ïŒæãæ»æçã§ãè¿ éã§ã粟床ãæãäœãã ããé«ãã¬ãã«ã®ãšãã«ãããã圹ç«ã€
èŠåããªãã§ãã ãã -fstrict-ãšã€ãªã¢ã·ã³ã° falseãã»ãšãã©ãªããããã³ãŒããå£ããŸã
ãã¬ã ãã ããå€ãã®èª€æ€ç¥ããããŸãã ãã¹ãŠã®ãã€ã³ã¿å€æã«ã€ããŠèŠåããŸã
éåç §ãããªãå Žåã§ããäºææ§ã®ãªãå¯èœæ§ã®ããã¿ã€ãéã æ£é¢ãèµ°ã
çµäºã®ã¿ã
ã¬ãã«2ïŒç©æ¥µçãè¿ éãããŸãæ£ç¢ºã§ã¯ãªãã ãŸã å€ãã®èª€æ€ç¥ãããå¯èœæ§ããããŸãïŒ
ãã ããã¬ãã«1ãšåãæ°ïŒããã©ãŒã«ã¹ãã¬ãã£ãã¯ã»ãšãã©ãããŸããïŒãã ããã¬ãã«1ããå€ãå¯èœæ§ããããŸãïŒã
ã¬ãã«1ãšã¯ç°ãªããã¢ãã¬ã¹ãååŸããããšãã«ã®ã¿èŠåããŸãã äžå®å šãªã¿ã€ãã«ã€ããŠèŠåããŸãã
ããã³ããšã³ãã§ã®ã¿å®è¡ãããŸãã
ã¬ãã«3ïŒããã©ã«ã㯠-Wstrict-ãšã€ãªã¢ã·ã³ã°ïŒïŒèª€æ€ç¥ãéåžžã«å°ãªããå°æ°ã§ããå¿ èŠããããŸã
åœé°æ§ã æé©åãæå¹ã«ãªã£ãŠããå Žåãã¬ãã«1ãŸãã¯2ãããå°ãé ããªããŸãã
ããã³ããšã³ãã®äžè¬çãªããã+éæ¥åç §ãã¿ãŒã³ãåŠçããŸãã
ã*ïŒint *ïŒïŒsome_floatãã æé©åãæå¹ã«ãªã£ãŠããå Žåã¯ãããã¯ãšã³ãã§ãå®è¡ãããŸãã
ãããŒã»ã³ã·ãã£ããªãã€ã³ãããŒæ å ±ã䜿çšããŠãè€æ°ã®ã¹ããŒãã¡ã³ãã®ã±ãŒã¹ãåŠçããŸãã
å€æããããã€ã³ã¿ãéåç §ãããå Žåã«ã®ã¿èŠåããŸãã äžå®å šã«ã€ããŠèŠåããŸãã
ã¿ã€ãã
-Wstrict-ãªãŒããŒãããŒ
-Wstrict-overflow =n
ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ã¢ã¯ãã£ãã«ãªããŸã -fstrict-ãªãŒããŒãã㌠ã¢ã¯ãã£ãã§ãã ã±ãŒã¹ã«ã€ããŠèŠåããŸã
ããã§ãã³ã³ãã€ã©ã¯ã眲åããããªãŒããŒãããŒãçºçããªããšããä»®å®ã«åºã¥ããŠæé©åããŸãã
çºçããã ã³ãŒãããªãŒããŒãããŒããå¯èœæ§ã®ãããã¹ãŠã®ã±ãŒã¹ã«ã€ããŠèŠåããããã§ã¯ãªãããšã«æ³šæããŠãã ããã
ã³ã³ãã€ã©ãäœããã®æé©åãå®è£ ããå Žåã«ã®ã¿èŠåããŸãã ãããã£ãŠãããã¯
èŠåã¯æé©åã¬ãã«ã«ãã£ãŠç°ãªããŸãã
笊å·ä»ããªãŒããŒãããŒãçºçããªãããšãåæãšããæé©åã¯ã次ã®å Žåã«å®å šã«å®å šã§ãã
é¢é£ããå€æ°ã®å€ã¯ããªãŒããŒãããŒãå®éã«ã¯æ±ºããŠçºçããªããããªãã®ã§ãã
çºçããã ãããã£ãŠããã®èŠåã¯ç°¡åã«èª€æ€ç¥ãåŒãèµ·ããå¯èœæ§ããããŸãïŒã³ãŒãã«é¢ããèŠå
ããã¯å®éã«ã¯åé¡ã§ã¯ãããŸããã éèŠãªåé¡ã«éäžããããã«ãããã€ãã®èŠå
ã¬ãã«ãå®çŸ©ãããŠããŸãã æªå®çŸ©ã®ç¬Šå·ä»ããªãŒããŒãããŒã®äœ¿çšã«ã€ããŠã¯èŠåã¯çºè¡ãããŸãã
ã«ãŒãã«å¿ èŠãªå埩åæ°ãèŠç©ãããšããç¹ã«æ±ºå®ãããšã
ã«ãŒããå®è¡ããããã©ããã
-Wstrict-overflow = 1
çããããåé¿ããããã±ãŒã¹ã«ã€ããŠèŠåããŸãã ããšãã°ã
-fstrict-ãªãŒããŒãããŒãã³ã³ãã€ã©ã¯ãx +1>xãã1ã«ç°¡ç¥åããŸãããã®ã¬ãã«ã®
-Wstrict-ãªãŒããŒãã㌠ã«ãã£ãŠæå¹ã«ãªããŸã -å£; ããé«ãã¬ãã«ã¯ããã§ã¯ãªãã
æ瀺çã«èŠæ±ãããŸããã
-Wstrict-overflow = 2
ãŸããæ¯èŒãå®æ°ã«ç°¡ç¥åãããŠããä»ã®å Žåã«ã€ããŠãèŠåããŸãã ããã«
äŸïŒ "absïŒxïŒ>=0ã ããã¯ã次ã®å Žåã«ã®ã¿ç°¡ç¥åã§ããŸã -fstrict-ãªãŒããŒãã㌠ã§ãã
ãabsïŒINT_MINïŒãããŒãæªæºã®ãINT_MINãã«ãªãŒããŒãããŒããããã§ãã
-Wstrict-ãªãŒããŒãã㌠ïŒã¬ãã«ãªãïŒã¯ãšåãã§ã -Wstrict-overflow = 2.
-Wstrict-overflow = 3
ãŸããæ¯èŒãç°¡ç¥åãããŠããä»ã®å Žåã«ã€ããŠãèŠåããŸãã äŸïŒ "x + 1
>1"ã¯"x>0"ã«ç°¡ç¥åãããŸãã
-Wstrict-overflow = 4
ãŸããäžèšã®ã±ãŒã¹ã§ã«ããŒãããŠããªãä»ã®ç°¡ç¥åã«ã€ããŠãèŠåããŸãã ããã«
äŸïŒãïŒx * 10ïŒ/5ãã¯ãx*2ãã«ç°¡ç¥åãããŸãã
-Wstrict-overflow = 5
ãŸããã³ã³ãã€ã©ãå®æ°ã®å€§ãããæžããå Žåã«ã€ããŠãèŠåããŸã
æ¯èŒã«é¢äžããŸãã äŸïŒãx +2>yãã¯ãx+1>=yãã«ç°¡ç¥åãããŸãã
ãã®åçŽåã«ãããããã¯æé«ã®èŠåã¬ãã«ã§ã®ã¿å ±åãããŸã
å€ãã®æ¯èŒã«é©çšãããããããã®èŠåã¬ãã«ã¯éåžžã«å€ãã®
誀æ€ç¥
-Wsuggest-attribute =[çŽç²ãª|å®æ°|è¿åäžå¯|圢åŒã§ã¢ãŒã«ã€ããããããžã§ã¯ããä¿åããŸãïŒ]
å±æ§ãè¿œå ããããšãæçãªå Žåã«èŠåããŸãã çŸåšã®å±æ§
ãµããŒããããŠããã®ã¯ä»¥äžã®ãšããã§ãã
-Wsuggest-attribute = pure
-Wsuggest-attribute = const
-Wsuggest-attribute = noreturn
å±æ§ãpureãããconstãããŸãã¯ã®åè£ãšãªãå¯èœæ§ã®ããé¢æ°ã«ã€ããŠèŠåãã
"è¿åäžå¯"ã ã³ã³ãã€ã©ã¯ãä»ã®ã³ã³ãã€ã«ã§è¡šç€ºãããé¢æ°ã«ã€ããŠã®ã¿èŠåããŸã
åäœãŸãã¯ïŒãçŽç²ãããã³ãå®æ°ãã®å ŽåïŒãã®æ©èœã蚌æã§ããªãå Žå
æ£åžžã«æ»ããŸãã é¢æ°ã«ç¡éãå«ãŸããŠããªãå Žåãé¢æ°ã¯æ£åžžã«æ»ããŸã
ã¹ããŒããabortïŒïŒãã®åŒã³åºãããŸãã¯ãã©ããã«ãã£ãŠãã«ãŒããŸãã¯ç°åžžã«æ»ããŸãã ãã
åæã«ã¯ãªãã·ã§ã³ãå¿ èŠã§ã -fipa-pure-constãããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãš
ããé«ãã æé©åã¬ãã«ãé«ããããšãåæã®ç²ŸåºŠãåäžããŸãã
-Wsuggest-attribute = format
-äžè¶³ããŠãã圢åŒå±æ§
ããã©ãŒããããå±æ§ã®åè£ãšãªãå¯èœæ§ã®ããé¢æ°ãã€ã³ã¿ã«ã€ããŠèŠåããŸãã
ãããã¯å¯èœãªåè£ã§ããã絶察çãªåè£ã§ã¯ãªãããšã«æ³šæããŠãã ããã GCCã¯ãããæšæž¬ããŸã
ä»£å ¥ã§äœ¿çšãããããã©ãŒããããå±æ§ãæã€é¢æ°ãã€ã³ã¿ã
åæåããã©ã¡ãŒã¿ãŒã®åãæž¡ãããŸãã¯returnã¹ããŒãã¡ã³ãã«ã¯ã察å¿ããã¹ããŒãã¡ã³ããå¿ èŠã§ãã
çµæã®ã¿ã€ãã®ãformatãå±æ§ã ã€ãŸããã®å·ŠåŽ
ä»£å ¥ãŸãã¯åæåããã©ã¡ãŒã¿ãŒå€æ°ã®ã¿ã€ãããŸãã¯æ»ãå€
å«ãŸããŠããé¢æ°ã®ã¿ã€ãã«ã¯ããããããformatãå±æ§ãå¿ èŠã§ãã
èŠåãé¿ããããã
GCCã¯ãããã©ãŒããããã®åè£ãšãªãå¯èœæ§ã®ããé¢æ°å®çŸ©ã«ã€ããŠãèŠåããŸãã
å±æ§ã ç¹°ãè¿ããŸããããããã¯å¯èœãªåè£ã«ãããŸããã GCCã¯ãã®ããã©ãŒãããããæšæž¬ããŸã
å±æ§ã¯ã次ã®ãããªé¢æ°ãåŒã³åºãé¢æ°ã«é©ããŠããå¯èœæ§ããããŸã
ãvprintfããŸãã¯ãvscanfãã§ããããããåžžã«åœãŠã¯ãŸããšã¯éãããäžéšã®é¢æ°ã¯
ããã©ãŒããããå±æ§ãé©åãªãã®ã¯æ€åºãããªãå ŽåããããŸãã
-Warray å¢ç
ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ã¢ã¯ãã£ãã«ãªããŸã -ftree-vrp ã¢ã¯ãã£ãã§ãïŒããã©ã«ã㯠-O2 以äžïŒã ãã
åžžã«ç¯å²å€ã®é åãžã®æ·»ãåã«ã€ããŠèŠåããŸãã ãã®èŠåã¯
æå¹ã«ãã -å£.
-Wno-div-by-zero
ã³ã³ãã€ã«æã®æŽæ°é€ç®ã«ã€ããŠèŠåããªãã§ãã ããã ã«ããæµ®åå°æ°ç¹é€ç®
ãŒãã¯ãç¡é倧ãååŸããããã®åæ³çãªæ¹æ³ã§ããå¯èœæ§ããããããèŠåãããŸããã
NaNã
-Wsystem-ããããŒ
ã·ã¹ãã ããããŒãã¡ã€ã«ã§èŠã€ãã£ãæ§æã®èŠåã¡ãã»ãŒãžãåºåããŸãã ããã®èŠå
ã·ã¹ãã ããããŒã¯éåžžæå¶ãããŸãããéåžžã¯æå¶ãããªãããšãåæãšããŠããŸãã
å®éã®åé¡ã瀺ããã³ã³ãã€ã©ã®åºåãèªã¿ã«ããããã ãã§ãã 䜿çšãã
ãã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã¯ãGCCã«ã·ã¹ãã ããããŒããèŠåãçºããããã«æ瀺ããŸãã
ãŠãŒã¶ãŒã³ãŒãã§çºçããŸããã ãã ãã -å£ ãã®ãªãã·ã§ã³ãšçµã¿åãããŠ
ãããŸãã ã·ã¹ãã ããããŒã®äžæãªãã©ã°ãã«ã€ããŠèŠåãã---ãã®ããã«ã -äžæ-ãã©ã°ã
ãŸãã䜿çšããå¿ èŠããããŸãã
-ãã©ã³ããªã³
å ¥ãåé¢æ°ãžã®ãã€ã³ã¿ãŒã«å¯ŸããŠçæããããã©ã³ããªã³ã«ã€ããŠèŠåããŸãã
ãã©ã³ããªã³ã¯ãå®è¡æã«äœæãããå°ããªããŒã¿ãŸãã¯ã³ãŒãã§ãã
ãã¹ããããé¢æ°ã®ã¢ãã¬ã¹ãååŸããããšãã®ã¹ã¿ãã¯äžã®æéãããã³
ãã¹ããããé¢æ°ãéæ¥çã«åŒã³åºãããã«äœ¿çšãããŸãã äžéšã®ã¿ãŒã²ããã§ã¯ã
ããŒã¿ã®ã¿ã§æ§æãããŠãããããç¹å¥ãªåŠçã¯å¿ èŠãããŸããã ãããã
ã»ãšãã©ã®ã¿ãŒã²ããã§ã¯ãã³ãŒãã§æ§æãããŠãããããã¹ã¿ãã¯ãå¿ èŠã§ã
ããã°ã©ã ãæ£ããåäœããããã«å®è¡å¯èœã«ããå¿ èŠããããŸãã
-Wfloat-çãã
çåŒæ¯èŒã§æµ®åå°æ°ç¹å€ã䜿çšãããŠããå Žåã¯èŠåããŸãã
ãã®èåŸã«ããèãæ¹ã¯ãïŒããã°ã©ããŒã«ãšã£ãŠïŒäŸ¿å©ãªå Žåããããšããããšã§ãã
æµ®åå°æ°ç¹å€ã¯ãç¡éã«æ£ç¢ºãªå®æ°ã®è¿äŒŒå€ãšèŠãªããŠãã ããã
ããªãããããããŠãããªããããªãã¯èšç®ããå¿ èŠããããŸãïŒã³ãŒããåæããããšã«ãã£ãŠããŸãã¯ããã€ãã®
ä»ã®æ¹æ³ïŒèšç®ã«ãã£ãŠå°å ¥ãããæ倧ãŸãã¯å¯èœæ§ã®ããæ倧ãšã©ãŒãããã³
æ¯èŒãå®è¡ãããšãïŒããã³åºåãçæãããšãïŒã«ãããèæ ®ã«å ¥ããŸãããããã¯
å¥ã®åé¡ïŒã ç¹ã«ãå¹³çããã¹ããã代ããã«ããã§ãã¯ããå¿ èŠããããŸã
XNUMXã€ã®å€ã®ç¯å²ãéè€ããŠãããã©ããã確èªããŸãã ãããŠããã¯
é¢ä¿æŒç®åãªã®ã§ãçåŒã®æ¯èŒã¯ããããééã£ãŠããŸãã
-äŒçµ±ç㪠ïŒCããã³Objective-Cã®ã¿ïŒ
åŸæ¥ã®CãšISOCã§ã¯åäœãç°ãªãç¹å®ã®æ§é ã«ã€ããŠèŠåããŸãã
åŸæ¥ã®Cã«çžåœãããã®ããªããããã³/ãŸãã¯åé¡ã®ããISOCæ§é ã«ã€ããŠèŠåãã
é¿ããã¹ãæ§é ã
ã»ãã¯ãæ¬äœã®æååãªãã©ã«å ã«è¡šç€ºããããã¯ããã©ã¡ãŒã¿ã ã®
åŸæ¥ã®Cãã¯ã眮æã¯æååãªãã©ã«å ã§è¡ãããŸãããISOCã§ã¯
ããã§ã¯ãããŸããã
ã»åŸæ¥ã®Cã§ã¯ãäžéšã®ããªããã»ããµãã£ã¬ã¯ãã£ãã¯ååšããŸããã§ããã äŒçµ±ç
ããªããã»ããµã¯ã次ã®å Žåã«ã®ã¿è¡ããã£ã¬ã¯ãã£ããšèŠãªããŸããã # ã³ã©ã ã«ç»å Ž
1è¡ç®ã ãããã£ãŠ -äŒçµ±ç㪠åŸæ¥ã®Cã®ãã£ã¬ã¯ãã£ãã«ã€ããŠèŠåããŸã
ç解ããŸããç¡èŠããŸã # ã®æåã®æåãšããŠè¡šç€ºãããŸãã
ãã®ç·ã ãŸãã次ã®ãããªãã£ã¬ã¯ãã£ããé衚瀺ã«ããããšããå§ãããŸã #ãã©ã°ã ç解ã§ããªã
ããããã€ã³ãã³ãããããšã«ãã£ãŠåŸæ¥ã®Cã äžéšã®åŸæ¥ã®å®è£ ã§ã¯ã
èªèãã #ãšãªãããããã£ãŠããã®ãªãã·ã§ã³ã¯ãããå®å šã«åé¿ããããšãææ¡ããŸãã
ã»åŒæ°ãªãã§è¡šç€ºãããé¢æ°ã®ãããªãã¯ãã
ã»åé ãã©ã¹æŒç®åã
ã» U æŽæ°ã®å®æ°æ¥å°ŸèŸããŸã㯠F or L æµ®åå°æ°ç¹å®æ°ã®æ¥å°ŸèŸã
ïŒåŸæ¥ã®C㯠L æŽæ°å®æ°ã®æ¥å°ŸèŸãïŒãããã«æ³šæããŠãã ãã
æ¥å°ŸèŸã¯ãææ°ã®ã·ã¹ãã ã®ã·ã¹ãã ããããŒã§å®çŸ©ãããŠãããã¯ãã«è¡šç€ºãããŸãã
äŸïŒ _MIN/_MAX "ã®ãã¯ã"ããŠãŒã¶ãŒã³ãŒãã§ãããã®ãã¯ãã䜿çšãããšã
éåžžã誀ã£ãèŠåãçºçããŸãããGCCã®çµ±åããªããã»ããµã«ã¯
ãããã®å Žåã«èŠåãåé¿ããã®ã«ååãªã³ã³ããã¹ãã
ã»XNUMXã€ã®ãããã¯ã§å€éšãšããŠå®£èšãããçµäºåŸã«äœ¿çšãããé¢æ°
ãããã¯ã
ã»ãswitchãã¹ããŒãã¡ã³ãã«ã¯ããlongãã¿ã€ãã®ãªãã©ã³ãããããŸãã
ã»éãéçãé¢æ°å®£èšã¯ãéçã宣èšã®åŸã«ç¶ããŸãã ãã®æ§æã¯
äžéšã®åŸæ¥ã®Cã³ã³ãã€ã©ã§åãå ¥ããããŠããŸãã
ã»æŽæ°å®æ°ã®ISOã¿ã€ãã¯ããã®å¹ ãŸãã¯ç¬Šå·ãšã¯ç°ãªããŸãã
äŒçµ±çãªã¿ã€ãã ãã®èŠåã¯ãå®æ°ã®åºãXNUMXã®å Žåã«ã®ã¿çºè¡ãããŸãã
ã€ãŸããéåžžããããã¿ãŒã³ãè¡šãXNUMXé²æ°ãŸãã¯XNUMXé²æ°ã®å€ã¯ã
ã«ã€ããŠèŠåããã
ã»ISOæååé£çµã®äœ¿çšãæ€åºãããŸãã
ã»èªåéèšã®åæåã
ã»èå¥åãã©ãã«ãšç«¶åããŠããŸãã åŸæ¥ã®Cã«ã¯ã
ã©ãã«
ã»çµåã®åæåã åæååããŒãã®å ŽåãèŠåã¯çç¥ãããŸãã
ããã¯ããŠãŒã¶ãŒã³ãŒãã®ãŒãåæååã衚瀺ãããããšãåæãšããŠè¡ãããŸãã
åæååã®èŠåã®æ¬ èœãåé¿ããããã«ãããšãã°ã__STDC__ããæ¡ä»¶ãšãã
åŸæ¥ã®Cã®å Žåãããã©ã«ãã®åæåã¯ãŒãã§ãã
ã»åºå®å°æ°ç¹å€ãšæµ®åå°æ°ç¹å€ã®éã®ãããã¿ã€ãã«ããå€æãããã³ãã®éã The
åŸæ¥ã®Cã§ã³ã³ãã€ã«ãããšãã«ãããã®ãããã¿ã€ãããªããšãæ·±å»ãªåå ã«ãªããŸã
åé¡ã ããã¯ãèããããå€æèŠåã®ãµãã»ããã§ãã ãã«ã»ããçš
ã€ãããŸã -åŸæ¥ã®å€æ.
ã»ISOCã¹ã¿ã€ã«ã®é¢æ°å®çŸ©ã®äœ¿çšã ãã®èŠåã¯æå³çã« çºè¡
ãããã®ISOCæ©èœã®ããããããã¿ã€ã宣èšãŸãã¯å¯å€ååŒæ°é¢æ°çš
libibertyã®åŸæ¥ã®Cäºææ§ãã¯ãã䜿çšãããšãã³ãŒãã«è¡šç€ºãããŸãã
ãPARAMSããšãVPARAMSãã ãã®èŠåã¯ããã¹ããããé¢æ°ã§ããã€ãã¹ãããŸã
ãã®æ©èœã¯ãã§ã«GCCæ¡åŒµã§ããããããã£ãŠ
åŸæ¥ã®Cäºææ§ã
-åŸæ¥ã®å€æ ïŒCããã³Objective-Cã®ã¿ïŒ
ãããã¿ã€ãã«ãã£ãŠãçºçãããã®ãšã¯ç°ãªãåå€æãçºçããå Žåã«èŠåããŸã
ãããã¿ã€ãããªãå Žåã®åãè°è«ã«ã ããã«ã¯ã
åºå®å°æ°ç¹ããæµ®åå°æ°ç¹ãžããŸãã¯ãã®éãããã³å€æã«ãã£ãŠå¹ ãŸãã¯
ããã©ã«ãã®ããã¢ãŒã·ã§ã³ãšåãå Žåãé€ããŠãåºå®å°æ°ç¹åŒæ°ã®ç¬Šå·ã
-W宣èšåŸã®ã¹ããŒãã¡ã³ã ïŒCããã³Objective-Cã®ã¿ïŒ
ãããã¯å ã®ã¹ããŒãã¡ã³ãã®åŸã«å®£èšãèŠã€ãã£ãå Žåã«èŠåããŸãã ãã®æ§æã¯ãæ¢ç¥ã§ã
C ++ãããISO C99ã§å°å ¥ãããGCCã§ããã©ã«ãã§èš±å¯ãããŠããŸãã ããã§ã¯ãªã
ISO C90ã§ãµããŒããããŠãããGCC3.0ããåã®ããŒãžã§ã³ã®GCCã§ã¯ãµããŒããããŠããŸããã§ããã
- ãŠã³ãã
æªå®çŸ©ã®èå¥åãã§è©äŸ¡ãããå Žåã«èŠåããŸã #ãã æ什ã
-Wno-endif-labels
ãã€ã§ãèŠåããªãã§ãã ãã ïŒãã®ä» ãŸã㯠#endif ãã®åŸã«ããã¹ããç¶ããŸãã
-圱
ããŒã«ã«å€æ°ãŸãã¯å宣èšãå¥ã®å€æ°ãã·ã£ããŠãããã³ã«èŠåããŸãã
ãã©ã¡ãŒã¿ãã¿ã€ãããŸãã¯ã¯ã©ã¹ã¡ã³ããŒïŒC ++ã®å ŽåïŒããŸãã¯çµã¿èŸŒã¿é¢æ°ã
圱ä»ãã C ++ã§ã¯ãããŒã«ã«å€æ°ãæ瀺çãªã·ã£ããŠãã·ã£ããŠããå Žåãã³ã³ãã€ã©ã¯èŠåããããšã«æ³šæããŠãã ãã
typedefã§ãããstruct / class/enumãã·ã£ããŠããå Žåã¯ããã§ã¯ãããŸããã
-Wlarger-than =LEN
ãã倧ãããªããžã§ã¯ããããã°ãã€ã§ãèŠåããŸã LEN ãã€ããå®çŸ©ãããŠããŸãã
-Wframe-larger-than =LEN
é¢æ°ãã¬ãŒã ã®ãµã€ãºããã倧ããå Žåã«èŠåããŸã LEN ãã€ãã è¡ãããèšç®
ã¹ã¿ãã¯ãã¬ãŒã ãµã€ãºã決å®ããããšã¯æŠç®ã§ãããä¿å®çã§ã¯ãããŸããã å®éã®
èŠä»¶ã¯ãããããã倧ãããããããŸãã LEN èŠåã衚瀺ãããªããŠãã ã®
ããã«ããallocaããå¯å€é·é åããŸãã¯é¢é£ãããã®ãä»ããŠå²ãåœãŠãããã¹ããŒã¹
ã³ã³ã¹ãã©ã¯ãã¯ãçºè¡ãããã©ããã決å®ãããšãã«ã³ã³ãã€ã©ãŒã«å«ãŸããŸããã
èŠåã
-Wno-free-éããŒããªããžã§ã¯ã
ããŒãã«å²ãåœãŠãããŠããªããªããžã§ã¯ãã解æŸããããšããŠãèŠåããªãã§ãã ããã
-Wstack-usage =LEN
é¢æ°ã®ã¹ã¿ãã¯äœ¿çšéããã倧ãããªãå¯èœæ§ãããå Žåã«èŠåããŸã LEN ãã€ãã èšç®
ã¹ã¿ãã¯ã®äœ¿çšéã決å®ããããã«è¡ãããã®ã¯æ§ããã§ãã ãallocaããä»ããŠå²ãåœãŠãããã¹ããŒã¹ã
å¯å€é·é åãŸãã¯é¢é£ããæ§é ã¯ãã³ã³ãã€ã©ã«ãã£ãŠæ¬¡ã®å Žåã«å«ãŸããŸãã
èŠåãçºè¡ãããã©ããã決å®ããŸãã
ã¡ãã»ãŒãžã¯ã®åºåãšäžèŽããŠããŸã -fstack-䜿çšæ³.
ã»ã¹ã¿ãã¯ã®äœ¿çšéãå®å šã«éçã§ããããæå®ãããéãè¶ ããå Žåã¯ã次ã®ããã«ãªããŸãã
èŠåïŒã¹ã¿ãã¯äœ¿çšéã¯1120ãã€ãã§ã
ã»ã¹ã¿ãã¯ã®äœ¿çšãïŒéšåçã«ïŒåçã§ãããå¶éãããŠããå Žåã次ã®ããã«ãªããŸãã
èŠåïŒã¹ã¿ãã¯äœ¿çšéã¯1648ãã€ãã§ããå¯èœæ§ããããŸã
ã»ã¹ã¿ãã¯ã®äœ¿çšãïŒéšåçã«ïŒåçã§ãããå¶éãããŠããªãå Žåã¯ã次ã®ããã«ãªããŸãã
èŠåïŒã¹ã¿ãã¯ã®äœ¿çšã«ã¯å¶éããªãå¯èœæ§ããããŸã
-Wunsafe ã«ãŒãã®æé©å
ã³ã³ãã€ã©ãäœãæ³å®ã§ããªãããã«ã«ãŒããæé©åã§ããªãå Žåã«èŠåãã
ã«ãŒãã€ã³ããã¯ã¹ã®å¢çã ãš -funsafe ã«ãŒãã®æé©å ã³ã³ãã€ã©ãèŠåãã
ãã®ãããªä»®å®ãããŸãã
-Wno-pedantic-ms-format ïŒMinGWã¿ãŒã²ããã®ã¿ïŒ
ãšçµã¿åãããŠäœ¿çšââããå Žå -Wãã©ãŒããã ãš -è¡åŠè GNUæ¡åŒµæ©èœãªãã§ããã
ãªãã·ã§ã³ã¯ãéISOãprintfã/ãscanfããã©ãŒãããå¹ æå®åã«é¢ããèŠåãç¡å¹ã«ããŸã
ãI32ãããI64ããããã³ãIãã¯ãMSã©ã³ã¿ã€ã ã«äŸåããWindowsã¿ãŒã²ããã§äœ¿çšãããŸãã
-Wpointer-ç®è¡
é¢æ°åãŸãã¯ãvoidãã®ããµã€ãºãã«äŸåãããã®ã«ã€ããŠèŠåããŸãã GNU C
ãvoid*ãã䜿çšããèšç®ã§äŸ¿å©ãªããã«ããããã®ã¿ã€ãã«ãµã€ãº1ãå²ãåœãŠãŸãã
é¢æ°ãžã®ãã€ã³ã¿ãšãã€ã³ã¿ã C ++ã§ã¯ãç®è¡æŒç®ã®å Žåã«ãèŠåããŸã
ãNULLããå«ã¿ãŸãã ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -Wpedantic.
-Wtype-limits
ç¯å²ãéãããŠãããããæ¯èŒãåžžã«trueãŸãã¯åžžã«falseã®å Žåã«èŠåããŸãã
ããŒã¿åã§ãããå®æ°åŒã«ã€ããŠã¯èŠåããŸããã ããšãã°ã眲åãããŠããªãå Žåã¯èŠåããŸã
å€æ°ã¯ãŒããšæ¯èŒãããŸã < or >=ã ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã
-ãŠã§ã¯ã¹ãã©.
-Wbad-function-cast ïŒCããã³Objective-Cã®ã¿ïŒ
é¢æ°åŒã³åºããäžèŽããªãåã«ãã£ã¹ãããããã³ã«èŠåããŸãã ããšãã°ã次ã®å Žåã«èŠåããŸã
ãintmallocïŒïŒãã¯ãanything*ãã«ãã£ã¹ããããŸãã
-Wc ++-äºææ§ ïŒCããã³Objective-Cã®ã¿ïŒ
ISOCããã³ISOã®äžè¬çãªãµãã»ããã®å€éšã«ããISOCæ§é ã«ã€ããŠèŠåãã
C ++ãããšãã°ãvoid*ãããéãvoidããžã®ãã€ã³ã¿ãžã®æé»ã®å€æã®èŠæ±
ã¿ã€ãã
-Wc ++ 11-äºææ§ ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ISO C++1998ãšISOC++2011ã§æå³ãç°ãªãC++æ§é ã«ã€ããŠèŠåããŸãã
ããšãã°ãISO C++1998ã®ããŒã¯ãŒãã§ããISOC++2011ã®èå¥åããã®èŠå
ãªã³ã«ãªããŸã -çãã ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wcast-qual
ã¿ãŒã²ããåããå修食åãåé€ããããã«ãã€ã³ã¿ãŒããã£ã¹ãããããã³ã«èŠåããŸãã
ããšãã°ããconstchar*ããéåžžã®ãchar*ãã«ãã£ã¹ããããå Žåã«èŠåããŸãã
ãŸããå®å šã§ãªãæ¹æ³ã§å修食åãå°å ¥ãããã£ã¹ããäœæããå Žåã«ãèŠåããŸãã ããã«
ããšãã°ã次ã®äŸã®ããã«ããchar**ãããconstchar**ãã«ãã£ã¹ãããããšã¯å®å šã§ã¯ãããŸããã
/*pã¯char**å€ã§ãã * /
const char ** q =ïŒconst char **ïŒp;
/ *constcharãžã®èªã¿åãå°çšæååã®å²ãåœãŠ*ã¯OKã§ãã * /
* q="æåå";
/ *char**ãã€ã³ã¿ãèªã¿åãå°çšã¡ã¢ãªãæãããã«ãªããŸããã * /
** p ='b';
-Wcast-align
ã¿ãŒã²ããã®å¿ èŠãªé 眮ã次ã®ããã«ãªãããã«ãã€ã³ã¿ããã£ã¹ãããããã³ã«èŠåããŸã
å¢å ããŸããã ããšãã°ã次ã®ãã·ã³ã§ãchar*ãããint*ãã«ãã£ã¹ããããå Žåã«èŠåããŸãã
æŽæ°ã«ã¯ãXNUMXãã€ããŸãã¯XNUMXãã€ãã®å¢çã§ã®ã¿ã¢ã¯ã»ã¹ã§ããŸãã
-æžã蟌ã¿æåå
Cãã³ã³ãã€ã«ãããšãã¯ãæååå®æ°ã«ãconst char[é·ã]" ã³ããŒããããã«
éãconstããchar*ããã€ã³ã¿ãžã®XNUMXã®ã¢ãã¬ã¹ã¯ãèŠåãçæããŸãã ãããã¯
èŠåã¯ãã³ã³ãã€ã«æã«æååã«æžã蟌ãããšããå¯èœæ§ã®ããã³ãŒããèŠã€ããã®ã«åœ¹ç«ã¡ãŸã
å®æ°ã§ããã宣èšã§ãconstãã䜿çšããããšã«éåžžã«æ³šæããŠããå Žåã«éããŸã
ãšãããã¿ã€ãã ããã§ãªããã°ãããã¯ãã ã®è¿·æã§ãã ãããç§ãã¡ãäœããªãã£ãçç±ã§ã -å£
ãããã®èŠåãèŠæ±ããŸãã
C ++ãã³ã³ãã€ã«ãããšãã¯ãæååãªãã©ã«ãããcharããžã®éæšå¥šã®å€æã«ã€ããŠèŠåããŠãã ããã
* "ããã®èŠåã¯ãC++ããã°ã©ã ã§ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-ç Žå£ããã
ã«ãã£ãŠå€æŽãããå¯èœæ§ã®ããå€æ°ã«ã€ããŠèŠåãã ãã³ã°ãžã£ã³ã or vãã©ãŒã¯ã ãã®èŠåã
æå¹ã«ãã -ãŠã§ã¯ã¹ãã©.
-æ¡ä»¶ä»ãã§ãµããŒã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
æ¡ä»¶ä»ãã§ãµããŒããããŠããïŒC ++ 11 [intro.defs]ïŒæ§é ã«ã€ããŠèŠåããŸãã
-Wã³ã³ããŒãžã§ã³
å€ãå€æŽããå¯èœæ§ã®ããæé»ã®å€æã«ã€ããŠèŠåããŸãã ããã«ã¯ã³ã³ããŒãžã§ã³ãå«ãŸããŸã
ãxãããdoubleãã®å Žåã®ãabsïŒxïŒãã®ããã«ãå®æ°ãšæŽæ°ã®éã éã®å€æ
ãunsignedui=-1ãã®ããã«ãsignedãšunsignedã ã®ãããªå°ããªã¿ã€ããžã®å€æ
ãsqrtfïŒM_PIïŒãã ãabsïŒïŒintïŒxïŒãããui =
ïŒç¬Šå·ãªãïŒ-1ããŸãã¯ãabsïŒ2.0ïŒãã®ããã«å€æã«ãã£ãŠå€ãå€æŽãããªãå Žåã
笊å·ä»ãæŽæ°ãšç¬Šå·ãªãæŽæ°ã®éã®å€æã«é¢ããèŠåã¯ã次ã®æ¹æ³ã§ç¡å¹ã«ã§ããŸãã
-笊å·ãªãå€æ.
C ++ã®å ŽåããŠãŒã¶ãŒå®çŸ©ã®å€æã®éè² è·è§£æ±ºãæ··ä¹±ãããããšã«ã€ããŠãèŠåããŸãã ãš
åå€ææŒç®åã䜿çšããªãå€æïŒãvoidããžã®å€æãåã
ã¿ã€ããåºæ¬ã¯ã©ã¹ããŸãã¯ããããžã®åç §ã 眲åãããéã®å€æã«é¢ããèŠå
笊å·ãªãæŽæ°ã¯ãC++ã§ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã -Wsign-å€æ is
æ瀺çã«æå¹åã
-Wno-conversion-null ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ãNULLãã¿ã€ããšéãã€ã³ã¿ãŒã¿ã€ãã®éã®å€æã«ã€ããŠèŠåããªãã§ãã ããã -Wconversion-null is
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-Wzero-as-null-ãã€ã³ã¿ãŒå®æ° ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
ãªãã©ã«ã0ããnullãã€ã³ã¿å®æ°ãšããŠäœ¿çšãããŠããå Žåã«èŠåããŸãã ããã¯æ¬¡ã®å Žåã«åœ¹ç«ã¡ãŸã
C++11ã§ã®ãnullptrããžã®å€æã容æã«ããŸãã
-æ¥ä»-æå»
ãã¯ãã__TIME__ããã__ DATE __ãããŸãã¯ã__TIMESTAMP__ããæ€åºããããšãã«èŠåããŸã
ãããåäœã§åäžã®åçŸå¯èœãªã³ã³ãã€ã«ã劚ããå¯èœæ§ããããŸãã
-Wdelete-äžå®å š ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
äžå®å šãªåãžã®ãã€ã³ã¿ãåé€ãããšãã«èŠåããŸããããã«ãããã§æªå®çŸ©ã®åäœãçºçããå¯èœæ§ããããŸãã
ã©ã³ã¿ã€ã ã ãã®èŠåã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-ç¡é§ãªãã£ã¹ã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
åŒãç¬èªã®åã«ãã£ã¹ãããããšãã«èŠåããŸãã
-空ã£ãœã®äœ
空ã®ããã£ãçºçããå Žåã«èŠåããŸã if, ã»ãã« or do while 声æã ãã®èŠåã¯
ã«ãã£ãŠãæå¹ã«ãªããŸã -ãŠã§ã¯ã¹ãã©.
-ãŠã§ãã -æ¯èŒ
ç°ãªãåæåã®å€ã®æ¯èŒã«ã€ããŠèŠåããŸãã C++åæã§
æ¡ä»¶åŒã®äžäžèŽã蚺æãããèŠåã¯æ¬¡ã®ããã«æå¹ã«ãªããŸãã
ãã£ãã©ã«ãã Cã§ã¯ããã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wjump-miss-init ïŒCãObjective-Cã®ã¿ïŒ
ãgotoãã¹ããŒãã¡ã³ããŸãã¯ãswitchãã¹ããŒãã¡ã³ããåæ¹ã«ãžã£ã³ãããå Žåã«èŠåããŸãã
å€æ°ã®åæåããŸãã¯å€æ°ãå®è¡ãããåŸã«ã©ãã«ã«éæ¹åã«ãžã£ã³ãããŸã
åæåãããŸããã ããã¯ãåæåããããšãã«åæåãããå€æ°ã«ã€ããŠã®ã¿èŠåããŸã
宣èšããã ãã®èŠåã¯ãCããã³Objective-Cã§ã®ã¿ãµããŒããããŠããŸãã C++ã§ã¯ãã®çš®ã®
ãããã®å Žåãããã©ã³ãã¯ãšã©ãŒã§ãã
-Wjump-miss-init ã«å«ãŸããŠããŸã -Wc ++-äºææ§ã ã§ç¡å¹ã«ããããšãã§ããŸã
-Wno-jump-missis-init ãªãã·ã§ã³ãéžæããŸãã
-Wsign-æ¯èŒ
笊å·ä»ãã®å€ãšç¬Šå·ãªãã®å€ãæ¯èŒãããšãæ£ãããªãå€ãçæãããå¯èœæ§ãããå Žåã«èŠåããŸã
笊å·ä»ãã®å€ã笊å·ãªãã«å€æããããšãã®çµæã ãã®èŠåãæå¹ã«ãªã£ãŠããŸã
by -ãŠã§ã¯ã¹ãã©; ä»ã®èŠåãååŸããã«ã¯ -ãŠã§ã¯ã¹ãã© ãã®èŠåãªãã§ã -ãŠã§ã¯ã¹ãã©
-Wno-笊å·æ¯èŒ.
-Wsign-å€æ
æŽæ°å€ã®ç¬Šå·ãå€æŽããå¯èœæ§ã®ããæé»ã®å€æã«ã€ããŠèŠåããŸãã
笊å·ä»ãæŽæ°åŒã笊å·ãªãæŽæ°å€æ°ã«å²ãåœãŠãŸãã æ瀺çãª
ãã£ã¹ãã¯èŠåãæ²é»ãããŸãã Cã§ã¯ããã®ãªãã·ã§ã³ã¯æ¬¡ã®æ¹æ³ã§ãæå¹ã«ãªããŸã -Wã³ã³ããŒãžã§ã³.
-Wfloat-å€æ
å®éã®å€ã®ç²ŸåºŠãäœäžãããæé»ã®å€æã«ã€ããŠèŠåããŸãã ãã
å®æ°ããæŽæ°ãžã®å€æãããã³é«ç²ŸåºŠã®å®æ°ããäœç²ŸåºŠãžã®å€æãå«ãŸããŸã
粟床ã®å®æ°å€ã ãã®ãªãã·ã§ã³ã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -Wã³ã³ããŒãžã§ã³.
-Wsizeof-pointer-memaccess
ç¹å®ã®æååããã³ã¡ã¢ãªã®çµã¿èŸŒã¿é¢æ°ã«å¯Ÿããçãããé·ããã©ã¡ãŒã¿ã«ã€ããŠèŠåããŸã
åŒæ°ããsizeofãã䜿çšããå Žåã ãã®èŠåã¯ãããšãã°ãmemsetïŒptrã0ãsizeof
ïŒptrïŒïŒ; "" ptr "ãé åã§ã¯ãªããã€ã³ã¿ã§ãããå¯èœãªä¿®æ£ãææ¡ããå ŽåããŸãã¯
ãmemcpyïŒïŒfooãptrãsizeofïŒïŒfooïŒïŒ;ãã«ã€ããŠã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wmemset-転眮ãããåŒæ°
XNUMXçªç®ã®åŒæ°ã次ã®å Žåããmemsetãçµã¿èŸŒã¿é¢æ°ãžã®çãããåŒã³åºãã«ã€ããŠèŠåããŸãã
ãŒãã§ã¯ãªããXNUMXçªç®ã®åŒæ°ã¯ãŒãã§ãã ããã¯eg@ã«"memsetïŒbufãsizeof
代ããã«ããããããmemsetïŒbufã0ãsizeof bufïŒããæå³ãããŠããŸããã
蚺æã¯ãXNUMXçªç®ã®åŒæ°ããªãã©ã«ãŒãã®å Žåã«ã®ã¿çºè¡ãããŸãã
ãŒãã«æããããŸããåŒããŸãã¯ããšãã°ãŒãããããã¿ã€ããžã®ãã£ã¹ããªã©ãããã¯é ãã§ã
ãŠãŒã¶ãŒã誀ã£ãŠåŒæ°ã亀æããå¯èœæ§ãäœããèŠåã¯ãããŸãã
æŸåºãããã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-äœæ
ã¡ã¢ãªã¢ãã¬ã¹ã®çããã䜿çšã«ã€ããŠèŠåããŸãã ãããã«ã¯ã
ãvoidfuncïŒvoidïŒ; ifïŒfuncïŒããªã©ã®æ¡ä»¶åŒã®é¢æ°ãããã³
ãifïŒx == "abc"ïŒããªã©ã®æååãªãã©ã«ã®ã¡ã¢ãªã¢ãã¬ã¹ãšã®æ¯èŒã
ãã®ãããªäœ¿çšæ³ã¯éåžžãããã°ã©ããŒãšã©ãŒã瀺ããŸããé¢æ°ã®ã¢ãã¬ã¹ã¯åžžã«
trueãšè©äŸ¡ããããããæ¡ä»¶ä»ãã§ã®äœ¿çšã¯éåžžãããã°ã©ããŒã
é¢æ°åŒã³åºãã§æ¬åŒ§ãå¿ããŸããã ããã³æååãªãã©ã«ãšã®æ¯èŒ
çµæãšããŠäžç¹å®ã®åäœãçºçããCã§ç§»æ€ã§ããªããããéåžžã¯
ããã°ã©ããŒããstrcmpãã䜿çšããããšãæå³ããŠããããšã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wlogical-op
åŒã§ã®è«çæŒç®åã®çããã䜿çšã«ã€ããŠèŠåããŸãã ããã«ã¯äœ¿çšãå«ãŸããŸã
ãããåäœã®æŒç®åãæåŸ ãããå¯èœæ§ãé«ãã³ã³ããã¹ãã§ã®è«çæŒç®åã
-Waggregate-return
æ§é äœãŸãã¯å ±çšäœãè¿ãé¢æ°ãå®çŸ©ãŸãã¯åŒã³åºãããå Žåã«èŠåããŸãã ïŒã®
é åãè¿ãããšãã§ããèšèªã§ã¯ããããèŠåãåŒãèµ·ãããŸããïŒ
-Wno-aggressive-loop-optimizations
å埩åæ°ãäžå®ã®ã«ãŒãå ã§ãã³ã³ãã€ã©ãæªå®çŸ©ãæ€åºããå Žåã«èŠåããŸã
XNUMXã€ä»¥äžã®å埩äžã®ã¹ããŒãã¡ã³ãã®åäœã
-Wno-å±æ§
èªèãããªãå±æ§ãªã©ãäºæããªãã__attribute__ãã䜿çšãããŠãèŠåããªãã§ãã ããã
å€æ°ãªã©ã«é©çšãããé¢æ°å±æ§ãããã¯ã
ãµããŒããããŠããå±æ§ã®èª€ã£ã䜿çšã
-Wno-builtin-macro-åå®çŸ©
ç¹å®ã®çµã¿èŸŒã¿ãã¯ããåå®çŸ©ãããŠãèŠåããªãã§ãã ããã ããã«ããã
ã__TIMESTAMP__ããã__ TIME __ããã__ DATE __ããã__ FILE __ããããã³
ã__BASE_FILE__ãã
-Wstrict-ãããã¿ã€ã ïŒCããã³Objective-Cã®ã¿ïŒ
åŒæ°ã®åãæå®ããã«é¢æ°ã宣èšãŸãã¯å®çŸ©ãããå Žåã«èŠåããŸãã ïŒ
å€ãã¹ã¿ã€ã«ã®é¢æ°å®çŸ©ã¯ãåã«
åŒæ°ã®åãæå®ãã宣èšãïŒ
-Wold ã¹ã¿ã€ã«å®£èš ïŒCããã³Objective-Cã®ã¿ïŒ
宣èšã®äžã§ãCæšæºã«åŸã£ãŠå»æ¢ããã䜿çšæ³ã«ã€ããŠèŠåããŸãã ããã«
ããšãã°ããéçããªã©ã®ã¹ãã¬ãŒãžã¯ã©ã¹æå®åãæåã®ãã®ã§ã¯ãªãå Žåã¯èŠåããŸãã
宣èšã ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -ãŠã§ã¯ã¹ãã©.
-Wold ã¹ã¿ã€ã«ã®å®çŸ© ïŒCããã³Objective-Cã®ã¿ïŒ
å€ãã¹ã¿ã€ã«ã®é¢æ°å®çŸ©ã䜿çšãããŠããå Žåã¯èŠåããŸãã ããå Žåã§ãèŠåãåºãããŸã
以åã®ãããã¿ã€ãã
-æ¬ èœãã©ã¡ãŒã¿ã®çš®é¡ ïŒCããã³Objective-Cã®ã¿ïŒ
é¢æ°ãã©ã¡ãŒã¿ãŒã¯ãKïŒRã¹ã¿ã€ã«ã®é¢æ°ã§åæå®åãªãã§å®£èšãããŸãã
void fooïŒbarïŒ{}
ãã®èŠåã¯ãã«ãã£ãŠãæå¹ã«ãªããŸã -ãŠã§ã¯ã¹ãã©.
-æ¬ èœ-ãããã¿ã€ã ïŒCããã³Objective-Cã®ã¿ïŒ
以åã®ãããã¿ã€ã宣èšãªãã§ã°ããŒãã«é¢æ°ãå®çŸ©ãããŠããå Žåã«èŠåããŸãã ãã
å®çŸ©èªäœããããã¿ã€ããæäŸããŠããå Žåã§ããèŠåãçºè¡ãããŸãã ãã®ãªãã·ã§ã³ã䜿çšãã
ã«äžèŽãããããã¿ã€ã宣èšããªãã°ããŒãã«é¢æ°ãæ€åºãã
ããããŒãã¡ã€ã«ã ãã¹ãŠã®é¢æ°å®£èšãåå ã§ããã®ãªãã·ã§ã³ã¯C++ã§ã¯ç¡å¹ã§ãã
ãããã¿ã€ããæäŸããäžèŽããªã宣èšã¯ã§ã¯ãªããªãŒããŒããŒãã宣èšããŸã
以åã®å®£èšãšç«¶åããŸãã 䜿çšãã -æ¬ èœ-å®£èš è¡æ¹äžæãæ€åºãã
C++ã§ã®å®£èšã
-æ¬ èœ-宣èš
ã°ããŒãã«é¢æ°ãäºåã®å®£èšãªãã§å®çŸ©ãããŠããå Žåã«èŠåããŸãã ããšãããããŠã
å®çŸ©èªäœããããã¿ã€ããæäŸããŸãã ãã®ãªãã·ã§ã³ã䜿çšããŠãã°ããŒãã«ãæ€åºããŸã
ããããŒãã¡ã€ã«ã§å®£èšãããŠããªãé¢æ°ã Cã§ã¯ãèŠåã¯çºè¡ãããŸããã
以åã®éãããã¿ã€ã宣èšãæã€é¢æ°ã 䜿çšãã -Wmissing-ãããã¿ã€ã æ€åºãã
ãããã¿ã€ãããããŸããã C ++ã§ã¯ãé¢æ°ãã³ãã¬ãŒããŸãã¯é¢æ°ãã³ãã¬ãŒãã«å¯ŸããŠèŠåã¯çºè¡ãããŸããã
ã€ã³ã©ã€ã³é¢æ°ããŸãã¯å¿ååå空éã®é¢æ°ã®å Žåã
-äžè¶³ãã£ãŒã«ãåæåå
æ§é äœã®åæååã«ããã€ãã®ãã£ãŒã«ããæ¬ èœããŠããå Žåã«èŠåããŸãã ããšãã°ã次ã®
ãxhãã¯æé»çã«ãŒãã§ãããããã³ãŒãã¯ãã®ãããªèŠåãåŒãèµ·ãããŸãã
struct s {int fãgãh; };
struct sx = {3ã4};
ãã®ãªãã·ã§ã³ã¯æå®ãããåæååã«ã€ããŠèŠåããªãããã次ã®å€æŽãè¡ãããŸã
èŠåãããªã¬ãŒããŸããïŒ
struct s {int fãgãh; };
struct sx = {.f = 3ã.g = 4};
ãã®èŠåã¯ã«å«ãŸããŠããŸã -ãŠã§ã¯ã¹ãã©ã ä»ãååŸããã«ã¯ -ãŠã§ã¯ã¹ãã© ãããªãã®èŠåã
ã€ãããŸã -ãŠã§ã¯ã¹ãã© -Wno-missing-field-initializers.
-Wno-multichar
è€æ°æåã®å®æ°ïŒãFOOFãïŒ äœ¿çšãããŠããã éåžžããããã¯
ãŠãŒã¶ãŒã®ã³ãŒãã®ã¿ã€ããã¹ãå®è£ ã§å®çŸ©ãããå€ãããã
ããŒã¿ãã«ã³ãŒãã§äœ¿çšãããŸãã
-Wnormalized =
ISOCãšISOC++ã§ã¯ãXNUMXã€ã®èå¥åãç°ãªãã·ãŒã±ã³ã¹ã§ããå Žåããããã¯ç°ãªããŸãã
æåã ãã ããåºæ¬çãªASCIIæåã»ãã以å€ã®æåã®å Žå
ã䜿çšãããšãåãããã«èŠããXNUMXã€ã®ç°ãªãæåã·ãŒã±ã³ã¹ãæã€ããšãã§ããŸãã é¿ããããã«
æ··ä¹±ããŠãISO10646æšæºã¯ããã€ããèšå®ããŸã æ£èŠå ã«ãŒã« é©çšãããš
åãããã«èŠããXNUMXã€ã®ã·ãŒã±ã³ã¹ãåãã·ãŒã±ã³ã¹ã«å€æãããããšã確èªããŠãã ããã GCC
æ£èŠåãããŠããªãèå¥åã䜿çšããŠããå Žåã¯èŠåã§ããŸãã ãã®ãªãã·ã§ã³
ãã®èŠåãå¶åŸ¡ããŸãã
GCCã§ãµããŒããããŠããèŠåã«ã¯XNUMXã€ã®ã¬ãã«ããããŸãã ããã©ã«ã㯠-Wnormalized = nfc,
ããã¯ãISO10646"C"æ£èŠå圢åŒã§ã¯ãªãèå¥åã«ã€ããŠèŠåããŸãã
NFCã NFCã¯ãã»ãšãã©ã®çšéã«æšå¥šããã圢åŒã§ãã
æ®å¿µãªãããISOCããã³ISOC++ã§èå¥åã«èš±å¯ãããŠããæåãããã€ããããŸãã
ããã¯ãNFCã«å€æããããšãèå¥åã§ã¯èš±å¯ãããŸããã ã€ãŸããæ¹æ³ã¯ãããŸãã
ãããã®ã·ã³ãã«ãããŒã¿ãã«ISOCãŸãã¯C++ã§äœ¿çšãããã¹ãŠã®èå¥åãNFCã«å«ããã«ã¯ã
-Wnormalized = id ãããã®æåã®èŠåãæå¶ããŸãã å°æ¥ãæåŸ ãããŸã
é¢é£ããèŠæ Œã®ããŒãžã§ã³ã¯ãããä¿®æ£ããŸãããã®ããããã®ãªãã·ã§ã³ã¯ä¿®æ£ãããŸããã
ããã©ã«ãã
次ã®ããã«æžãããšã§ããã¹ãŠã®æåã®èŠåããªãã«åãæ¿ããããšãã§ããŸã -Wnormalized = noneã ããªã
ããã¯ãä»ã®æ£èŠåã¹ããŒã ïŒ "D"ãªã©ïŒã䜿çšããŠããå Žåã«ã®ã¿è¡ãå¿ èŠããããŸãã
ããããªããšãæåéãèŠãããšãäžå¯èœãªãã°ãç°¡åã«äœæã§ããããã§ãã
ISO 10646ã®äžéšã®æåã«ã¯æ確ãªæå³ããããŸãããäžéšã®ãã©ã³ãã§ã¯åãããã«èŠããŸã
ãŸãã¯ãç¹ã«ãã©ãŒããããé©çšãããåŸã®è¡šç€ºæ¹æ³ã äŸãã°
ã\u207FãããSUPERSCRIPT LATIN SMALL LETTER Nãã¯ãéåžžã®ãnããšåãããã«è¡šç€ºãããŸãã
äžä»ãæåã«é 眮ãããŠããŸãã ISO 10646ã¯ã NFKC æ£èŠåã¹ããŒã
ããããã¹ãŠãæšæºåœ¢åŒã«å€æãããšãGCCã¯ã³ãŒããå«ãŸããŠããªãå Žåã«èŠåããŸã
䜿çšããå Žåã¯NFKC -Wnormalized = nfkcã ãã®èŠåã¯ããã¹ãŠã®èŠåã«çžåœããŸã
æ°å0ãšæ··åãããå¯èœæ§ããããããæåOãå«ãèå¥åã
ãããã£ãŠãããã¯ããã©ã«ãã§ã¯ãããŸããããããŒã«ã«ã³ãŒãã£ã³ã°èŠçŽãšããŠåœ¹ç«ã€å ŽåããããŸãã
ãããã®æåãæ確ã«è¡šç€ºããããã«ããã°ã©ãã³ã°ç°å¢ãä¿®æ£ããããšã¯ã§ããŸããã
-Wno-éæšå¥š
éæšå¥šã®æ©èœã®äœ¿çšã«ã€ããŠèŠåããªãã§ãã ããã
-Wno-éæšå¥š-宣èš
éæšå¥šãšããŠããŒã¯ãããé¢æ°ãå€æ°ãããã³åã®äœ¿çšã«ã€ããŠèŠåããªãã§ãã ããã
ãéæšå¥šãå±æ§ã䜿çšããŸãã
-ãªãŒããŒãããŒãªã
å®æ°åŒã§ã®ã³ã³ãã€ã«æã®ãªãŒããŒãããŒã«ã€ããŠèŠåããªãã§ãã ããã
-Wopenmp-simd
ãã¯ã¿ãŒåã³ã¹ãã¢ãã«ãOpenMPãŸãã¯CilkPlussimdãã£ã¬ã¯ãã£ãããªãŒããŒã©ã€ãããå Žåã«èŠåããŸã
ãŠãŒã¶ãŒãèšå®ããŸãã The -fsimd-cost-model = unlimited ã³ã¹ãã¢ãã«ãç·©åããããã«äœ¿çšã§ããŸãã
-Woverride-init ïŒCããã³Objective-Cã®ã¿ïŒ
æå®ã䜿çšãããšãã«ãå¯äœçšã®ãªãåæåããããã£ãŒã«ãããªãŒããŒã©ã€ããããå Žåã«èŠåããŸã
åæååã
ãã®èŠåã¯ã«å«ãŸããŠããŸã -ãŠã§ã¯ã¹ãã©ã ä»ãååŸããã«ã¯ -ãŠã§ã¯ã¹ãã© ãããªãã®èŠåã
ã€ãããŸã -ãŠã§ã¯ã¹ãã© -Wno-override-init.
-Wããã¯
æ§é äœã«packedå±æ§ãäžããããŠããããpackedå±æ§ã«ã¯
æ§é ã®ã¬ã€ã¢ãŠããŸãã¯ãµã€ãºãžã®åœ±é¿ã ãã®ãããªæ§é ã¯ã
ã¡ãªããã¯ã»ãšãã©ãããŸããã ããšãã°ããã®ã³ãŒãã§ã¯ããstructbarãã®å€æ°ãfxãã¯æ¬¡ã®ããã«ãªããŸãã
ãæ§é äœããŒãèªäœã«packedå±æ§ããªãå Žåã§ããäœçœ®ããããŠããŸãã
æ§é äœ foo {
int x;
char aãbãcãd;
} __attribute __ïŒïŒpackedïŒïŒ;
æ§é äœããŒ{
æåz;
æ§é äœ foo f;
};
-Wpacked-bitfield-compat
GCCã®4.1ã4.2ãããã³4.3ã·ãªãŒãºã¯ãã¿ã€ãã®ããããã£ãŒã«ãã®ãpackedãå±æ§ãç¡èŠããŸãã
ãcharãã ããã¯GCC4.4ã§ä¿®æ£ãããŠããŸããããã®å€æŽã«ããã
æ§é ã¬ã€ã¢ãŠãã GCCã¯ããã®ãããªãã£ãŒã«ãã®ãªãã»ãããGCCã§å€æŽããããšãã«éç¥ããŸã
4.4ã ããšãã°ããã®ãã£ãŒã«ããaããšãbãã®éã«4ãããã®ããã£ã³ã°ã¯ãããŸããã
æ§é ïŒ
æ§é äœ foo
{
char aïŒ4;
char bïŒ8;
} __attribute__ïŒïŒpackedïŒïŒ;
ãã®èŠåã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã 䜿çšãã -Wno-packed-bitfield-compat ãããç¡å¹ã«ããã«ã¯
èŠåã
-ãããå ¥ã
æ§é ã«ããã£ã³ã°ãå«ãŸããŠããå Žåã¯ãèŠçŽ ãæŽåãããããã«èŠåããŸãã
æ§é ãŸãã¯æ§é å šäœãæŽåãããŸãã æã ãããèµ·ãããšãããã¯å¯èœã§ã
æ§é ã®ãã£ãŒã«ããåé 眮ããŠããã£ã³ã°ãæžããã
æ§é ãå°ããã
-åé·-decls
åãã¹ã³ãŒãå ã§äœããè€æ°å宣èšãããŠããå Žåã¯ã次ã®å Žåã§ãèŠåããŸãã
è€æ°ã®å®£èšã¯æå¹ã§ãããäœãå€æŽããŸããã
-Wnested-externs ïŒCããã³Objective-Cã®ã¿ïŒ
é¢æ°å ã§ãexternã宣èšãæ€åºãããå Žåã«èŠåããŸãã
-Wno-inherited-variadic-ctor
åºæ¬ã¯ã©ã¹ã®å ŽåãC++11ç¶æ¿ã³ã³ã¹ãã©ã¯ã¿ãŒã®äœ¿çšã«é¢ããèŠåãæå¶ããŸã
ç¶æ¿å ã«ã¯CåååŒæ°ã³ã³ã¹ãã©ã¯ã¿ãŒããããŸãã èŠåã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
çç¥èšå·ã¯ç¶æ¿ãããŸããã
-ãŠã£ã³ã©ã€ã³
ã€ã³ã©ã€ã³ãšããŠå®£èšãããŠããé¢æ°ãã€ã³ã©ã€ã³åã§ããªãå Žåã«èŠåããŸãã ããã§ã
ãªãã·ã§ã³ã®å Žåãã³ã³ãã€ã©ã¯ã§å®£èšãããã€ã³ã©ã€ã³é¢æ°ã®å€±æã«ã€ããŠèŠåããŸãã
ã·ã¹ãã ããããŒã
ã³ã³ãã€ã©ãŒã¯ãããŸããŸãªãã¥ãŒãªã¹ãã£ãã¯ã䜿çšããŠãã€ã³ã©ã€ã³åãããã©ããã決å®ããŸãã
é¢æ°ã ããšãã°ãã³ã³ãã€ã©ã¯é¢æ°ã®ãµã€ãºãèæ ®ã«å ¥ããŸã
ã€ã³ã©ã€ã³åãããçŸåšã®é¢æ°ã§ãã§ã«å®è¡ãããŠããã€ã³ã©ã€ã³åã®éã
ãããã£ãŠããœãŒã¹ããã°ã©ã ã®éèŠã§ãªãããã«èŠããå€æŽã«ããã
ã«ãã£ãŠçæãããèŠå -ãŠã£ã³ã©ã€ã³ 衚瀺ãŸãã¯é衚瀺ã«ããŸãã
-Wno-ç¡å¹ãªãªãã»ãã ïŒC ++ããã³Objective-C ++ã®ã¿ïŒ
é©çšããã®èŠåãæå¶ããŸã ãªãã»ãã éPODã¿ã€ããžã®ãã¯ãã ã«ãããš
1998幎ã®ISOC++æšæºãé©çš ãªãã»ãã éPODã¿ã€ããžã®å€æã¯æªå®çŸ©ã§ãã ã®
ãã ããæ¢åã®C++å®è£ ãªãã»ãã éåžžãæå³ã®ããçµæãåŸãããŸã
ç¹å®ã®çš®é¡ã®éPODã¿ã€ãïŒåçŽãªãã®ãªã©ïŒã«é©çšãããå Žåã§ã æ§é ãã
ã³ã³ã¹ãã©ã¯ã¿ãŒããããšããçç±ã ãã§PODã¿ã€ãã«ãªãããšã¯ã§ããŸããïŒã ãã®ãã©ã°ã¯
移æ€æ§ã®ãªãã³ãŒããæžããŠããããšãèªèããŠããŠãæ æã«
ããã«ã€ããŠã®èŠåãç¡èŠããããšãéžæããŸããã
ã®å¶é ãªãã»ãã C++æšæºã®å°æ¥ã®ããŒãžã§ã³ã§ç·©åãããå¯èœæ§ããããŸãã
-Wno-int-to-pointer-cast
ç°ãªããµã€ãºã®æŽæ°ã®ãã€ã³ã¿åãžã®ãã£ã¹ãããã®èŠåãæå¶ããŸãã ã®
C ++ãå°ãããµã€ãºã®ãã€ã³ã¿åãžã®ãã£ã¹ãã¯ãšã©ãŒã§ãã Wint ãããã€ã³ã¿ãŒãžã®ãã£ã¹ã is
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-Wno-pointer-to-int-cast ïŒCããã³Objective-Cã®ã¿ïŒ
ãã€ã³ã¿ããç°ãªããµã€ãºã®æŽæ°åãžã®ãã£ã¹ãããã®èŠåãæå¶ããŸãã
-Winvalid-pch
ããªã³ã³ãã€ã«æžã¿ããããŒãæ€çŽ¢ãã¹ã«èŠã€ãã£ããã䜿çšã§ããªãå Žåã«èŠåããŸãã
-ãŠãŒãã³è¶
èŠåããå Žå é·ã é·ã ã¿ã€ãã䜿çšãããŸãã ããã¯ã次ã®ããããã«ãã£ãŠæå¹ã«ãªããŸã -Wpedantic or -äŒçµ±çãª
ISOC90ããã³C++98ã¢ãŒãã§ã èŠåã¡ãã»ãŒãžãçŠæ¢ããã«ã¯ã -Wno-long-long.
-Wvariadic-ãã¯ã
å¯å€ååŒæ°ãã¯ããããã³ãã£ãã¯ISOC90ã¢ãŒãããŸãã¯GNU代æ¿æ§æã§äœ¿çšãããŠããå Žåã«èŠåãã
ããã³ãã£ãã¯ISOC99ã¢ãŒãã®å Žåã ããã¯ããã©ã«ãã§ãã èŠåã¡ãã»ãŒãžãçŠæ¢ããã«ã¯ã
-å¯å€ååŒæ°ãã¯ããªã.
-Wvarargs
次ã®ãããªå¯å€åŒæ°ãåŠçããããã«äœ¿çšããããã¯ãã®çããã䜿çšæ³ã«ã€ããŠèŠåããŸãã
va_startã ããã¯ããã©ã«ãã§ãã èŠåã¡ãã»ãŒãžãçŠæ¢ããã«ã¯ã -Wno-varargs.
-Wvector-æäœ-ããã©ãŒãã³ã¹
ãã¯ãã«æŒç®ãã¢ãŒããã¯ãã£ã®SIMDæ©èœãä»ããŠå®è£ ãããŠããªãå Žåã«èŠåããŸãã
äž»ã«ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°ã«åœ¹ç«ã¡ãŸãã ãã¯ãã«æŒç®ãå®è£ ã§ããŸã
ãåºåçããã€ãŸãã¹ã«ã©ãŒæŒç®ããã¹ãŠã®ãã¯ãã«ã§å®è¡ãããããšãæå³ããŸã
ãšã¬ã¡ã³ã; ã䞊åããšã¯ããã¯ãã«æŒç®ã以äžã䜿çšããŠå®è£ ãããããšãæå³ããŸãã
å¹ ã®åºãã¿ã€ãã®ã¹ã«ã©ãŒãéåžžãããã©ãŒãã³ã¹å¹çãé«ããªããŸãã ãšãã·ã³ã°ã«ãšããŠ
ã¹ã«ã©ãŒãã¯ããã¯ãã«ãã¹ã«ã©ãŒåã«é©åããããšãæå³ããŸãã
-Wno-virtual-move-assign
éèŠãªC++11ã®ç§»åã§ä»®æ³ããŒã¹ããç¶æ¿ããããšã«é¢ããèŠåãæå¶ããŸã
ä»£å ¥æŒç®åã ä»®æ³ããŒã¹ã«æ²¿ã£ãŠå°éå¯èœã§ããå Žåãããã¯å±éºã§ã
è€æ°ã®ãã¹ã®å Žåãè€æ°å移åãããŸããã€ãŸããäž¡æ¹ã®ãªããžã§ã¯ããçµäºããå¯èœæ§ããããŸãã
移åå ã®ç¶æ ã§ã¢ããããŸãã ã ãŒãä»£å ¥æŒç®åãåé¿ããããã«èšè¿°ãããŠããå Žå
移åå ãªããžã§ã¯ããã移åããå Žåããã®èŠåãç¡å¹ã«ããããšãã§ããŸãã
-Wvla
ã³ãŒãã§å¯å€é·é åã䜿çšãããŠããå Žåã¯èŠåããŸãã -Wno-vla é²ã -Wpedantic
å¯å€é·é åã®èŠåã
-Wvolatile ã¬ãžã¹ã¿å€æ°
ã¬ãžã¹ã¿å€æ°ãæ®çºæ§ã§ãããšå®£èšãããå Žåã«èŠåããŸãã æ®çºæ§ã¢ãã£ãã¡ã€ã¢ã¯ããŸãã
ç»é²ããããã®èªã¿åãããã³/ãŸãã¯æžã蟌ã¿ãæé€ããå¯èœæ§ã®ãããã¹ãŠã®æé©åãçŠæ¢ãã
å€æ°ã ãã®èŠåã¯ã«ãã£ãŠæå¹ã«ãªããŸã -å£.
-Wdisabled-æé©å
èŠæ±ãããæé©åãã¹ãç¡å¹ã«ãªã£ãŠããå Žåã«èŠåããŸãã ãã®èŠåã¯äžè¬çã«ã¯çºçããŸãã
ã³ãŒãã«åé¡ãããããšã瀺ããŸãã ããã¯åã«GCCã®
ãªããã£ãã€ã¶ãŒã¯ã³ãŒããå¹æçã«åŠçã§ããŸããã å€ãã®å Žåãåé¡ã¯ããªãã®
ã³ãŒãã倧ãããããè€éãããŸãã GCCã¯ãæé©åæã«ããã°ã©ã ã®æé©åãæåŠããŸã
ããèªäœã¯ãéæ¹ããªãæéããããå¯èœæ§ããããŸãã
-Wpointer ãµã€ã³ ïŒCããã³Objective-Cã®ã¿ïŒ
ãã€ã³ã¿åŒæ°ã®åãæž¡ããŸãã¯ç°ãªã笊å·ä»ãã®å²ãåœãŠã«ã€ããŠèŠåããŸãã ãã
ãã®ãªãã·ã§ã³ã¯ãCããã³Objective-Cã§ã®ã¿ãµããŒããããŠããŸãã ããã¯ã«ãã£ãŠæ瀺ãããŸã -å£ ãšã«ããã
-Wpedanticãã§ç¡å¹ã«ããããšãã§ããŸã -Wno-ãã€ã³ã¿ãŒèšå·.
-Wstack-ãããã¯ã¿ãŒ
ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ã¢ã¯ãã£ãã«ãªããŸã -fstack-ãããã¯ã¿ãŒ ã¢ã¯ãã£ãã§ãã æ©èœã«ã€ããŠèŠåããŸã
ã¹ã¿ãã¯ã¹ããã·ã³ã°ããä¿è·ãããŠããŸããã
-Woverlength-æåå
ãæå°æ倧ãé·ããé·ãæååå®æ°ã«ã€ããŠèŠåãã
CèŠæ Œã§æå®ãããŠããŸãã æè¿ã®ã³ã³ãã€ã©ã§ã¯ãéåžžã次ã®ãããªæååå®æ°ã䜿çšã§ããŸãã
æšæºã®æå°å¶éãããã¯ããã«é·ãã§ãããéåžžã«ããŒã¿ãã«ãªããã°ã©ã ã¯
é·ãæååã®äœ¿çšã¯é¿ããŠãã ããã
å¶éãé©çšãããŸã After æååå®æ°ã®é£çµã§ãããæ«å°Ÿãã«ãŠã³ãããŸãã
NULã C90ã§ã¯ãå¶éã¯509æåã§ããã C99ã§ã¯ã4095ã«åŒãäžããããŸãããC++98ã¯
èŠç¯çãªæå°æ倧å€ãæå®ããªããããã§é·ãããæååã蚺æããŸãã
C ++ã
ãã®ãªãã·ã§ã³ã¯ã -Wpedanticãããã³ã§ç¡å¹ã«ããããšãã§ããŸã
-Wno-overlength-strings.
-Wunsuffixed-float-å®æ° ïŒCããã³Objective-Cã®ã¿ïŒ
æ¥å°ŸèŸã®ãªãæµ®åå®æ°ã«å¯ŸããŠèŠåãçºè¡ããŸãã 䜿çšæ
ãšãšãââã« -Wsystem-ããã㌠ã·ã¹ãã ããããŒãã¡ã€ã«å ã®ãã®ãããªå®æ°ã«ã€ããŠèŠåããŸãã
ããã¯ããFLOAT_CONST_DECIMAL64ããã©ã°ãã§äœ¿çšããã³ãŒããæºåãããšãã«åœ¹ç«ã¡ãŸãã
99é²æµ®åå°æ°ç¹æ¡åŒµããCXNUMXãžã
ãªãã·ã§ã³ for ãããã®ã³ã° ããªãã® æŒå¥æ²ç® or GCC
GCCã«ã¯ãããã°ã©ã ãŸãã¯GCCã®ãããã°ã«äœ¿çšãããããŸããŸãªç¹å¥ãªãªãã·ã§ã³ããããŸãã
-g ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãã€ãã£ã圢åŒïŒã¹ã¿ããCOFFã
XCOFFããŸãã¯DWARF 2ïŒã GDBã¯ãã®ãããã°æ å ±ãåŠçã§ããŸãã
ã¹ã¿ã圢åŒã䜿çšããã»ãšãã©ã®ã·ã¹ãã ã§ã¯ã -g è¿œå ã®ãããã°æ å ±ã®äœ¿çšãå¯èœã«ããŸã
GDBã ãã䜿çšã§ããããšã ãã®è¿œå æ å ±ã«ãããGDBã§ã®ãããã°äœæ¥ãæ¹åãããŸãã
ãããããä»ã®ãããã¬ãŒãã¯ã©ãã·ã¥ããããããã°ã©ã ã®èªã¿åããæåŠãããããŸãã ããªãããããå Žåã¯
è¿œå æ å ±ãçæãããã©ããã確å®ã«å¶åŸ¡ããã«ã¯ã -gstabs +, -gstabs,
-gxcoff +, -gxcoffãŸã㯠-gvms ïŒäžèšåç §ïŒã
GCCã䜿çšãããšã -g ã -Oã æé©åãããã³ãŒãã«ãã£ãŠåãããã·ã§ãŒãã«ããã¯
ãšãã©ãé©ãã¹ãçµæãåŸãããŸãïŒããªãã宣èšããããã€ãã®å€æ°ã¯ã«ååšããªããããããŸãã
ãã¹ãŠ; å¶åŸ¡ã®æµãã¯ãäºæããŠããªãã£ãå Žæã«äžæçã«ç§»åããå¯èœæ§ããããŸãã äžéšã®ã¹ããŒãã¡ã³ãã¯
äžå®ã®çµæãèšç®ããããå€ããã§ã«ã«ãªã£ãŠãããããå®è¡ãããŸãã
æ; äžéšã®ã¹ããŒãã¡ã³ãã¯ã移åããããããå¥ã®å Žæã§å®è¡ãããå ŽåããããŸã
ã«ãŒãã®ã
ããã§ããæé©åãããåºåããããã°ããããšã¯å¯èœã§ãã ããã¯ãããåççã«ããŸã
ãã°ãããå¯èœæ§ã®ããããã°ã©ã ã«ãªããã£ãã€ã¶ã䜿çšããã
次ã®ãªãã·ã§ã³ã¯ãGCCãããå€ãã®æ©èœãåããŠçæãããå Žåã«åœ¹ç«ã¡ãŸã
è€æ°ã®ãããã°åœ¢åŒã
-gsplit-ãã¯ãŒã
ã§ããã ãå€ãã®ãã¯ãŒããããã°æ å ±ãå¥ã®åºåãã¡ã€ã«ã«åå²ããŸã
æ¡åŒµåã¯.dwoã§ãã ãã®ãªãã·ã§ã³ã«ããããã«ãã·ã¹ãã ã¯ãã¡ã€ã«ã®ãªã³ã¯ãåé¿ã§ããŸã
ãããã°æ å ±ä»ãã ãã®ãªãã·ã§ã³ã䜿çšããã«ã¯ã次ã®æ©èœãåãããããã¬ãŒãå¿ èŠã§ãã
.dwoãã¡ã€ã«ã®èªã¿åãã
-ggdb
GDBã§äœ¿çšããããã®ãããã°æ å ±ãçæããŸãã ããã¯ãæãè¡šçŸåè±ããªãã®ã䜿çšããããšãæå³ããŸã
䜿çšå¯èœãªåœ¢åŒïŒDWARF 2ãã¹ã¿ãããŸãã¯ã©ã¡ãã䜿çšã§ããªãå Žåã¯ãã€ãã£ã圢åŒïŒ
ãµããŒããããŠããŸãïŒãå¯èœãªå Žåã¯GDBæ¡åŒµæ©èœãå«ã¿ãŸãã
-gpubnames
dwarf.debug_pubnamesã»ã¯ã·ã§ã³ãš.debug_pubtypesã»ã¯ã·ã§ã³ãçæããŸãã
-ggnu-pubnames
.debug_pubnamesã»ã¯ã·ã§ã³ãš.debug_pubtypesã»ã¯ã·ã§ã³ãé©åãªåœ¢åŒã§çæããŸã
GDBã€ã³ããã¯ã¹ãžã®å€æã ãã®ãªãã·ã§ã³ã¯ã次ã®ããšãã§ãããªã³ã«ãŒã§ã®ã¿åœ¹ç«ã¡ãŸãã
GDBã€ã³ããã¯ã¹ããŒãžã§ã³7ãçæããŸãã
-gstabs
GDBã䜿çšããã«ããããã°æ å ±ãstabs圢åŒã§çæããŸãïŒãµããŒããããŠããå ŽåïŒã
æ¡åŒµæ©èœã ããã¯ãã»ãšãã©ã®BSDã·ã¹ãã ã§DBXã«ãã£ãŠäœ¿çšããã圢åŒã§ãã MIPSãAlphaã
System VãªãªãŒã¹4ã·ã¹ãã ãã®ãªãã·ã§ã³ã¯ãã¹ã¿ããããã°åºåãçæããŸããã
DBXãŸãã¯SDBã«ãã£ãŠç解ãããŸãã System VãªãªãŒã¹4ã·ã¹ãã ã§ã¯ããã®ãªãã·ã§ã³ã«ã¯GNUãå¿ èŠã§ãã
ã¢ã»ã³ãã©ã
-feliminate-æªäœ¿çšã®ãããã°ã·ã³ãã«
ã·ã³ãã«ã®ã¿ã«ã€ããŠããããã°æ å ±ãã¹ã¿ã圢åŒã§çæããŸãïŒãµããŒããããŠããå ŽåïŒã
å®éã«äœ¿çšãããŸãã
-femit-class-debug-always
XNUMXã€ã®ãªããžã§ã¯ããã¡ã€ã«ã§C++ã¯ã©ã¹ã®ãããã°æ å ±ãåºåãã代ããã«ã
ã¯ã©ã¹ã䜿çšããŠãã¹ãŠã®ãªããžã§ã¯ããã¡ã€ã«ã«åºåããŸãã ãã®ãªãã·ã§ã³ã¯ã
GCCãéåžžãããã°æ å ±ãåºåããæ¹æ³ãåŠçã§ããªããããã¬ãŒ
ãã®ãªãã·ã§ã³ã䜿çšãããšããããã°æ å ±ã®ãµã€ãºã次ã®ããã«å¢å ãããããã¯ã©ã¹ã®å Žå
XNUMXåã«ããªããŸãã
-fdebug-types-ã»ã¯ã·ã§ã³
DWARFããŒãžã§ã³4以éã䜿çšããå Žåãã¿ã€ãDIEãç¬èªã®ãã®ã«å ¥ããããšãã§ããŸã
ã.debug_infoãã»ã¯ã·ã§ã³ã®äžéšã«ãã代ããã«ãããdebug_typesãã»ã¯ã·ã§ã³ã ãã
ãªã³ã«ãã§ããã®ã§ãããããå¥ã ã®comdatã»ã¯ã·ã§ã³ã«é 眮ããæ¹ãå¹ççã§ãã
éè€ãåé€ããŸãã ãã ãããã¹ãŠã®DWARFã³ã³ã·ã¥ãŒããŒãã.debug_typesãã»ã¯ã·ã§ã³ããŸã ãµããŒãããŠããããã§ã¯ãããŸãã
äžéšã®ãªããžã§ã¯ãã§ã¯ãããdebug_typesãã¯å°ãããããã°ã§ã¯ãªã倧ãããããã°ãçæããŸã
æ å ±ã衚瀺ããŸãã
-gstabs +
GNUã䜿çšããŠããããã°æ å ±ãstabs圢åŒã§çæããŸãïŒãµããŒããããŠããå ŽåïŒã
GNUãããã¬ãŒïŒGDBïŒã«ãã£ãŠã®ã¿ç解ãããæ¡åŒµæ©èœã ãããã®æ¡åŒµæ©èœã®äœ¿çšã¯
ä»ã®ãããã¬ãŒãã¯ã©ãã·ã¥ãããããããã°ã©ã ã®èªã¿åããæåŠãããããå¯èœæ§ããããŸãã
-gcoff
COFF圢åŒã§ãããã°æ å ±ãçæããŸãïŒãµããŒããããŠããå ŽåïŒã ããã¯
SystemVãªãªãŒã¹4ããåã®ã»ãšãã©ã®SystemVã·ã¹ãã ã§SDBã«ãã£ãŠäœ¿çšãããŠãã圢åŒã
-gxcoff
XCOFF圢åŒã§ãããã°æ å ±ãçæããŸãïŒãµããŒããããŠããå ŽåïŒã ããã¯
IBM RS/6000ã·ã¹ãã äžã®DBXãããã¬ãŒã§äœ¿çšããã圢åŒã
-gxcoff +
GNUã䜿çšããŠãXCOFF圢åŒïŒãµããŒããããŠããå ŽåïŒã§ãããã°æ å ±ãçæããŸã
GNUãããã¬ãŒïŒGDBïŒã«ãã£ãŠã®ã¿ç解ãããæ¡åŒµæ©èœã ãããã®æ¡åŒµæ©èœã®äœ¿çšã¯
ä»ã®ãããã¬ãŒãã¯ã©ãã·ã¥ããããããã°ã©ã ã®èªã¿åããæåŠãããããå¯èœæ§ããããåå ãšãªãå¯èœæ§ããããŸã
GNUã¢ã»ã³ãã©ïŒGASïŒä»¥å€ã®ã¢ã»ã³ãã©ããšã©ãŒã§å€±æããã
-ã°ãã¯ãŒã-ããŒãžã§ã³
DWARF圢åŒã§ãããã°æ å ±ãçæããŸãïŒãµããŒããããŠããå ŽåïŒã ã®å€
ããŒãžã§ã³ 2ã3ããŸãã¯4ã®ããããã§ãã ã»ãšãã©ã®ã¿ãŒã²ããã®ããã©ã«ãããŒãžã§ã³ã¯4ã§ãã
DWARFããŒãžã§ã³2ã§ã¯ãäžéšã®ããŒãã¯ç«¶åããªããã®ãå¿ èŠãšããåžžã«äœ¿çšããããšã«æ³šæããŠãã ãã
ã¢ã³ã¯ã€ã³ãããŒãã«ã®DWARF3æ¡åŒµæ©èœã
ããŒãžã§ã³4ã§ã¯GDB7.0ãš -fvar-远跡-å²ãåœãŠ æ倧ã®å©çã®ããã«ã
-grecord-gcc-ã¹ã€ãã
ãã®ã¹ã€ããã«ãããã³ã³ãã€ã©ãåŒã³åºãããã«äœ¿çšãããã³ãã³ãã©ã€ã³ãªãã·ã§ã³ãçºçããŸãã
DWARFã®DW_AT_producerå±æ§ã«è¿œå ãããã³ãŒãçæã«åœ±é¿ãäžãã
ãããã°æ å ±ã ãªãã·ã§ã³ã¯ãããããåé¢ããã¹ããŒã¹ãšé£çµãããŸãã
ãäºãã«ããããŠã³ã³ãã€ã©ããŒãžã§ã³ããã ãåç §ããŠãã ãã -frecord-gcc-ã¹ã€ãã ä»ã®äººã®ããã«
ã³ã³ãã€ã©ãªãã·ã§ã³ããªããžã§ã¯ããã¡ã€ã«ã«ä¿åããæ¹æ³ã ãããããã©ã«ãã§ãã
-gno-record-gcc-switches
DWARFã®DW_AT_producerå±æ§ã«ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ãè¿œå ããããšãçŠæ¢ããŸã
ãããã°æ å ±ã
-gstrict-ãã¯ãŒã
ã§éžæããããã®ãããæ°ããDWARFæšæºããŒãžã§ã³ã®æ¡åŒµæ©èœã®äœ¿çšãçŠæ¢ãã
-ã°ãã¯ãŒã-ããŒãžã§ã³ã åŸã§ç«¶åããªãDWARFæ¡åŒµæ©èœã䜿çšããã»ãšãã©ã®ã¿ãŒã²ãã
æšæºããŒãžã§ã³ãèš±å¯ãããŸãã
-gno-strict-ãã¯ãŒã
ã§éžæããããã®ãããæ°ããDWARFæšæºããŒãžã§ã³ã®æ¡åŒµæ©èœã®äœ¿çšãèš±å¯ãã
-ã°ãã¯ãŒã-ããŒãžã§ã³.
-gvms
Alpha / VMSãããã°åœ¢åŒã§ãããã°æ å ±ãçæããŸãïŒãµããŒããããŠããå ŽåïŒã ãã
Alpha/VMSã·ã¹ãã ã§DEBUGã䜿çšãã圢åŒã§ãã
-gã¬ãã«
-ggdbã¬ãã«
-gstabsã¬ãã«
-gcoffã¬ãã«
-gxcoffã¬ãã«
-gvmsã¬ãã«
ãããã°æ å ±ãèŠæ±ãããŸã䜿çšãã ã¬ãã« æ å ±éãæå®ããŸãã The
ããã©ã«ãã¬ãã«ã¯2ã§ãã
ã¬ãã«0ã¯ããããã°æ å ±ããŸã£ããçæããŸããã ãããã£ãŠã -g0 åŠå®ãã -g.
ã¬ãã«1ã¯ãäžéšã®ããã¯ãã¬ãŒã¹ãäœæããã®ã«ååãªæå°éã®æ å ±ãçæããŸãã
ãããã°ããäºå®ã®ãªãããã°ã©ã ã ããã«ã¯ãæ©èœã®èª¬æãš
å€éšå€æ°ãããã³è¡çªå·ããŒãã«ããã ããããŒã«ã«å€æ°ã«é¢ããæ å ±ã¯ãããŸããã
ã¬ãã«3ã«ã¯ãã«ååšãããã¹ãŠã®ãã¯ãå®çŸ©ãªã©ã®è¿œå æ å ±ãå«ãŸããŠããŸãã
ããã°ã©ã ã äžéšã®ãããã¬ãŒã¯ã䜿çšæã«ãã¯ãå±éããµããŒãããŸã -g3.
-gdwarf-2 GCCã¯ä»¥åã¯ãµããŒãããŠãããããé£çµããããããã°ã¬ãã«ãåãå ¥ããŸããã
ãªãã·ã§ã³ -ã°ãã¯ãŒã ããã¯ãDWARFã®ããŒãžã§ã³1ã§ãããã°æ å ±ãçæããããšãæå³ããŸã
ãã©ãŒãããïŒããŒãžã§ã³2ãšã¯å€§ããç°ãªããŸãïŒã§ãããæ··ä¹±ããããŠããã§ãããã
ãã®ãããã°åœ¢åŒã¯é·ãéå»æ¢ãããŠããŸããããªãã·ã§ã³ã¯çŸåšå€æŽã§ããŸããã 代ããã«äœ¿çšãã
è¿œå ã® -gã¬ãã« DWARFã®ãããã°ã¬ãã«ãå€æŽãããªãã·ã§ã³ã
-ã°ãã°ã«
ãã®ãªãã·ã§ã³ãçç¥ãããšãããã°æ å ±ãçæãããå Žåã¯ããããã°æ å ±ã®çæããªãã«ãããããªãã«ããŸã
ãã以å€ã®å Žåã¯ã¬ãã«2ã§ãªã³ã«ããŸãã ã³ãã³ãã©ã€ã³ã§ã®ãã®åŒæ°ã®äœçœ®ã¯ã
æ¡ä»¶; ä»ã®ãã¹ãŠã®ãªãã·ã§ã³ãåŠçãããåŸã«æå¹ã«ãªããŸãã
äžåºŠãäœåºŠäžããŠãã ããã¯äž»ã«
-fæ¯èŒãããã°.
-fsanitize = address
é«éã¡ã¢ãªãšã©ãŒæ€åºåšã§ããAddressSanitizerãæå¹ã«ããŸãã ã¡ã¢ãªã¢ã¯ã»ã¹åœä»€
ç¯å²å€ããã³è§£æŸåŸäœ¿çšã®ãã°ãæ€åºããããã«ã€ã³ã¹ãã«ã¡ã³ãåãããŸãã èŠã
<http://code.google.com/p/address-sanitizer/>詳现ã«ã€ããŠã¯ã å®è¡æã®åäœ
ã䜿çšããŠåœ±é¿ãåããããšãã§ããŸã ASAN_OPTIONS ç°å¢å€æ°; èŠã
<https://code.google.com/p/address-sanitizer/wiki/Flags#Run-time_flags>ã®ãªã¹ãã«ã€ããŠã¯
ãµããŒããããŠãããªãã·ã§ã³ã
-fsanitize = kernel-address
Linuxã«ãŒãã«ã®AddressSanitizerãæå¹ã«ããŸãã èŠã
<http://code.google.com/p/address-sanitizer/wiki/AddressSanitizerForKernel>詳现
詳现ã
-fsanitize = thread
é«éããŒã¿ç«¶åæ€åºåšã§ããThreadSanitizerãæå¹ã«ããŸãã ã¡ã¢ãªã¢ã¯ã»ã¹åœä»€ã¯
ããŒã¿ã¬ãŒã¹ã®ãã°ãæ€åºããããã«è£ åãããŠããŸãã èŠã
<http://code.google.com/p/thread-sanitizer/>詳现ã«ã€ããŠã¯ã å®è¡æã®åäœ
ã䜿çšããŠåœ±é¿ãåããããšãã§ããŸã TSAN_OPTIONS ç°å¢å€æ°; èŠã
<https://code.google.com/p/thread-sanitizer/wiki/Flags>ãµããŒããããŠãããªã¹ãã«ã€ããŠã¯
ãªãã·ã§ã³ã
-fsanitize = Leak
ã¡ã¢ãªãªãŒã¯æ€åºåšã§ããLeakSanitizerãæå¹ã«ããŸãã ãã®ãªãã·ã§ã³ã¯ã
å®è¡å¯èœãã¡ã€ã«ãšã©ã¡ãã§ããªãå Žå -fsanitize = address ãŸã -fsanitize = thread 䜿çšãããŠããã ãã®äžã§
ãmallocããªã©ããªãŒããŒã©ã€ãããã©ã€ãã©ãªã«å¯ŸããŠå®è¡å¯èœãã¡ã€ã«ããªã³ã¯ããå Žå
ã¢ãã±ãŒã¿æ©èœã èŠã
<https://code.google.com/p/address-sanitizer/wiki/LeakSanitizer>詳现ã«ã€ããŠã¯ã
å®è¡æã®åäœã¯ã LSAN_ãªãã·ã§ã³ ç°å¢å€æ°ã
-fsanitize = undefined
é«éãªæªå®çŸ©åäœæ€åºåšã§ããUndefinedBehaviorSanitizerãæå¹ã«ããŸãã æ§ã
èšç®ã¯ãå®è¡æã«æªå®çŸ©ã®åäœãæ€åºããããã«èšæž¬ãããŸãã çŸæç¹ã®
ãµããªãã·ã§ã³ã¯æ¬¡ã®ãšããã§ãã
-fsanitize = shift
ãã®ãªãã·ã§ã³ã䜿çšãããšãã·ããæäœã®çµæãããã§ã¯ãªãããšã確èªã§ããŸãã
æªå®çŸ©ã æ£ç¢ºã«æªå®çŸ©ãšèŠãªããããã®ã¯ãããã«ç°ãªãããšã«æ³šæããŠãã ãã
CãšC++ã®éãããã³ISOC90ãšC99ã®éãªã©ã
-fsanitize = integer-divide-by-zero
ãŒãã«ããæŽæ°é€ç®ãšãINT_MIN/-1ãé€ç®ãæ€åºããŸãã
-fsanitize = unreachable
ãã®ãªãã·ã§ã³ã䜿çšãããšãã³ã³ãã€ã©ã¯ã__builtin_unreachableãåŒã³åºãã
代ããã«èšºæã¡ãã»ãŒãžãåŒã³åºããŸãã ã__builtin_unreachableãåŒã³åºãã«å°éãããšã
åäœã¯æªå®çŸ©ã§ãã
-fsanitize=vla-ããŠã³ã
ãã®ãªãã·ã§ã³ã¯ãå¯å€é·ã®ãµã€ãºããã§ãã¯ããããã«ã³ã³ãã€ã©ãŒã«æ瀺ããŸã
é åã¯æ£ã§ãã ãã®ãªãã·ã§ã³ã¯ã -std = c ++ 1y ã¢ãŒãããšããŠ
æšæºã§ã¯ã代ããã«äŸå€ãã¹ããŒããå¿ èŠããããŸãã
-fsanitize = null
ãã®ãªãã·ã§ã³ã¯ããã€ã³ã¿ãã§ãã¯ãæå¹ã«ããŸãã ç¹ã«ãã§æ§ç¯ãããã¢ããªã±ãŒã·ã§ã³
ãã®ãªãã·ã§ã³ããªã³ã«ãããšãåç §ã解é€ããããšãããšãšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŸãã
NULLãã€ã³ã¿ãŒããŸãã¯åç §ïŒããããå³èŸºå€åç §ïŒãNULLã«ãã€ã³ããããŠããå Žå
ãã€ã³ã¿ãŒã
-fsanitize = return
ãã®ãªãã·ã§ã³ã¯ãreturnã¹ããŒãã¡ã³ãã®ãã§ãã¯ãæå¹ã«ããŸãã ãã®ãªãã·ã§ã³ã§æ§ç¯ãããããã°ã©ã
ãªã³ã«ãããšãévoidé¢æ°ã®çµããã
å®éã«å€ãè¿ããã«å°éããŸããã ãã®ãªãã·ã§ã³ã¯C++ã§ã®ã¿æ©èœããŸãã
-fsanitize=signed-integer-ãªãŒããŒãããŒ
ãã®ãªãã·ã§ã³ã¯ã笊å·ä»ãæŽæ°ãªãŒããŒãããŒãã§ãã¯ãæå¹ã«ããŸãã ã®çµæã確èªããŸã
ã+ããã*ããããã³åé ãšãã€ããªã®äž¡æ¹ã®ã-ãã¯ã笊å·ä»ãã§ãªãŒããŒãããŒããŸãã
ç®è¡ã æŽæ°æ¡åŒµã«ãŒã«ãèæ ®ã«å ¥ããå¿ èŠãããããšã«æ³šæããŠãã ããã ããã¯ã
以äžã¯ãªãŒããŒãããŒã§ã¯ãããŸããã
笊å·ä»ãæåa=SCHAR_MAX;
a ++;
äžæ¹ã -ftrapv 眲åããããªãŒããŒãããŒã®ãã©ãããçºè¡ãããŸãã -fsanitize = undefined
蚺æã¡ãã»ãŒãžã衚瀺ããŸãã ããã¯çŸåšãCãã¡ããªãŒã®èšèªã§ã®ã¿æ©èœããŸãã
-fdump-final-insn[=file]
æçµçãªå éšè¡šçŸïŒRTLïŒãã«ãã³ãããŸã fileã ãªãã·ã§ã³ã®åŒæ°ã
çç¥ïŒãŸã㯠file ããããïŒã®å Žåããã³ããã¡ã€ã«ã®ååã¯æ¬¡ã®ããã«è¿œå ããŠæ±ºå®ãããŸãã
ã³ã³ãã€ã«åºåãã¡ã€ã«åã«ã.gkdããè¿œå ããŸãã
-fæ¯èŒãããã°[=optsã®]
ã³ã³ãã€ã«äžã«ãšã©ãŒãçºçããªãã£ãå Žåã¯ãã³ã³ãã€ã©ãããäžåºŠå®è¡ããŠã次ã®ããã«è¿œå ããŸãã optsã® ãš
-fæ¯èŒãããã°ç§ XNUMXçªç®ã®ã³ã³ãã€ã«ã«æž¡ãããåŒæ°ã«ã ãã³ã
äž¡æ¹ã®ã³ã³ãã€ã«ã®æçµçãªå éšè¡šçŸã§ãããç°ãªãå Žåã¯ãšã©ãŒãåºåããŸãã
çå·ãçç¥ããå Žåãããã©ã«ã -ã°ãã°ã« 䜿çšãããŠããã
ç°å¢å€æ° GCC_COMPARE_DEBUGãå®çŸ©ãããŠããå Žåã空ã§ããŒãã§ããªãã
æé»çã«æå¹ã«ããŸã -fæ¯èŒãããã°ã å Žå GCC_COMPARE_DEBUG æååã«å®çŸ©ãããŸã
ããã·ã¥ã§å§ãŸããããããããã¯ã®ããã«äœ¿çšãããŸã optsã®ããã以å€ã®å Žåã¯ããã©ã«ã -ã°ãã°ã« is
äžå€ã
-fcompare-debug =ãçå·ããããªã optsã®ããšåçã§ã
-fno-æ¯èŒ-ãããã°ãããã¯æçµè¡šçŸã®ãã³ããç¡å¹ã«ãã
XNUMXåç®ã®ã³ã³ãã€ã«ã GCC_COMPARE_DEBUG çºå¹ããã
äžã«å®å šãªã«ãã¬ããžã確èªããã«ã¯ -fæ¯èŒãããã° ãã¹ããèšå® GCC_COMPARE_DEBUG èšã
-fcompare-debug-not-overriddenãGCCã¯å®éã«ã¯ç¡å¹ãªãªãã·ã§ã³ãšããŠæåŠããŸã
ã³ã³ãã€ã«ïŒååŠçãã¢ã»ã³ããªããŸãã¯ãªã³ã¯ã§ã¯ãªãïŒã èŠåãåãåãã«ã¯ã
èšå® GCC_COMPARE_DEBUG ããž -wïŒ n-fcompare-debug äžæžãããã ããŸãããã
-fæ¯èŒãããã°ç§
ãã®ãªãã·ã§ã³ã¯ãèŠæ±ãããXNUMXçªç®ã®ã³ã³ãã€ã«ã®ããã«ã³ã³ãã€ã©ãŒã«æé»çã«æž¡ãããŸã
by -fæ¯èŒãããã°ãèŠåãæ¶é³ãããªãã·ã§ã³ãããã³ä»ã®ãªãã·ã§ã³ãçç¥ãã
ããã«ãããå¯äœçšã®ã³ã³ãã€ã©åºåããã¡ã€ã«ãŸãã¯æšæºåºåã«ãªããŸãã
ãã³ããã¡ã€ã«ãšä¿åãããäžæãã¡ã€ã«ã¯ãããgkããå«ãããã«ååãå€æŽãããŸã
ããããäžæžãããªãããã«ããããã®ãXNUMXåç®ã®ã³ã³ãã€ã«äžã®è¿œå ã®æ¡åŒµ
æåã«ãã£ãŠçæãããŸãã
ãã®ãªãã·ã§ã³ãã³ã³ãã€ã©ãã©ã€ãã«æž¡ããããšã æåã® ã«ã³ã³ãã€ã«
ã¹ãããããããšã§ãã³ã³ãã€ã©ãé©åã«ãããã°ãã以å€ã®ç®çã«ã¯åœ¹ç«ã¡ãŸããã
-feliminate-dwarf2-dups
ã«é¢ããéè€æ å ±ãæé€ããããšã«ãããDWARF2ãããã°æ å ±ãå§çž®ããŸãã
åã·ã³ãã«ã ãã®ãªãã·ã§ã³ã¯ãDWARF2ãããã°ãçæããå Žåã«ã®ã¿æå³ããããŸã
ãšã®æ å ± -gdwarf-2.
-femit-struct-debug-baseonly
æ§é äœã®ãããªã¿ã€ãã®ãããã°æ å ±ãåºåããã®ã¯ã
ã³ã³ãã€ã«ãœãŒã¹ãã¡ã€ã«ã¯ãæ§é äœãå®çŸ©ãããŠãããã¡ã€ã«ã®ããŒã¹åãšäžèŽããŸãã
ãã®ãªãã·ã§ã³ã¯ããããã°æ å ±ã®ãµã€ãºãå€§å¹ ã«åæžããŸããã
ãããã¬ãŒãžã®ã¿ã€ãæ å ±ã®é倧ãªæœåšçæ倱ã èŠã
-femit-struct-debug-reduced æ»ææ§ã®äœããªãã·ã§ã³ã®å Žåã èŠã
-femit-struct-debug-detailed ãã詳现ãªå¶åŸ¡ã«ã€ããŠã¯ã
ãã®ãªãã·ã§ã³ã¯ãDWARF2ã§ã®ã¿æ©èœããŸãã
-femit-struct-debug-reduced
æ§é äœã®ãããªã¿ã€ãã®ãããã°æ å ±ãåºåããã®ã¯ã
ã³ã³ãã€ã«ãœãŒã¹ãã¡ã€ã«ã¯ãã¿ã€ããå®çŸ©ãããŠãããã¡ã€ã«ã®ããŒã¹åãšäžèŽããŸãã
æ§é äœããã³ãã¬ãŒãã§ããããã·ã¹ãã ããããŒã§å®çŸ©ãããŠããå Žåãé€ããŸãã
ãã®ãªãã·ã§ã³ã¯ããããã°æ å ±ã®ãµã€ãºãå€§å¹ ã«åæžããŸãã
ãããã¬ãŒãžã®ã¿ã€ãæ å ±ã®æœåšçãªæ倱ã èŠã -femit-struct-debug-baseonly
ããç©æ¥µçãªãªãã·ã§ã³ã«ã€ããŠã¯ã èŠã -femit-struct-debug-detailed 詳现ã«ã€ããŠã¯
ã³ã³ãããŒã«ã
ãã®ãªãã·ã§ã³ã¯ãDWARF2ã§ã®ã¿æ©èœããŸãã
-femit-struct-debug-detailed[=ã¹ããã¯ãªã¹ã]
ã³ã³ãã€ã©ããããã°æ å ±ãçæããæ§é äœã®ãããªã¿ã€ããæå®ããŸãã ã¶
ç®çã¯ãç°ãªããªããžã§ã¯ããã¡ã€ã«éã§éè€ããæ§é äœãããã°æ å ±ãæžããããšã§ãã
åãããã°ã©ã å ã
ãã®ãªãã·ã§ã³ã¯ãã®è©³çŽ°ããŒãžã§ã³ã§ãã -femit-struct-debug-reduced ãš
-femit-struct-debug-baseonlyãã»ãšãã©ã®ããŒãºã«å¯Ÿå¿ããŸãã
ä»æ§ã«ã¯æ§æããããŸã[dirïŒ|indïŒ][ordïŒ|ãžã£ã³ã«ïŒ](ã©ãã|SYS|ããŒã¹|ãªã)
ãªãã·ã§ã³ã®æåã®åèªã¯ãä»æ§ãçŽæ¥äœ¿çšãããæ§é äœã«å¶éããŸã
(dirïŒïŒãŸãã¯éæ¥çã«äœ¿çšïŒindïŒïŒã æ§é äœã¿ã€ãã¯ãã¿ã€ãã§ããå Žåã«çŽæ¥äœ¿çšãããŸã
å€æ°ã®ã¡ã³ããŒã éæ¥çãªäœ¿çšã¯ãæ§é äœãžã®ãã€ã³ã¿ãŒãä»ããŠçºçããŸãã ããã¯ã
äžå®å šãªæ§é äœã®äœ¿çšãæå¹ãªå Žåããã®äœ¿çšã¯éæ¥çã§ãã äŸã¯ æ§é
XNUMX〠çŽæ¥; æ§é 2 * éæ¥ç;.
ãªãã·ã§ã³ã®XNUMXçªç®ã®åèªã¯ãä»æ§ãéåžžã®æ§é äœã«å¶éããŸãïŒordïŒïŒãŸãã¯
äžè¬çãªæ§é äœïŒãžã£ã³ã«ïŒïŒã äžè¬çãªæ§é äœã®èª¬æã¯å°ãè€éã§ãã C ++ã®å Žåã
ãããã¯ããã³ãã¬ãŒãã¯ã©ã¹ããŸãã¯éãã³ãã¬ãŒãã¯ã©ã¹ã®éæ瀺çãªç¹æ®åã§ãã
äžèšã®ç¯å²å ã ä»ã®ããã°ã©ãã³ã°èšèªã«ã¯ãžã§ããªãã¯ããããŸããã
-femit-struct-debug-detailed ãŸã ããããå®è£ ããŠããŸããã
XNUMXçªç®ã®åèªã¯ãã³ã³ãã€ã©ã察象ãšããæ§é äœã®ãœãŒã¹ãã¡ã€ã«ãæå®ããŸã
ãããã°æ å ±ãåºåããå¿ èŠããããŸãã ãã®äŸ¡å€ ãªã ãš ã©ãã éåžžã®æå³ãæã£ãŠããŸãã The
å€ ããŒã¹ å宣èšãå«ãŸãããã¡ã€ã«ã®ååã®ããŒã¹ãæå³ããŸã
衚瀺ãããã®ã¯ãã¡ã€ã³ã®ã³ã³ãã€ã«ãã¡ã€ã«ã®ååã®ããŒã¹ãšäžèŽããå¿ èŠããããŸãã å®éã«ã¯ã
ããã¯ãã³ã³ãã€ã«æã« foo.cãã¿ã€ãã®ãããã°æ å ±ãçæãããŸã
ãã®ãã¡ã€ã«ã§å®£èšããã ãµãŒãããã ãä»ã®ããããŒãã¡ã€ã«ã¯ãããŸããã å€ SYS æ段
æºè¶³ãããããã®ã¿ã€ã ããŒã¹ ãŸãã¯ãã·ã¹ãã ãŸãã¯ã³ã³ãã€ã©ã®ããããŒã§å®£èšãããŸãã
ã¢ããªã±ãŒã·ã§ã³ã«æé©ãªèšå®ã決å®ããããã«ãå®éšãå¿ èŠã«ãªãå ŽåããããŸãã
ããã©ã«ã㯠-femit-struct-debug-detailed = all.
ãã®ãªãã·ã§ã³ã¯ãDWARF2ã§ã®ã¿æ©èœããŸãã
-fno-ããŒãžãããã°æåå
ãªã³ã«ã«ããããã°æ å ±å ã®æååãããŒãžããªãããã«æ瀺ããŸãã
ç°ãªããªããžã§ã¯ããã¡ã€ã«ã§åäžã§ãã ããŒãžã¯ããã¹ãŠã®ã¢ã»ã³ãã©ãŸãã¯
ãªã³ã«ãŒã ããŒãžãããšãåºåãã¡ã€ã«ã®ãããã°æ å ±ã®ãµã€ãºãæžå°ããŸãã
ãªã³ã¯åŠçæéãå¢ããã³ã¹ãã ããŒãžã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-fdebug-prefix-map =å€ã=æ°è£œå
ãã£ã¬ã¯ããªå ã®ãã¡ã€ã«ãã³ã³ãã€ã«ããå Žå å€ãããããã次ã®ããã«èª¬æãããããã°æ å ±ãèšé²ããŸã
in æ°è£œå ã代ããã«ã䜿ããã ããã
-fno-dwarf2-cfi-asm
ã³ã³ãã€ã©ã䜿çšãã代ããã«ã.eh_frameãã»ã¯ã·ã§ã³ãçæãããšãã«ãDWARF2ã¢ã³ã¯ã€ã³ãæ å ±ãçºè¡ããŸã
GAS".cfi_*"ãã£ã¬ã¯ãã£ãã
-p åæããã°ã©ã ã«é©ãããããã¡ã€ã«æ å ±ãæžã蟌ãããã®è¿œå ã®ã³ãŒããçæããŸã
ææã ããŒã¿ãå¿ èŠãªãœãŒã¹ãã¡ã€ã«ãã³ã³ãã€ã«ãããšãã«ããã®ãªãã·ã§ã³ã䜿çšããå¿ èŠããããŸãã
ãŸãããªã³ã¯ãããšãã«ã䜿çšããå¿ èŠããããŸãã
-pg åæããã°ã©ã ã«é©ãããããã¡ã€ã«æ å ±ãæžã蟌ãããã®è¿œå ã®ã³ãŒããçæããŸã
gprofã ããŒã¿ãå¿ èŠãªãœãŒã¹ãã¡ã€ã«ãã³ã³ãã€ã«ãããšãã«ããã®ãªãã·ã§ã³ã䜿çšããå¿ èŠããããŸãã
ãŸãããªã³ã¯ãããšãã«ã䜿çšããå¿ èŠããããŸãã
-Q ã³ã³ãã€ã©ãŒã«ãã³ã³ãã€ã«æã«åé¢æ°åãåºåãããããã€ããåºåãããŸã
çµäºæã®åãã¹ã«é¢ããçµ±èšã
-ftime-ã¬ããŒã
ã³ã³ãã€ã©ãŒã«ãåãã¹ã§æ¶è²»ãããæéã«é¢ããçµ±èšãåºåãããŸãã
çµãããŸãã
-fmem-ã¬ããŒã
ã³ã³ãã€ã©ãæ°žç¶çãªã¡ã¢ãªå²ãåœãŠã«é¢ããçµ±èšãåºåããããã«ããŸã
çµãããŸãã
-fmem-ã¬ããŒã-wpa
WPAã®æ°žç¶çãªã¡ã¢ãªå²ãåœãŠã«é¢ããçµ±èšãã³ã³ãã€ã©ã«åºåãããŸã
ãã§ãŒãºã®ã¿ã
-fpre-ipa-mem-report
-fpost-ipa-mem-report
ãŸãã¯ã®åã«ãã³ã³ãã€ã©ã«æ°žç¶çãªã¡ã¢ãªå²ãåœãŠã«é¢ããçµ±èšãåºåãããŸãã
æç¶ãéæé©åã®åŸã
-fprofile-ã¬ããŒã
ïŒæšå®ïŒãããã¡ã€ã«ã®æŽåæ§ã«é¢ããçµ±èšãã³ã³ãã€ã©ãŒã«åºåãããŸã
åã ã®ãã¹ã®å¹æã
-fstack-䜿çšæ³
é¢æ°ããšã«ãããã°ã©ã ã®ã¹ã¿ãã¯äœ¿çšæ å ±ãã³ã³ãã€ã©ãŒã«åºåãããŸã
åºæ¬ã ãã³ãã®ãã¡ã€ã«åã¯ãè¿œå ããããšã«ãã£ãŠäœæãããŸã ã ãã è£å©å. è£å©å is
æ瀺çã«æå®ãããŠããªãå Žåã¯ãåºåãã¡ã€ã«ã®ååããçæãããŸãã
å®è¡å¯èœãã¡ã€ã«ããã以å€ã®å Žåã¯ããœãŒã¹ãã¡ã€ã«ã®ããŒã¹åã§ãã ãšã³ããªã¯ã§æ§æãããŠããŸã
XNUMXã€ã®ãã£ãŒã«ãïŒ
ã»é¢æ°ã®ååã
ã»ãã€ãæ°ã
ã»XNUMXã€ä»¥äžã®ä¿®é£ŸåïŒ "static"ã "dynamic"ã"bounded"ã
修食åãstaticãã¯ãé¢æ°ãã¹ã¿ãã¯ãéçã«æäœããããšãæå³ããŸãã
åºå®ãã€ãæ°ãé¢æ°ãšã³ããªã§ãã¬ãŒã ã«å²ãåœãŠãããã§è§£æŸãããŸã
é¢æ°exit; ãã以å€ã®å Žåãé¢æ°ã§ã¹ã¿ãã¯èª¿æŽã¯è¡ãããŸããã äºçªç®
ãã£ãŒã«ãã¯ãã®åºå®ãã€ãæ°ã§ãã
修食åãåçãã¯ãé¢æ°ãã¹ã¿ãã¯ãåçã«æäœããããšãæå³ããŸãã
äžèšã®éçå²ãåœãŠã«å ããŠãã¹ã¿ãã¯èª¿æŽã¯
é¢æ°ã®æ¬äœãããšãã°ãé¢æ°åŒã³åºãã®åšãã«åŒæ°ãããã·ã¥/ãããããŸãã ã®å Žå
修食åãæçããååšãããããã®èª¿æŽã®éã¯æ¬¡ã®ããã«å¶éãããŸãã
ã³ã³ãã€ã«æãšXNUMXçªç®ã®ãã£ãŒã«ãã¯ã䜿çšãããã¹ã¿ãã¯ã®åèšéã®äžéã§ãã
é¢æ°ã«ãã£ãŠã ååšããªãå Žåããããã®èª¿æŽã®éã¯å¶éãããŸãã
ã³ã³ãã€ã«æãXNUMXçªç®ã®ãã£ãŒã«ãã¯å¢çéšåã®ã¿ãè¡šããŸãã
-fprofile-arcs
ããã°ã©ã ãæµããããã«ã³ãŒããè¿œå ãã ã¢ãŒã¯ èšè£ ãããŠããŸãã ããã°ã©ã ã®å®è¡äž
åãã©ã³ããšåŒã³åºããå®è¡ãããåæ°ãšå®è¡ãããåæ°ãèšé²ããŸã
ãŸãã¯æ»ããŸãã ã³ã³ãã€ã«ãããããã°ã©ã ãçµäºãããšããã®ããŒã¿ã¯æ¬¡ã®ãã¡ã€ã«ã«ä¿åãããŸãã
auxname.gcda ãœãŒã¹ãã¡ã€ã«ããšã«ã ããŒã¿ã¯ãããã¡ã€ã«æåã«äœ¿çšã§ããŸã
æé©åïŒ-fbranch-確çïŒããŸãã¯ãã¹ãã«ãã¬ããžåæçš
(-ftest-ã«ãã¬ããžïŒã åãªããžã§ã¯ããã¡ã€ã«ã® è£å©å ã®ååããçæãããŸã
æ瀺çã«æå®ãããæçµçãªå®è¡å¯èœãã¡ã€ã«ã§ã¯ãªãå Žåã¯åºåãã¡ã€ã«ããã以å€ã®å Žåã¯åºåãã¡ã€ã«
ãœãŒã¹ãã¡ã€ã«ã®ããŒã¹åã§ãã ã©ã¡ãã®å Žåããæ¥å°ŸèŸã¯åé€ãããŸãïŒäŸïŒ
foo.gcda å ¥åãã¡ã€ã«çš dir / foo.cãŸã㯠dir / foo.gcda ãšããŠæå®ãããåºåãã¡ã€ã«ã®å Žå -o
dir / foo.o).
- ã«ãã¬ããž
ãã®ãªãã·ã§ã³ã¯ãã«ãã¬ããžåæçšã«ã€ã³ã¹ãã«ã¡ã³ãåãããã³ãŒããã³ã³ãã€ã«ããã³ãªã³ã¯ããããã«äœ¿çšãããŸãã The
ãªãã·ã§ã³ã¯ã®å矩èªã§ã -fprofile-arcs -ftest-ã«ãã¬ããž ïŒã³ã³ãã€ã«æïŒããã³ -lgcov
ïŒãªã³ã¯æïŒã 詳现ã«ã€ããŠã¯ããããã®ãªãã·ã§ã³ã®ããã¥ã¡ã³ããåç §ããŠãã ããã
ã»ãœãŒã¹ãã¡ã€ã«ã次ã®ã³ãã³ãã§ã³ã³ãã€ã«ããŸã -fprofile-arcs ãã©ã¹æé©åãšã³ãŒãçæ
ãªãã·ã§ã³ã ãã¹ãã«ãã¬ããžåæã«ã¯ãè¿œå ã® -ftest-ã«ãã¬ããž ãªãã·ã§ã³ãéžæããŸãã
ããã°ã©ã å ã®ãã¹ãŠã®ãœãŒã¹ãã¡ã€ã«ããããã¡ã€ãªã³ã°ããå¿ èŠã¯ãããŸããã
ã»ãªããžã§ã¯ããã¡ã€ã«ã -lgcov or -fprofile-arcs ïŒåŸè ã¯ã
åã®ïŒã
ã»ä»£è¡šçãªã¯ãŒã¯ããŒãã§ããã°ã©ã ãå®è¡ããŠãã¢ãŒã¯ãããã¡ã€ã«ãçæããŸã
æ å ±ã ããã¯äœåºŠã§ãç¹°ãè¿ãããšãã§ããŸãã åæã«å®è¡ã§ããŸã
ããã°ã©ã ã®ã€ã³ã¹ã¿ã³ã¹ã§ããããã¡ã€ã«ã·ã¹ãã ãããã¯ããµããŒãããŠããå Žåã
ããŒã¿ãã¡ã€ã«ã¯æ£ããæŽæ°ãããŸãã ãŸããããã©ãŒã¯ãã³ãŒã«ãæ€åºããã
æ£ããåŠçãããŸãïŒäºéã«ãŠã³ãã¯çºçããŸããïŒã
ã»ãããã¡ã€ã«æåã®æé©åã®å Žåãåããã®ã䜿çšããŠãœãŒã¹ãã¡ã€ã«ãå床ã³ã³ãã€ã«ããŸã
æé©åãšã³ãŒãçæãªãã·ã§ã³ã«å ã㊠-fbranch-確ç.
ã»ãã¹ãã«ãã¬ããžåæã«ã¯ã gcov ãã人éãèªããæ å ±ãçæãã
ã .gcno ãš .gcda ãã¡ã€ã«ã ãåç §ããŠãã ãã gcov 詳现ã«ã€ããŠã¯ããã¥ã¡ã³ã
æ å ±ã衚瀺ããŸãã
é£çµ¡å -fprofile-arcsãããã°ã©ã ã®æ©èœããšã«ãGCCã¯ããã°ã©ã ãããŒãäœæããŸã
ã°ã©ãã¯ãã°ã©ãã®ã¹ããã³ã°ããªãŒãèŠã€ããŸãã ã«ãªãã¢ãŒã¯ã®ã¿
ã¹ããã³ã°ããªãŒãã€ã³ã¹ãã«ã¡ã³ãåããå¿ èŠããããŸããã³ã³ãã€ã©ã¯ã次ã®æ°ãã«ãŠã³ãããã³ãŒããè¿œå ããŸãã
ãããã®ã¢ãŒã¯ãå®è¡ãããåæ°ã ã¢ãŒã¯ãå¯äžã®åºå£ãŸãã¯å¯äžã®å ¥å£ã§ããå Žå
ãããã¯ã®å Žåãã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã³ãŒãããããã¯ã«è¿œå ã§ããŸãã ããã§ãªããã°ãæ°ããåºæ¬
ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã³ãŒããä¿æããããã«ãããã¯ãäœæããå¿ èŠããããŸãã
-ftest-ã«ãã¬ããž
ã¡ã¢ãã¡ã€ã«ãäœæããŸãã gcov ã³ãŒãã«ãã¬ããžãŠãŒãã£ãªãã£ã䜿çšããŠããã°ã©ã ã衚瀺ã§ããŸã
ã«ãã¬ããžã åãœãŒã¹ãã¡ã€ã«ã®ããŒããã¡ã€ã«ã¯åŒã³åºãããŸã auxname.gcnoã ãåç §ããŠãã ãã
-fprofile-arcs äžèšã®ãªãã·ã§ã³ã®èª¬æ è£å©å ãšæ¹æ³ã®èª¬æ
ãã¹ãã«ãã¬ããžããŒã¿ãçæããŸãã ã«ãã¬ããžããŒã¿ã¯ã次ã®å Žåã«ãœãŒã¹ãã¡ã€ã«ãšããå³å¯ã«äžèŽããŸãã
æé©åããŸããã
-fdbg-cnt-ãªã¹ã
ãã¹ãŠã®ãããã°ã«ãŠã³ã¿ãŒã®ååãšã«ãŠã³ã¿ãŒã®äžéãåºåããŸãã
-fdbg-cnt =ã«ãŠã³ã¿ãŒããªã¥ãŒãªã¹ã
å éšãããã°ã«ãŠã³ã¿ã®äžéãèšå®ããŸãã ã«ãŠã³ã¿ãŒããªã¥ãŒãªã¹ã ã«ã³ãåºåãã§ã
ã®äžèŠ§ å:å€ åãããã°ã«ãŠã³ã¿ãŒã®äžéãèšå®ããã㢠å ããž
å€ã ãã¹ãŠã®ãããã°ã«ãŠã³ã¿ãŒã®åæäžéã¯ãUINT_MAXãã§ãã ãããã£ãŠ
ãdbg_cntïŒïŒãã¯ããã®ãªãã·ã§ã³ã§äžéãèšå®ãããŠããªãéããåžžã«trueãè¿ããŸãã çºã«
äŸã -fdbg-cnt = dceïŒ10ãtail_callïŒ0ã"dbg_cntïŒdceïŒ"ã¯æåã«ã®ã¿trueãè¿ããŸã
10åã®åŒã³åºãã
-ãã§ã³ãã«-çš®é¡-ãã¹
-fç¡å¹å-çš®é¡-ãã¹=ç¯å²ãªã¹ã
ããã¯ãæé©åãæ瀺çã«ç¡å¹/æå¹ã«ããããã«äœ¿çšããããªãã·ã§ã³ã®ã»ããã§ãã
ãã¹ããŸãã ãããã®ãªãã·ã§ã³ã¯ãGCCã®ãããã°ã«äœ¿çšããããšãç®çãšããŠããŸãã ã³ã³ãã€ã©ãŠãŒã¶ãŒã¯
代ããã«ããã¹ãæå¹/ç¡å¹ã«ããããã®éåžžã®ãªãã·ã§ã³ã䜿çšããŠãã ããã
-fdisable-ipa-ãã¹
IPAãã¹ãç¡å¹ã«ãã ãã¹. ãã¹ ãã¹åã§ãã åããã¹ãéçã§ããå Žå
ã³ã³ãã€ã©ã§è€æ°ååŒã³åºãããå Žåã¯ããã¹åã«
1ããå§ãŸãé£çªã
-fdisable-rtl-ãã¹
-fdisable-rtl-ãã¹=ç¯å²ãªã¹ã
RTLãã¹ãç¡å¹ã«ãã ãã¹. ãã¹ ãã¹åã§ãã åããã¹ãéçã§ããå Žå
ã³ã³ãã€ã©ã§è€æ°ååŒã³åºãããå Žåã¯ããã¹åã«
1ããå§ãŸãé£çªã ç¯å²ãªã¹ã ã®ã³ã³ãåºåãã®ãªã¹ãã§ã
é¢æ°ç¯å²ãŸãã¯ã¢ã»ã³ãã©ãŒåã åç¯å²ã¯ã
çµè žã ç¯å²ã¯äž¡ç«¯ãå«ã¿ãŸãã ç¯å²ãäºçŽ°ãªå Žåãæ°å€
ãã¢ã¯åäžã®æ°å€ãšããŠç°¡ç¥åã§ããŸãã é¢æ°ã®ã³ãŒã«ã°ã©ãããŒãã®å Žå
UID æå®ãããç¯å²ã®XNUMXã€ã ãã¹ ãã®ããã«ç¡å¹ã«ãªã£ãŠããŸã
é¢æ°ã 㶠UID ãã³ããã¡ã€ã«ã®é¢æ°ããããŒã«è¡šç€ºããããã¹
ãªãã·ã§ã³ã䜿çšããŠååããã³ãã§ããŸã -fdump-ãã¹.
-fdisable-tree-ãã¹
-fdisable-tree-ãã¹=ç¯å²ãªã¹ã
ããªãŒãã¹ãç¡å¹ã«ãã ãã¹ã èŠã -fdisable-rtl ãªãã·ã§ã³ã®èª¬æã«ã€ããŠ
åŒæ°
-ãã§ããã«-ipa-ãã¹
IPAãã¹ãæå¹ã«ãã ãã¹. ãã¹ ãã¹åã§ãã åããã¹ãéçã§ããå Žå
ã³ã³ãã€ã©ã§è€æ°ååŒã³åºãããå Žåã¯ããã¹åã«
1ããå§ãŸãé£çªã
-ãã§ããã«-rtl-ãã¹
-ãã§ããã«-rtl-ãã¹=ç¯å²ãªã¹ã
RTLãã¹ãæå¹ã«ãã ãã¹ã èŠã -fdisable-rtl ãªãã·ã§ã³åŒæ°ã®èª¬æãš
äŸã
-ãã§ããã«ããªãŒ-ãã¹
-ãã§ããã«ããªãŒ-ãã¹=ç¯å²ãªã¹ã
ããªãŒãã¹ãæå¹ã«ãã ãã¹ã èŠã -fdisable-rtl ãªãã·ã§ã³åŒæ°ã®èª¬æã«ã€ããŠã
ãããã®ãªãã·ã§ã³ã®äœ¿çšæ³ã瀺ãããã€ãã®äŸã次ã«ç€ºããŸãã
ïŒãã¹ãŠã®æ©èœã§ccp1ãç¡å¹ã«ãã
-fdisable-tree-ccp1
ïŒcgraphããŒãuidã1ã§ããé¢æ°ã®å®å šãªå±éãç¡å¹ã«ãã
-fenable-tree-cunroll = 1
ïŒæ¬¡ã®ç¯å²ã®é¢æ°ã®gcse2ãç¡å¹ã«ããŸã[1,1]ã
ïŒ[300,400]ãããã³[400,1000]
ïŒé¢æ°fooããã³foo2ã®gcse2ãç¡å¹ã«ããŸã
-fdisable-rtl-gcse2 = fooãfoo2
ïŒæ©æã€ã³ã©ã€ã³åãç¡å¹ã«ãã
-fdisable-tree-einline
ïŒipaã€ã³ã©ã€ã³åãç¡å¹ã«ãã
-fdisable-ipa-ã€ã³ã©ã€ã³
ïŒããªãŒã®å®å šãªå±éãæå¹ã«ãã
-fenable-tree-unroll
-dæçŽ
-fdump-rtl-ãã¹
-fdump-rtl-ãã¹=ãã¡ã€ã«å
ã«ãã£ãŠæå®ãããæéã«ã³ã³ãã€ã«äžã«ãããã°ãã³ããäœæãããšèšããŸã æçŽã ãã®
ã³ã³ãã€ã©ã®RTLããŒã¹ã®ãã¹ããããã°ããããã«äœ¿çšãããŸãã ã»ãšãã©ã®ãã¡ã€ã«å
ãã³ãã®æ°ã¯ããã¹çªå·ãšåèªãè¿œå ããããšã«ãã£ãŠäœæãããŸã ãã³ãåã ãããŠãã®
ãã¡ã€ã«ã¯åºåãã¡ã€ã«ã®ãã£ã¬ã¯ããªã«äœæãããŸãã ã®å Žåã«ã¯ =ãã¡ã€ã«å ãªãã·ã§ã³ã
ãã³ãã¯ããã¹çªå·ä»ãã®ãã³ããã¡ã€ã«ã§ã¯ãªããæå®ããããã¡ã€ã«ã«åºåãããŸãã ããŒã
ãã¹ããã¹ã«ç»é²ããããšããã¹çªå·ãéçã«èšç®ãããŸãã
ãããžã£ãŒã ãããã£ãŠãçªå·ä»ãã¯ãã®åçãªå®è¡é åºãšã¯é¢ä¿ãããŸããã
ãã¹ããŸãã ç¹ã«ããã©ã°ã€ã³ã«ãã£ãŠã€ã³ã¹ããŒã«ããããã¹ã¯ã200ãè¶ ããæ°ã«ãªãå¯èœæ§ããããŸã
ãããããªãæ©ãå®è¡ãããå Žåã ãã³ãå åºåãã¡ã€ã«ã®ååããçæãããŸãã
æ瀺çã«æå®ãããå®è¡å¯èœãã¡ã€ã«ã§ãªãå Žåã¯ã
ãœãŒã¹ãã¡ã€ã«ã ãããã®ã¹ã€ããã¯ã次ã®å Žåã«ç°ãªãå¹æãããããå¯èœæ§ããããŸã -E 䜿çšãã
ååŠçã
ãããã°ãã³ãã¯ã -fdump-rtl ã¹ã€ãããŸãã¯ããã€ã -d ãªãã·ã§ã³ æçŽã ããã«
ã§äœ¿çšã§ããæå㯠ãã¹ ãš æçŽãããã³ãããã®æå³ïŒ
-fdump-rtl-alignments
åå²ã®é 眮ãèšç®ãããåŸã«ãã³ãããŸãã
-fdump-rtl-asmcons
in/outå¶çŽãæºããããŠããªãrtlã¹ããŒãã¡ã³ããä¿®æ£ããåŸã«ãã³ãããŸãã
-fdump-rtl-auto_inc_dec
auto-inc-decæ€åºåŸã«ãã³ãããŸãã ãã®ãã¹ã¯ã次ã®ã¢ãŒããã¯ãã£ã§ã®ã¿å®è¡ãããŸãã
autoincãŸãã¯autodecåœä»€ããããŸãã
-fdump-rtl-ããªã¢
ããªã¢ã®æ瀺ãã¯ãªãŒã³ã¢ããããåŸã«ãã³ãããŸãã
-fdump-rtl-bbpart
ããããšã³ãŒã«ãã®åºæ¬ãããã¯ãåå²ããåŸã«ãã³ãããŸãã
-fdump-rtl-bbro
ãããã¯ã®äžŠã¹æ¿ãåŸã«ãã³ãããŸãã
-fdump-rtl-btl1
-fdump-rtl-btl2
-fdump-rtl-btl1 ãš -fdump-rtl-btl2 XNUMXã€ã®åå²ã¿ãŒã²ããã®åŸã«ãã³ããæå¹ã«ãã
è² è·æé©åã¯åæ Œã§ãã
-fdump-rtl-ãã€ãã¹
ãžã£ã³ããã€ãã¹ããã³å¶åŸ¡ãããŒã®æé©ååŸã«ãã³ãããŸãã
-fdump-rtl-çµå
RTLåœä»€ã®çµã¿åãããã¹ã®åŸã«ãã³ãããŸãã
-fdump-rtl-compgotos
èšç®ãããgotoãè€è£œããåŸã«ãã³ãããŸãã
-fdump-rtl-ce1
-fdump-rtl-ce2
-fdump-rtl-ce3
-fdump-rtl-ce1, -fdump-rtl-ce2, -fdump-rtl-ce3 XNUMXã€ã®åŸã«ãã³ããæå¹ã«ãã
å€æã«åæ Œããå Žåã
-fdump-rtl-cprop_hardreg
ããŒãã¬ãžã¹ã¿ã³ããŒã®äŒæåŸã«ãã³ãããŸãã
-fdump-rtl-csa
ã¹ã¿ãã¯èª¿æŽãçµã¿åãããåŸã«ãã³ãããŸãã
-fdump-rtl-cse1
-fdump-rtl-cse2
-fdump-rtl-cse1 ãš -fdump-rtl-cse2 XNUMXã€ã®å ±éã®åŸã«ãã³ããæå¹ã«ãã
éšååŒé€å»ãã¹ã
-fdump-rtl-dce
ã¹ã¿ã³ãã¢ãã³ã®ãããã³ãŒãé€å»ãééããåŸã«ãã³ãããŸãã
-fdump-rtl-dbr
é 延åå²ã¹ã±ãžã¥ãŒãªã³ã°åŸã«ãã³ãããŸãã
-fdump-rtl-dce1
-fdump-rtl-dce2
-fdump-rtl-dce1 ãš -fdump-rtl-dce2 XNUMXã€ã®ãããã¹ãã¢ã®åŸã«ãã³ããæå¹ã«ãã
é€å»ãã¹ã
-fdump-rtl-ãã
EHåŠçã³ãŒãã®ãã¡ã€ãã©ã€ãºåŸã«ãã³ãããŸãã
-fdump-rtl-eh_ranges
EHåŠçç¯å²é åã®å€æåŸã«ãã³ãããŸãã
-fdump-rtl-expand
RTLçæåŸã«ãã³ãããŸãã
-fdump-rtl-fwprop1
-fdump-rtl-fwprop2
-fdump-rtl-fwprop1 ãš -fdump-rtl-fwprop2 XNUMXã€ã®ãã©ã¯ãŒãã®åŸã«ââãã³ããæå¹ã«ãã
äŒæã¯ééããŸãã
-fdump-rtl-gcse1
-fdump-rtl-gcse2
-fdump-rtl-gcse1 ãš -fdump-rtl-gcse2 ã°ããŒãã«ã³ã¢ã³åŸã®ãã³ããæå¹ã«ãã
éšååŒé€å»ã
-fdump-rtl-init-regs
ã¬ãžã¹ã¿ã®åæååŸã«ãã³ãããŸãã
-fdump-rtl-initvals
åæå€ã»ããã®èšç®åŸã«ãã³ãããŸãã
-fdump-rtl-into_cfglayout
cfglayoutã¢ãŒãã«å€æããåŸã«ãã³ãããŸãã
-fdump-rtl-ira
ã¬ãžã¹ã¿å²ãåœãŠãç¹°ãè¿ããåŸã«ãã³ãããŸãã
-fdump-rtl-ãžã£ã³ã
XNUMXåç®ã®ãžã£ã³ãæé©ååŸã«ãã³ãããŸãã
-fdump-rtl-loop2
-fdump-rtl-loop2 rtlã«ãŒãæé©åãééããåŸã«ãã³ããæå¹ã«ããŸãã
-fdump-rtl-mach
ãã·ã³äŸåã®åç·šæãã¹ãå®è¡ããåŸããã®ãã¹ã®å Žåã¯ãã³ãããŸã
ååšããŠããŸãã
-fdump-rtl-mode_sw
åé·ã¢ãŒãã¹ã€ãããåãå€ããåŸã«ãã³ãããŸãã
-fdump-rtl-rnreg
ã¬ãžã¹ã¿ã®çªå·ãä»ãçŽããåŸã«ãã³ãããŸãã
-fdump-rtl-outof_cfglayout
cfglayoutã¢ãŒãããå€æããåŸã«ãã³ãããŸãã
-fdump-rtl-ã®ããç©Ž2
ã®ããç©ŽãééããåŸã«ãã³ãããŸãã
-fdump-rtl-postreload
ãªããŒãåŸã®æé©ååŸã«ãã³ãããŸãã
-fdump-rtl-pro_and_epilogue
é¢æ°ã®ããããŒã°ãšãšãããŒã°ãçæããåŸã«ãã³ãããŸãã
-fdump-rtl-sched1
-fdump-rtl-sched2
-fdump-rtl-sched1 ãš -fdump-rtl-sched2 åºæ¬ãããã¯ã®åŸã«ãã³ããæå¹ã«ãã
ã¹ã±ãžã¥ãŒãªã³ã°ãã¹ã
-fdump-rtl-ree
ãµã€ã³/ãŒãæ¡åŒµé€å»åŸã«ãã³ãããŸãã
-fdump-rtl-seqabstr
äžè¬çãªã·ãŒã±ã³ã¹æ€åºåŸã«ãã³ãããŸãã
-fdump-rtl-shorten
æãçãããåŸã«ãã³ãããŸãã
-fdump-rtl-å åŒ
å åŒåŒã³åºãã®æé©ååŸã«ãã³ãããŸãã
-fdump-rtl-split1
-fdump-rtl-split2
-fdump-rtl-split3
-fdump-rtl-split4
-fdump-rtl-split5
-fdump-rtl-split1, -fdump-rtl-split2, -fdump-rtl-split3, -fdump-rtl-split4 ãš
-fdump-rtl-split5 XNUMXã©ãŠã³ãã®åœä»€åå²åŸã«ãã³ããæå¹ã«ããŸãã
-fdump-rtl-sms
ã¢ãžã¥ãã¹ã±ãžã¥ãŒãªã³ã°åŸã«ãã³ãããŸãã ãã®ãã¹ã¯ãäžéšã®ã¢ãŒããã¯ãã£ã§ã®ã¿å®è¡ãããŸãã
-fdump-rtl-ã¹ã¿ãã¯
GCCã®ããã©ããã¬ãžã¹ã¿ãã¡ã€ã«ãã¬ãžã¹ã¿ããx87ã¬ãžã¹ã¿ãžã®å€æåŸã«ãã³ããã
ã¹ã¿ãã¯ã®ãããªã¬ãžã¹ã¿ã ãã®ãã¹ã¯ãx86ããªã¢ã³ãã§ã®ã¿å®è¡ãããŸãã
-fdump-rtl-subreg1
-fdump-rtl-subreg2
-fdump-rtl-subreg1 ãš -fdump-rtl-subreg2 XNUMXã€ã®ãµãã¬ãžã¹ã¿ã®åŸã«ãã³ããæå¹ã«ãã
æ¡åŒµãã¹ã
-fdump-rtl-unshare
ãã¹ãŠã®rtlãå ±æ解é€ãããåŸã«ãã³ãããŸãã
-fdump-rtl-vartrack
å€æ°è¿œè·¡åŸã«ãã³ãããŸãã
-fdump-rtl-vregs
ä»®æ³ã¬ãžã¹ã¿ãããŒãã¬ãžã¹ã¿ã«å€æããåŸã«ãã³ãããŸãã
-fdump-rtl-web
ã©ã€ãã¬ã³ãžåå²åŸã«ãã³ãããŸãã
-fdump-rtl-regclass
-fdump-rtl-subregs_of_mode_init
-fdump-rtl-subregs_of_mode_finish
-fdump-rtl-dfinit
-fdump-rtl-dfinish
ãããã®ãã³ãã¯å®çŸ©ãããŠããŸãããåžžã«ç©ºã®ãã¡ã€ã«ãçæããŸãã
-in
-fdump-rtl-all
äžèšã®ãã¹ãŠã®ãã³ããçæããŸãã
-dA ã¢ã»ã³ãã©åºåã«ãã®ä»ã®ãããã°æ å ±ã§æ³šéãä»ããŸãã
-dD éåžžã«å ããŠãååŠçã®æåŸã«ãã¹ãŠã®ãã¯ãå®çŸ©ããã³ãããŸã
åºåã
-dH ãšã©ãŒãçºçãããã³ã«ã³ã¢ãã³ããçæããŸãã
-dp ã¢ã»ã³ãã©ã®åºåã«ãã©ã®ãã¿ãŒã³ãš
代æ¿ã䜿çšãããŸãã ååœä»€ã®é·ããå°å·ãããŸãã
-dP ååœä»€ã®åã«ãã³ã¡ã³ããšããŠã¢ã»ã³ãã©åºåã«RTLããã³ãããŸãã ãŸã
ãªã³ã«ãªããŸã -dp 泚éã
-dx é¢æ°ãã³ã³ãã€ã«ãã代ããã«ãé¢æ°ã®RTLãçæããã ãã§ãã éåžžã
-fdump-rtl-expand.
-fdump-noaddr
ãããã°ãã³ããè¡ããšãã¯ãã¢ãã¬ã¹åºåãæå¶ããŠãã ããã ããã«ããã
ç°ãªãã³ã³ãã€ã©ãã€ããªã䜿çšããã³ã³ãã€ã©åŒã³åºãã®ãã³ãã®ãããã°ã«diffã䜿çšãã
ããã³/ãŸãã¯ç°ãªãããã¹ã/bss/ããŒã¿/ããŒã/ã¹ã¿ãã¯/dsoã®éå§äœçœ®ã
-fdump-çªå·ãªã
ãããã°ãã³ããè¡ããšãã¯ãåœä»€çªå·ãšã¢ãã¬ã¹åºåãæå¶ããŠãã ããã ãã
ã§ã³ã³ãã€ã©åŒã³åºãã®ãã³ãããããã°ããéã«diffã䜿çšããããšãããå®çŸå¯èœã«ãªããŸã
ããŸããŸãªãªãã·ã§ã³ãç¹ã«ãããšãªã -g.
-fdump-unnumbered-links
ãããã°ãã³ããå®è¡ããå ŽåïŒãåç §ïŒ -d äžèšã®ãªãã·ã§ã³ïŒãã®åœä»€çªå·ãæå¶ããŸã
ã·ãŒã±ã³ã¹å ã®åã®åœä»€ãšæ¬¡ã®åœä»€ãžã®ãªã³ã¯ã
-fdump-翻蚳åäœ ïŒC ++ã®ã¿ïŒ
-fdump-翻蚳ãŠããã-ãªãã·ã§ã³ ïŒC ++ã®ã¿ïŒ
翻蚳ãŠãããå šäœã®ããªãŒæ§é ã®è¡šçŸããã¡ã€ã«ã«ãã³ãããŸãã
ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .tu ãœãŒã¹ãã¡ã€ã«åã«ããã¡ã€ã«ã¯
åºåãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«äœæãããŸãã ã®å Žå -ãªãã·ã§ã³ ãã©ãŒã ã䜿çšããã
ãªãã·ã§ã³ ã§èª¬æãããŠããããã«ããã³ãã®è©³çŽ°ãå¶åŸ¡ããŸã -fdump ããªãŒ ãªãã·ã§ã³ã
-fdump ã¯ã©ã¹éå±€ ïŒC ++ã®ã¿ïŒ
-fdump-ã¯ã©ã¹éå±€-ãªãã·ã§ã³ ïŒC ++ã®ã¿ïŒ
åã¯ã©ã¹ã®éå±€ãšä»®æ³é¢æ°ããŒãã«ã®ã¬ã€ã¢ãŠãã®è¡šçŸãã«ãã³ãããŸã
ãã¡ã€ã«ã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã ãã¯ã©ã¹ ãœãŒã¹ãã¡ã€ã«åãããã³ãã¡ã€ã«ã«
åºåãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«äœæãããŸãã ã®å Žå -ãªãã·ã§ã³ ãã©ãŒã ã䜿çšããã
ãªãã·ã§ã³ ã§èª¬æãããŠããããã«ããã³ãã®è©³çŽ°ãå¶åŸ¡ããŸã -fdump ããªãŒ ãªãã·ã§ã³ã
-fdump-ipa-ã¹ã€ãã
ããã·ãŒãžã£éåæèšèªããªãŒã®ããŸããŸãªæ®µéã§ã®ãã³ããå¶åŸ¡ããŸãã
ãã¡ã€ã«ã ãã¡ã€ã«åã¯ãã¹ã€ããåºæã®ãµãã£ãã¯ã¹ããœãŒã¹ã«è¿œå ããããšã«ãã£ãŠçæãããŸã
ãã¡ã€ã«åããã¡ã€ã«ã¯åºåãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«äœæãããŸãã ã¶
次ã®ãã³ããå¯èœã§ãã
ã ãã¹ãŠã®ããã·ãŒãžã£éåæãã³ããæå¹ã«ããŸãã
ã°ã©ã
ã³ãŒã«ã°ã©ãã®æé©åãæªäœ¿çšã®é¢æ°ã®åé€ãããã³
ã€ã³ã©ã€ã³åã®æ±ºå®ã
ã€ã³ã©ã€ã³
é¢æ°ã®ã€ã³ã©ã€ã³ååŸã«ãã³ãããŸãã
-fdump-ãã¹
çŸåšã®ã«ãã£ãŠãªã³ãšãªãã«ãããæé©åãã¹ã®ãªã¹ãããã³ãããŸã
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
-fdump-çµ±èš-ãªãã·ã§ã³
å¥ã®ãã¡ã€ã«ã§ã®ãã¹çµ±èšã®ãã³ããæå¹ã«ããŠå¶åŸ¡ããŸãã ãã¡ã€ã«åã¯
ã§çµããæ¥å°ŸèŸãè¿œå ããããšã«ãã£ãŠçæãããŸã ãçµ±èšåŠ ãœãŒã¹ãã¡ã€ã«åã«ããããŠ
ãã¡ã€ã«ã¯ãåºåãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«äœæãããŸãã ã®å Žå -ãªãã·ã§ã³ 圢ã¯
äžå€ã -çµ±èš ã«ãŠã³ã¿ãã³ã³ãã€ã«ãŠãããå šäœã§åèšãããããã«ããŸãã
-詳现 ãã¹ãã€ãã³ããçæãããšããã¹ãŠã®ã€ãã³ãããã³ãããŸãã ãªãã·ã§ã³ãªãã®ããã©ã«ãã¯
ã³ã³ãã€ã«ãããåé¢æ°ã®ã«ãŠã³ã¿ãŒãåèšããŸãã
-fdump-tree-ã¹ã€ãã
-fdump-tree-ã¹ã€ãã-ãªãã·ã§ã³
-fdump-tree-ã¹ã€ãã-ãªãã·ã§ã³=ãã¡ã€ã«å
äžéèšèªããªãŒã®åŠçã®ããŸããŸãªæ®µéã§ãã³ããå¶åŸ¡ããŠã
ãã¡ã€ã«ã ãã¡ã€ã«åã¯ãã¹ã€ããåºæã®ãµãã£ãã¯ã¹ãã«è¿œå ããããšã«ãã£ãŠçæãããŸãã
ãœãŒã¹ãã¡ã€ã«åããã¡ã€ã«ã¯åºåãã¡ã€ã«ãšåããã£ã¬ã¯ããªã«äœæãããŸãã ã®
ã®å Žå =ãã¡ã€ã«å ãªãã·ã§ã³ã®å Žåããã³ãã¯èªåã§ã¯ãªãæå®ããããã¡ã€ã«ã«åºåãããŸã
ååä»ããã³ããã¡ã€ã«ã ã®å Žå -ãªãã·ã§ã³ ãã©ãŒã ã䜿çšããã ãªãã·ã§ã³ ã®ãªã¹ãã§ã - åé¢ããŸãã
ãã³ãã®è©³çŽ°ãå¶åŸ¡ãããªãã·ã§ã³ã ãã¹ãŠã®ãªãã·ã§ã³ããã¹ãŠã«é©çšã§ããããã§ã¯ãããŸãã
ãã³ã; æå³ã®ãªããã®ã¯ç¡èŠãããŸãã 次ã®ãªãã·ã§ã³ã䜿çšã§ããŸã
äœæ
åããŒãã®ã¢ãã¬ã¹ãåºåããŸãã éåžžãããã¯å€æŽãããããæå³ããããŸãã
ç°å¢ãšãœãŒã¹ãã¡ã€ã«ã«å¿ããŠã ãã®äž»ãªçšéã¯ã
ãããã°ç°å¢ã§ãã¡ã€ã«ããã³ãããŸãã
asmname
ç¹å®ã®declã«ãDECL_ASSEMBLER_NAMEããèšå®ãããŠããå Žåã¯ãããããã³ãã§äœ¿çšããŸã
ãDECL_NAMEãã®ä»£ããã«ã ãã®äž»ãªçšéã¯ã
ã¢ã»ã³ããªãã¡ã€ã«å ã®ãã³ã°ã«ãããååã
ã¹ãªã
ããã³ããšã³ãäžéè¡šçŸããã³ããããšãã¯ãã®ã¡ã³ããŒã®ãã³ããçŠæ¢ããŸã
åã«ãã®ã¹ã³ãŒãã«å°éãããšããçç±ã ãã§ãé¢æ°ã®ã¹ã³ãŒããŸãã¯æ¬äœã ããã ã
ä»ã®ãã¹ããçŽæ¥å°éã§ããå Žåã¯ããã®ãããªã¢ã€ãã ããã³ãããŸãã
ãããã«å°å·ãããæšããã³ããããšãããã®ãªãã·ã§ã³ã¯ã®æ¬äœã®ãã³ããçŠæ¢ããŸã
å¶åŸ¡æ§é ã
RTLããã³ããããšãã¯ãããã©ã«ãã§ã¯ãªãã¹ãªã ïŒå§çž®ïŒåœ¢åŒã§RTLãå°å·ããŸã
LISPã®ãããªè¡šçŸã
ç ããªãŒã®çã®è¡šçŸãå°å·ããŸãã ããã©ã«ãã§ã¯ãæšã¯ãããã«å°å·ãããŸã
Cã®ãããªè¡šçŸã
details
ãã詳现ãªãã³ããæå¹ã«ããŸãïŒãã¹ãŠã®ãã³ããªãã·ã§ã³ã§åãå ¥ããããããã§ã¯ãããŸããïŒã å«ãã
æé©åãã¹ããã®æ å ±ã
çµ±èšæ å ±
ãã¹ã«é¢ããããŸããŸãªçµ±èšã®ãã³ããæå¹ã«ããŸãïŒãã¹ãŠã®ãã³ãã§å°éãããããã§ã¯ãããŸããïŒ
ãªãã·ã§ã³ïŒã
ãããã¯
åºæ¬ãããã¯å¢çã®è¡šç€ºãæå¹ã«ããŸãïŒrawãã³ãã§ã¯ç¡å¹ïŒã
ã°ã©ã
ä»ã®ç€ºããããã³ããã¡ã€ã«ã®ããããã«ã€ããŠïŒ-fdump-rtl-ãã¹ïŒããã³ã
GraphVizã§ã®è¡šç€ºã«é©ããå¶åŸ¡ãããŒã°ã©ãã®è¡šçŸ
ãã¡ã€ã«.ãã¹ID.ãã¹.ãããã ãã¡ã€ã«å ã®åé¢æ°ã¯ããµãã°ã©ããšããŠãããã«å°å·ãããŸãã
GraphVizãããããã¹ãŠãåäžã®ããããã§ã¬ã³ããªã³ã°ã§ããããã«ããŸãã
ãã®ãªãã·ã§ã³ã¯çŸåšãRTLãã³ãã«å¯ŸããŠã®ã¿æ©èœããRTLã¯åžžã«æ¬¡ã®å Žæã«ãã³ããããŸãã
ã¹ãªã ãªãã©ã«ã ã
VOP
ãã¹ãŠã®ã¹ããŒãã¡ã³ãã®ä»®æ³ãªãã©ã³ãã®è¡šç€ºãæå¹ã«ããŸãã
ãªãã
ã¹ããŒãã¡ã³ãã®è¡çªå·ã®è¡šç€ºãæå¹ã«ããŸãã
UID åå€æ°ã®äžæã®IDïŒ "DECL_UID"ïŒã®è¡šç€ºãæå¹ã«ããŸãã
詳现
åã¹ããŒãã¡ã³ãã®ããªãŒãã³ãã®è¡šç€ºãæå¹ã«ããŸãã
eh åã¹ããŒãã¡ã³ããä¿æããŠããEHãªãŒãžã§ã³çªå·ã®è¡šç€ºãæå¹ã«ããŸãã
scev
ã¹ã«ã©ãŒé²ååæã®è©³çŽ°ã®è¡šç€ºãæå¹ã«ããŸãã
æé©å
æé©åæ å ±ã®è¡šç€ºãæå¹ã«ããŸãïŒç¹å®ã®ãã¹ã§ã®ã¿äœ¿çšå¯èœïŒã
éãã
èŠéããæé©åæ å ±ã®è¡šç€ºãæå¹ã«ããŸãïŒç¹å®ã®ãã¹ã§ã®ã¿äœ¿çšå¯èœïŒã
ããŒã
ãã®ä»ã®è©³çŽ°ãªæé©åæ å ±ãæå¹ã«ããŸãïŒç¹å®ã®ãã¹ã§ã®ã¿äœ¿çšå¯èœïŒã
=ãã¡ã€ã«å
èªåååä»ããã³ããã¡ã€ã«ã®ä»£ããã«ãæå®ããããã¡ã€ã«åã«åºåããŸãã ãã¡ã€ã«
å (Linuxã§èšããšããã®stdoutïŒ ãš stderr ç¹å¥ã«æ±ããããã§ã«éããŠãããšèŠãªãããŸã
æšæºã¹ããªãŒã ã äŸãã°ã
gcc -O2 -ftree-vectorize -fdump-tree-vect-blocks = foo.dump
-fdump-tree-pre = stderr file.c
ãã¯ã¿ãŒåããããã³ããåºåããŸã foo.ãã³ããPREãã³ããåºåãããŠããé stderr.
åããã¹ã«XNUMXã€ã®ç«¶åãããã³ããã¡ã€ã«åãæå®ãããŠããå ŽåãåŸè ã¯
ãªãã·ã§ã³ã¯ä»¥åã®ãã®ãäžæžãããŸãã
ã ãé€ããã¹ãŠã®ãªãã·ã§ã³ããªã³ã«ããŸã ç, ã¹ãªã , 詳现 ãš ãªãã.
ãªãããªãŒã«
ãã¹ãŠã®æé©åãªãã·ã§ã³ããªã³ã«ããŸãã æé©å, éãã, 泚æ.
次ã®ããªãŒãã³ããå¯èœã§ãã
ãªãªãžãã«
ããªãŒããŒã¹ã®æé©åã®åã«ãã³ãããŠã ãã¡ã€ã«.ãªãªãžãã«.
æé©å
ãã¹ãŠã®ããªãŒããŒã¹ã®æé©ååŸã«ãã³ããã ãã¡ã€ã«.æé©åæžã¿.
ã®ã³ãã«
gimplificationãã¹ã®ååŸã«åé¢æ°ããã¡ã€ã«ã«ãã³ãããŸãã ãã¡ã€ã«
ååã¯è¿œå ããŠäœæãããŸã .ã®ã³ãã« ãœãŒã¹ãã¡ã€ã«åã«ã
cfg åé¢æ°ã®å¶åŸ¡ãããŒã°ã©ãããã¡ã€ã«ã«ãã³ãããŸãã ãã¡ã€ã«åã¯ã«ãã£ãŠäœãããŠããŸã
è¿œèš .cfgã® ãœãŒã¹ãã¡ã€ã«åã«ã
ch ã«ãŒãããããŒãã³ããŒããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã
.ch ãœãŒã¹ãã¡ã€ã«åã«ã
SSA SSAé¢é£ã®æ å ±ããã¡ã€ã«ã«ãã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .ssa
ãœãŒã¹ãã¡ã€ã«åã«ã
alias
åé¢æ°ã®ãšã€ãªã¢ã·ã³ã°æ å ±ããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã
ããšã€ãªã¢ã¹ ãœãŒã¹ãã¡ã€ã«åã«ã
CCP CCPã®åŸã«åé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .ccp ãã
ãœãŒã¹ãã¡ã€ã«åã
ã¹ãã¢CCP
STORE-CCPã®åŸã«åé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .storeccp
ãœãŒã¹ãã¡ã€ã«åã«ã
ã㬠éšååé·æ§é€å»åŸã«ããªãŒããã³ãããŸãã ãã¡ã€ã«åã¯ã«ãã£ãŠäœãããŠããŸã
è¿œèš .pre ãœãŒã¹ãã¡ã€ã«åã«ã
åšæ³¢æ° å®å šåé·æ§é€å»åŸã«ããªãŒããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã
.fre ãœãŒã¹ãã¡ã€ã«åã«ã
ã³ããŒãããã
ã³ããŒäŒæåŸã«ããªãŒããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .copyprop
ãœãŒã¹ãã¡ã€ã«åã«ã
ã¹ãã¢_ã³ããŒãããã
ã¹ãã¢ã®ã³ããŒäŒæåŸã«ããªãŒããã³ãããŸãã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã
.store_copyprop ãœãŒã¹ãã¡ã€ã«åã«ã
DCE ãããã³ãŒãé€å»åŸã«åé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯ã«ãã£ãŠäœãããŠããŸã
è¿œèš .dce ãœãŒã¹ãã¡ã€ã«åã«ã
SRA éèšã®ã¹ã«ã©ãŒçœ®æãå®è¡ããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«
ååã¯è¿œå ããŠäœæãããŸã .sra ãœãŒã¹ãã¡ã€ã«åã«ã
ã·ã³ã¯
ã³ãŒãã·ã³ã¯ãå®è¡ããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯ã«ãã£ãŠäœãããŠããŸã
è¿œèš ãã·ã³ã¯ ãœãŒã¹ãã¡ã€ã«åã«ã
å€ªéœ ããããŒã¿ãŒããªãŒã®æé©åãé©çšããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯
ãè¿œå ããŠäœæ .dom ãœãŒã¹ãã¡ã€ã«åã«ã
ãã ãããã¹ãã¢é€å»ãé©çšããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åãäœæãããŸã
è¿œå ããããšã«ãã .dse ãœãŒã¹ãã¡ã€ã«åã«ã
ãã¡ã€ãªãã
PHIããŒããçŽç·ã³ãŒãã«æé©åããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«
ååã¯è¿œå ããŠäœæãããŸã .phiopt ãœãŒã¹ãã¡ã€ã«åã«ã
ãã©ã¢ãããã
䜿ãæšãŠå€æ°ãé æ¹åã«äŒæããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«å
è¿œå ããããšã«ãã£ãŠäœãããŠããŸã .forwprop ãœãŒã¹ãã¡ã€ã«åã«ã
ååã®ã³ããŒ
ã³ããŒååå€æŽã®æé©åãé©çšããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯
ãè¿œå ããŠäœæ .copyrename ãœãŒã¹ãã¡ã€ã«åã«ã
nrv ãžã§ããªãã¯ã«ååä»ãæ»ãå€ã®æé©åãé©çšããåŸãåé¢æ°ããã³ãããŸã
æšã ãã¡ã€ã«åã¯è¿œå ããŠäœæããŸã .nrv ãœãŒã¹ãã¡ã€ã«åã«ã
ãã¯ã¿ãŒ
ã«ãŒãã®ãã¯ãã«åãé©çšããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åãäœæãããŸã
è¿œå ããããšã«ãã .vect ãœãŒã¹ãã¡ã€ã«åã«ã
slp åºæ¬ãããã¯ã®ãã¯ãã«åãé©çšããåŸãåé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯
ãè¿œå ããŠäœæ .slp ãœãŒã¹ãã¡ã€ã«åã«ã
VRP å€ã®ç¯å²ã®äŒæïŒVRPïŒã®åŸã«åé¢æ°ããã³ãããŸãã ãã¡ã€ã«åã¯ã«ãã£ãŠäœãããŠããŸã
è¿œèš .vrp ãœãŒã¹ãã¡ã€ã«åã«ã
ã ãã®ãªãã·ã§ã³ã§æäŸããããã©ã°ã䜿çšããŠã䜿çšå¯èœãªãã¹ãŠã®ããªãŒãã³ããæå¹ã«ããŸãã
-fopt-æ å ±
-fopt-æ å ±-ãªãã·ã§ã³
-fopt-æ å ±-ãªãã·ã§ã³=ãã¡ã€ã«å
ããŸããŸãªæé©åãã¹ããã®æé©åãã³ããå¶åŸ¡ããŸãã ã®å Žå -ãªãã·ã§ã³ 圢ã¯
äžå€ã ãªãã·ã§ã³ ã®ãªã¹ãã§ã - ãã³ãã®è©³çŽ°ãéžæããããã®åå¥ã®ãªãã·ã§ã³ãš
æé©åã ããã ãªãã·ã§ã³ æå®ãããŠããªãå Žåãããã©ã«ã㧠æé©å 詳现ãš
ãªãããªãŒã« æé©åã°ã«ãŒãçšã ã®å Žå ãã¡ã€ã«å æå®ãããŠããªãå Žåãããã©ã«ãã§
stderrã åºåã«æ³šæããŠãã ãã ãã¡ã€ã«å è€æ°ã®å Žåã¯äžæžããããŸã
翻蚳åäœã è€æ°ã®ç¿»èš³ãŠãããããã®çµã¿åããåºåãå¿ èŠãªå Žåã¯ã
stderr 代ããã«äœ¿çšããå¿ èŠããããŸãã
ãªãã·ã§ã³ã¯1ã€ã®ã°ã«ãŒãã«åããããšãã§ããŸããXNUMXïŒã®åé·æ§ã説æãããªãã·ã§ã³
ãã³ããããã³2ïŒã©ã®æé©åãå«ããå¿ èŠããããã説æãããªãã·ã§ã³ã ãªãã·ã§ã³
éè€ããªããããäž¡æ¹ã®ã°ã«ãŒãããèªç±ã«æ··åã§ããŸãã ãã ãã
競åãçºçããå ŽåãåŸè ã®ãªãã·ã§ã³ã¯ã³ãã³ãã©ã€ã³ã®åã®ãªãã·ã§ã³ãäžæžãããŸãã
è€æ°ã®-fopt-infoãªãã·ã§ã³ã䜿çšã§ããŸããã䜿çšã§ããã®ã¯ãã®ãã¡ã®XNUMXã€ã ãã§ãã =ãã¡ã€ã«å.
ä»ã®ãã¡ã€ã«åãæå®ãããŠããå Žåãæåã®ãã¡ã€ã«åãé€ããã¹ãŠãç¡èŠãããŸãã
ãã³ãã®è©³çŽ°åºŠã«ã¯ã次ã®ãªãã·ã§ã³ããããŸã
æé©å
æé©åãæ£åžžã«é©çšããããšãã«æ å ±ãåºåããŸãã ãã¹ãŸã§ã§ã
é¢é£ããæ å ±ã決å®ããŸãã ããšãã°ããã¯ãã©ã€ã¶ãŒã¯å°å·ãæž¡ããŸã
æ£åžžã«ãã¯ãã«åãããã«ãŒãã®ãœãŒã¹ã®å Žæã
éãã
倱æããæé©åã«é¢ããæ å ±ãåºåããŸãã åã ã®ãã¹ã®å¶åŸ¡
åºåã«å«ããæ å ±ã äŸãã°ã
gcc -O2 -ftree-vectorize -fopt-info-vec-missed
ãã¯ãã«åããéããæé©åã®æ©äŒã«é¢ããæ å ±ãåºåããŸã
stderrãæž¡ããŸãã
泚æ
ç¹å®ã®å€æãªã©ãæé©åã«é¢ãã詳现æ å ±ãåºåããŸãã
決å®ãªã©ã«é¢ãããã詳现ãªã¡ãã»ãŒãžã
ã 詳现ãªæé©åæ å ±ãå°å·ããŸãã ããã æé©å, éãã,
泚æ.
ãªãã·ã§ã³ã®XNUMXçªç®ã®ã»ããã¯ãæé©åã®ã°ã«ãŒããèšè¿°ããXNUMXã€ãŸãã¯
以äžã®è©³çŽ°ã
IPA ãã¹ãŠã®æç¶ãéæé©åããã®ãã³ããæå¹ã«ããŸãã
ã«ãŒã
ãã¹ãŠã®ã«ãŒãæé©åããã®ãã³ããæå¹ã«ããŸãã
ã€ã³ã©ã€ã³
ãã¹ãŠã®ã€ã³ã©ã€ã³æé©åããã®ãã³ããæå¹ã«ããŸãã
VEC ãã¹ãŠã®ãã¯ãã«åæé©åããã®ãã³ããæå¹ã«ããŸãã
ãªãããªãŒã«
ãã¹ãŠã®æé©åããã®ãã³ããæå¹ã«ããŸãã ããã¯æé©åã°ã«ãŒãã®ã¹ãŒããŒã»ããã§ã
äžèšã«ãªã¹ããããŠããŸãã
ããšãã°ã
gcc -O3 -fopt-info-missed = missed.all
ã«ãã¹ãŠã®ãã¹ããéããæé©åã¬ããŒããåºåããŸã èŠéããã.
å¥ã®äŸãšããŠã
gcc -O3 -fopt-info-inline-optimized-missed = inline.txt
éããæé©åãšæé©åãããå Žæã«é¢ããæ å ±ãããåºåããŸã
ãã¹ãŠã®ã€ã³ã©ã€ã³åãã¹ ã€ã³ã©ã€ã³.txt.
Status ãã¡ã€ã«å ãæäŸããããšãé©çšå¯èœãªãã¹ãŠã®æé©åããã®ãã³ãã¯æ¬¡ã®ããã«ãªããŸãã
ã«é£çµãããŸã ãã¡ã€ã«åã ãã以å€ã®å Žåããã³ãã¯ã«åºåãããŸã stderrã å Žå ãªãã·ã§ã³
çç¥ãããããã©ã«ãã§ å šæé©ãããã¯å©çšå¯èœãªãã¹ãŠã®æé©åããã³ãããããšãæå³ããŸã
ãã¹ãŠã®ãã¹ããã®æ å ±ã 次ã®äŸã§ã¯ããã¹ãŠã®æé©åæ å ±ãã«åºåãããŸã
ããž stderr.
gcc -O3 -fopt-info
泚æããŠãã ãã -fopt-info-vec-missed ãšåãããã«åäœããŸã -fopt-info-missed-vec.
å¥ã®äŸãšããŠã
gcc -fopt-info-vec-missed = vec.miss -fopt-info-loop-optimized = loop.opt
ããã«XNUMXã€ã®åºåãã¡ã€ã«åããããŸã vec.miss ãš ã«ãŒã.ãªãã XNUMXã€ã ããªã®ã§ç«¶åããŠããŸã
åºåãã¡ã€ã«ãèš±å¯ãããŸãã ãã®å Žåãæåã®ãªãã·ã§ã³ã®ã¿ãæå¹ã«ãªãã
以éã®ãªãã·ã§ã³ã¯ç¡èŠãããŸãã ãããã£ãŠã vec.miss ãå«ããçæãããŸã
éããæ©äŒã«ã€ããŠã®ãã¯ãã©ã€ã¶ãŒããã®ãã³ãã
-frandom-seed =string
ãã®ãªãã·ã§ã³ã¯ãçææã«ä¹±æ°ã®ä»£ããã«GCCã䜿çšããã·ãŒããæäŸããŸã
ã³ã³ãã€ã«ããããã¡ã€ã«ããšã«ç°ãªãå¿ èŠãããç¹å®ã®ã·ã³ãã«åã ããã
ã«ãã¬ããžããŒã¿ãã¡ã€ã«ãšçæãããªããžã§ã¯ããã¡ã€ã«ã«äžæã®ã¹ã¿ã³ããé 眮ããããã«äœ¿çšãããŸã
圌ãã ããªãã¯äœ¿çšããããšãã§ããŸã -frandom-ã·ãŒã åçŸå¯èœã«åäžã®ãªããžã§ã¯ããçæãããªãã·ã§ã³
ãã¡ã€ã«ã
ãã® string ã³ã³ãã€ã«ãããã¡ã€ã«ããšã«ç°ãªãå¿ èŠããããŸãã
-fsched-verbose =n
åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ã䜿çšããã¿ãŒã²ããã§ã¯ããã®ãªãã·ã§ã³ã¯
ã¹ã±ãžã¥ãŒã©ãŒãåºåãããããã°åºåã ãã®æ å ±ã¯æšæºãšã©ãŒã«æžã蟌ãŸããŸããã
ãªãéãã -fdump-rtl-sched1 or -fdump-rtl-sched2 ãæå®ãããŠããå ŽåãåºåãããŸã
éåžžã®ãã³ããªã¹ããã¡ã€ã«ã«ã .sched1 or .sched2 ããããã ãã ãã n
XNUMXãã倧ããå Žåãåºåã¯åžžã«æšæºãšã©ãŒã§åºåãããŸãã
n ãŒããã倧ããã -fsched-verbose ãšåãæ å ±ãåºåããŸã
-fdump-rtl-sched1 ãš -fdump-rtl-sched2ã ã®ããã« n XNUMXãã倧ããå Žåã¯ãåºæ¬çãªåºåãè¡ããŸã
ãããã¯ç¢ºçã詳现ãªæºåãªã¹ãæ å ±ãããã³ãŠããã/insnæ å ±ã ããã« n
XNUMXãã倧ããå Žåãã¢ããŒããã€ã³ãã§ã®RTLãå¶åŸ¡ãããŒãããã³ãªãŒãžã§ã³æ å ±ãå«ãŸããŸãã ãš
for n XNUMXã€ä»¥äžã -fsched-verbose äŸåé¢ä¿æ å ±ãå«ãŸããŸãã
-äžæä¿å
-save-temps = cwd
éåžžã®ãäžæçãªãäžéãã¡ã€ã«ãæ°žç¶çã«ä¿åããŸãã ããããçŸåšã«é 眮ããŸã
ãã£ã¬ã¯ããªãäœæãããœãŒã¹ãã¡ã€ã«ã«åºã¥ããŠååãä»ããŸãã ãããã£ãŠãã³ã³ãã€ã« foo.c ã -c
-äžæä¿å ãã¡ã€ã«ãçæããŸã ããŒã»ã¢ã€ ãš foo.sã ãšåæ§ ãµãŒãã ããã«ããã
ååŠç ããŒã»ã¢ã€ ã³ã³ãã€ã©ãé垞䜿çšããŠããã«ãããããããåºåãã¡ã€ã«
çµ±åããªããã»ããµã
ãšçµã¿åãããŠäœ¿çšââããå Žå -x ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã -äžæä¿å è³¢æã§ã
ãšåãæ¡åŒµåãæã€å ¥åãœãŒã¹ãã¡ã€ã«ã®äžæžããåé¿ããã®ã«åå
äžéãã¡ã€ã«ã 察å¿ããäžéãã¡ã€ã«ã¯ãååãå€æŽããããšã§ååŸã§ããŸã
䜿çšããåã®ãœãŒã¹ãã¡ã€ã« -äžæä¿å.
GCCã䞊è¡ããŠåŒã³åºãå Žåã¯ãå ±æããããã€ãã®ç°ãªããœãŒã¹ãã¡ã€ã«ãã³ã³ãã€ã«ããŸãã
ç°ãªããµããã£ã¬ã¯ããªã®å ±éããŒã¹åãŸãã¯ã³ã³ãã€ã«ãããåããœãŒã¹ãã¡ã€ã«
è€æ°ã®åºåå ã®å Žåãç°ãªã䞊åã³ã³ãã€ã©ãŒã¯
äºãã«å¹²æžããäžæãã¡ã€ã«ãäžæžãããŸãã äŸãã°ïŒ
gcc -save-temps -o outdir1 / foo.o indir1 / foo.cïŒ
gcc -save-temps -o outdir2 / foo.o indir2 / foo.cïŒ
çµæãšã㊠ããŒã»ã¢ã€ ãš ãµãŒã äž¡æ¹ã®ã³ã³ãã€ã©ã«ãã£ãŠåæã«æžã蟌ãŸããŸãã
-save-temps = obj
éåžžã®ãäžæçãªãäžéãã¡ã€ã«ãæ°žç¶çã«ä¿åããŸãã ã®å Žå -o ãªãã·ã§ã³ã䜿çšãããŸãã
äžæãã¡ã€ã«ã¯ãªããžã§ã¯ããã¡ã€ã«ã«åºã¥ããŠããŸãã ã®å Žå -o ãªãã·ã§ã³ã¯äœ¿çšãããŸããã
-save-temps = obj ã¹ã€ããã¯æ¬¡ã®ããã«åäœããŸã -äžæä¿å.
äŸïŒ
gcc -save-temps = obj -c foo.c
gcc -save-temps = obj -c bar.c -o dir / xbar.o
gcc -save-temps = obj foobar.c -o dir2 / yfoobar
äœæããŸãã ããŒã»ã¢ã€, foo.s, dir / xbar.i, dir / xbar.s, dir2 / yfoobar.i, dir2 / yfoobar.s,
dir2 / yfoobar.o.
-æé[=file]
ã³ã³ãã€ã«ã·ãŒã±ã³ã¹ã®åãµãããã»ã¹ã«ããã£ãCPUæéãå ±åããŸãã Cã®å Žå
ãœãŒã¹ãã¡ã€ã«ãããã¯é©åãªã³ã³ãã€ã©ãšã¢ã»ã³ãã©ã§ãïŒããã«ããªã³ã¯ã
çµããïŒã
åºåãã¡ã€ã«ãæå®ããªãå Žåãåºåã¯æ¬¡ã®ããã«ãªããŸãã
ïŒcc1 0.12 0.01
ïŒ0.00ãšããŠ
åè¡ã®æåã®æ°åã¯ããŠãŒã¶ãŒæéããã€ãŸãå®è¡ã«è²»ããããæéã§ãã
ããã°ã©ã èªäœã XNUMXçªç®ã®æ°å€ã¯ãã·ã¹ãã æéãã§ãããæäœã®å®è¡ã«è²»ããããæéã§ãã
ããã°ã©ã ã«ä»£ãã£ãŠã·ã¹ãã ã«ãŒãã³ã äž¡æ¹ã®æ°å€ã¯ç§åäœã§ãã
åºåãã¡ã€ã«ã®æå®ã«ãããåºåã¯æå®ããããã¡ã€ã«ã«è¿œå ãããŸãã
ãããŠããã¯ãã®ããã«èŠããŸãïŒ
0.12 0.01 cc1
0.00 0.01 as
ããŠãŒã¶ãŒæéããšãã·ã¹ãã æéãã¯ããã°ã©ã åã®åã«ç§»åããã
ããã°ã©ã ã«æž¡ããããªãã·ã§ã³ã衚瀺ãããã®ã§ãåŸã§ã©ã®ãã¡ã€ã«ããã£ãããç¥ãããšãã§ããŸã
ã³ã³ãã€ã«ãããã©ã®ãªãã·ã§ã³ã§ã
-fvar-远跡
å€æ°ãã©ããã³ã°ãã¹ãå®è¡ããŸãã å€æ°ãåäœçœ®ã«æ ŒçŽãããŠããå Žæãèšç®ããŸã
ã³ãŒãã§ã 次ã«ãããé©åãªãããã°æ å ±ãçæãããŸãïŒãããã°æ å ±ã
ãã©ãŒãããã¯ãã®æ å ±ããµããŒãããŸãïŒã
æé©åã䜿çšããŠã³ã³ãã€ã«ãããšãããã©ã«ãã§æå¹ã«ãªããŸãïŒ-ãªã¹, -O, -O2ã...ïŒã
ãããã°æ å ±ïŒ-gïŒããã³ãããã°æ å ±åœ¢åŒã¯ããããµããŒãããŸãã
-fvar-远跡-å²ãåœãŠ
ã³ã³ãã€ã«ã®æ©ã段éã§ãŠãŒã¶ãŒå€æ°ãžã®å²ãåœãŠã«æ³šéãä»ããå®è¡ãè©Šã¿ãŸã
泚éã¯ãã³ã³ãã€ã«ã®æåŸãŸã§ãè©Šè¡ãããŸã
æé©åããªãããããã°æ å ±ãæ¹åããŸãã ã®äœ¿çš -gdwarf-4 ã«æ²¿ã£ãŠæšå¥šãããŸã
ãããšã
var-trackingãç¡å¹ã«ãªã£ãŠããå Žåã§ãæå¹ã«ã§ããŸãããã®å Žåã泚éã¯
äœæããã³ä¿å®ãããŸããããæåŸã«ç Žæ£ãããŸããã
-fvar-tracking-assignments-toggle
ãã°ã« -fvar-远跡-å²ãåœãŠãåãæ¹æ³ã§ -ã°ãã°ã« ãã°ã« -g.
-print-file-name =ã©ã€ãã©ãª
ã©ã€ãã©ãªãã¡ã€ã«ã®å®å šãªçµ¶å¯ŸåãåºåããŸã ã©ã€ãã©ãª ããã¯æ¬¡ã®å Žåã«äœ¿çšãããŸã
ãªã³ã¯---ãããŠä»ã«äœãããŸããã ãã®ãªãã·ã§ã³ã䜿çšãããšãGCCã¯ã³ã³ãã€ã«ãŸãã¯ãªã³ã¯ããŸãã
ãªãã§ã; ãã¡ã€ã«åãåºåããã ãã§ãã
-print-ãã«ããã£ã¬ã¯ããª
ä»ã®ã¹ã€ããã§éžæãããmultilibã«å¯Ÿå¿ãããã£ã¬ã¯ããªåãåºåããŸã
ã³ãã³ãã©ã€ã³ã«ååšããŸãã ãã®ãã£ã¬ã¯ããªã¯ã«ååšããããšã«ãªã£ãŠããŸã GCC_EXEC_PREFIX.
-print-multi-lib
multilibãã£ã¬ã¯ããªåããããããæå¹ã«ããã³ã³ãã€ã©ã¹ã€ãããžã®ãããã³ã°ãåºåããŸãã
ãã£ã¬ã¯ããªåã¯ãã¹ã€ãããã次ã®ããã«åºåãããŠããŸãã ;ãããã³åã¹ã€ããã¯ã§å§ãŸããŸã
@ ãã®ä»£ããã« -ãè€æ°ã®ã¹ã€ããã®éã«ã¹ããŒã¹ãå ¥ããªãã§ãã ããã ããã¯
ã·ã§ã«åŠçã容æã«ããŸãã
-print-multi-os-directory
éžæããmultilibã®OSã©ã€ãã©ãªãžã®ãã¹ãããã€ãã®çžå¯Ÿçãªãã®ãšããŠåºåããŸã ãªã
ãµããã£ã¬ã¯ããªã OSã©ã€ãã©ãªãã«ååšããå Žå ãªã ãµããã£ã¬ã¯ããªããããmultilibã¯ãããŸãã
䜿çšãããŸããããã¯éåžžã¡ããã©ã§ã .ãOSã©ã€ãã©ãªãã«ååšããå Žå ã©ã€ãã©ãªãµãã£ãã¯ã¹ å åŒ
ãããå°å·ãããã£ã¬ã¯ããªäŸ ../ lib64, ../ lib or ../ lib32ããŸãã¯OSã©ã€ãã©ãªã
ã«ååšãã lib / subdir å°å·ãããµããã£ã¬ã¯ããªäŸïŒ amd64, spacv9 or ev6.
-print-multiarch
éžæãããã«ãã¢ãŒãã®OSã©ã€ãã©ãªãžã®ãã¹ãããã€ãã®çžå¯Ÿçãªãã®ãšããŠåºåããŸã ãªã
ãµããã£ã¬ã¯ããªã
-print-prog-name =ããã°ã©ã
ããã -å°å·ãã¡ã€ã«åããã ãããªã©ã®ããã°ã©ã ãæ€çŽ¢ããŸã cpp.
-print-libgcc-ãã¡ã€ã«å
ãšåã -print-file-name = libgcc.a.
ããã¯ã䜿çšãããšãã«äŸ¿å©ã§ã -nostdlib or -nodefaultlibs ããããããªãã¯ãšãªã³ã¯ãããã§ã
libgcc.a. ã§ãããïŒ
gcc -nostdlib ... `gcc -print-libgcc-file-name`
-å°å·æ€çŽ¢ãã£ã¬ã¯ããª
æ§æãããã€ã³ã¹ããŒã«ãã£ã¬ã¯ããªã®ååãšããã°ã©ã ã®ãªã¹ããå°å·ãã
ã©ã€ãã©ãªãã£ã¬ã¯ã㪠gccã® æ€çŽ¢---ãããŠä»ã«äœãããŸããã
ããã¯æ¬¡ã®å Žåã«äŸ¿å©ã§ã gccã® ãšã©ãŒã¡ãã»ãŒãžãåºåããŸã ã€ã³ã¹ããŒã« åé¡ã exec
cpp0ïŒ ããã ãã®ãã㪠file or ãã£ã¬ã¯ããªã«ãžã§ããéå§ããŸããã ããã解決ããã«ã¯ãã©ã¡ããã眮ãå¿ èŠããããŸã cpp0 ãš
ä»ã®ã³ã³ãã€ã©ã³ã³ããŒãã³ã gccã® ããããèŠã€ããããšãæåŸ ããŸãããŸãã¯ããªãã¯èšå®ããããšãã§ããŸã
ç°å¢å€æ° GCC_EXEC_PREFIX ããããã€ã³ã¹ããŒã«ãããã£ã¬ã¯ããªã«ç§»åããŸãã ããªãã§ãã ãã
æ«å°Ÿãå¿ãã /.
-å°å·-sysroot
ã³ã³ãã€ã«äžã«äœ¿çšãããã¿ãŒã²ããsysrootãã£ã¬ã¯ããªãåºåããŸãã ããã¯
æ§ææã«ããŸãã¯ã䜿çšããŠæå®ãããã¿ãŒã²ããsysroot --sysroot ãªãã·ã§ã³ã
ã³ã³ãã€ã«ãªãã·ã§ã³ã«äŸåããè¿œå ã®ãµãã£ãã¯ã¹ãä»ããŠããå¯èœæ§ããããŸãã ã¿ãŒã²ããããªãå Žå
sysrootãæå®ãããŠããå Žåããªãã·ã§ã³ã¯äœãåºåããŸããã
-print-sysroot-headers-suffix
ããããŒãæ€çŽ¢ãããšãã«ã¿ãŒã²ããsysrootã«è¿œå ããããµãã£ãã¯ã¹ãåºåãããã
ã³ã³ãã€ã©ããã®ãããªãµãã£ãã¯ã¹ã§æ§æãããŠããªãå Žåã¯ãšã©ãŒ---ãããŠäœãããŸãã
elseã
-ãã³ããã·ã³
ã³ã³ãã€ã©ã®ã¿ãŒã²ãããã·ã³ãå°å·ããŸãïŒããšãã°ã i686-pc-linux-gnuïŒ---ãããŠããªãã§ãã ãã
ä»ã«äœãã
-ãã³ãããŒãžã§ã³
ã³ã³ãã€ã©ã®ããŒãžã§ã³ãåºåããŸãïŒããšãã°ã 3.0ïŒ---ãããŠä»ã«äœãããªãã§ãã ããã
-ãã³ãã¹ããã¯
ã³ã³ãã€ã©ã®çµã¿èŸŒã¿ä»æ§ãå°å·ããŸã---ãããŠä»ã«ã¯äœãããŸããã ïŒããã¯æ¬¡ã®å Žåã«äœ¿çšãããŸã
GCCèªäœãæ§ç¯ãããŠããŸããïŒ
-fno-eliminate-unused-debug-types
éåžžãDWARF 2åºåãçæããå ŽåãGCCã¯æ¬¡ã®ãããã°ã·ã³ãã«åºåã®çæãåé¿ããŸãã
ã³ã³ãã€ã«äžã®ãœãŒã¹ãã¡ã€ã«ã§äœ¿çšãããŠããªãã¿ã€ãã æã ããã¯åœ¹ã«ç«ã¡ãŸã
ã³ã³ãã€ã«ãŠãããã§å®£èšããããã¹ãŠã®ã¿ã€ãã®ãããã°æ å ±ãGCCã«åºåãããã«ã¯ã
ãããããã®ã³ã³ãã€ã«ãŠãããã§å®éã«äœ¿çšãããŠãããã©ããã«é¢ä¿ãªãã
ããšãã°ããããã¬ãŒã§ãå®éã«ã¯ãªãã¿ã€ãã«å€ããã£ã¹ãããå Žå
ããã°ã©ã ã§äœ¿çšãããŸãïŒãã ãã宣èšãããŠããŸãïŒã ãã ããå€ãã®å Žåãããã«ãã
ããªãã®éã®ç¡é§ãªã¹ããŒã¹ã
ãªãã·ã§ã³ ãã 管ç æé©å
ãããã®ãªãã·ã§ã³ã¯ãããŸããŸãªçš®é¡ã®æé©åãå¶åŸ¡ããŸãã
æé©åãªãã·ã§ã³ããªãå Žåãã³ã³ãã€ã©ã®ç®æšã¯ã³ã³ãã€ã«ã®ã³ã¹ããåæžããããšã§ã
ãããã°ã§æåŸ ã©ããã®çµæãåŸãããããã«ããŸãã ã¹ããŒãã¡ã³ãã¯ç¬ç«ããŠããŸãïŒããªãã
ã¹ããŒãã¡ã³ãéã®ãã¬ãŒã¯ãã€ã³ãã§ããã°ã©ã ãåæ¢ãããšãæ°ããå€ãã«å²ãåœãŠãããšãã§ããŸã
å€æ°ãæå®ããããããã°ã©ã ã«ãŠã³ã¿ãŒãé¢æ°å ã®ä»ã®ã¹ããŒãã¡ã³ãã«å€æŽããŠã
ãŸãã«ããªãããœãŒã¹ã³ãŒãããæåŸ ããçµæã
æé©åãã©ã°ããªã³ã«ãããšãã³ã³ãã€ã©ã¯ããã©ãŒãã³ã¹ã®åäžãããã©ãŒãã³ã¹ã®åäžãè©Šã¿ãŸãã
ã³ã³ãã€ã«æéãšãå Žåã«ãã£ãŠã¯ãããã°æ©èœãç ç²ã«ããŠã³ãŒããµã€ãº
ããã°ã©ã ã
ã³ã³ãã€ã©ãŒã¯ãããã°ã©ã ã«é¢ããç¥èã«åºã¥ããŠæé©åãå®è¡ããŸãã
è€æ°ã®ãã¡ã€ã«ãäžåºŠã«åäžã®åºåãã¡ã€ã«ã¢ãŒãã«ã³ã³ãã€ã«ãããšãã³ã³ãã€ã©ã¯æ¬¡ã®ããã«äœ¿çšã§ããŸãã
åãã¡ã€ã«ãã³ã³ãã€ã«ãããšãã«ãã¹ãŠã®ãã¡ã€ã«ããååŸããæ å ±ã
ãã¹ãŠã®æé©åããã©ã°ã«ãã£ãŠçŽæ¥å¶åŸ¡ãããããã§ã¯ãããŸããã ãæã£ãŠããæé©åã®ã¿
ãã©ã°ã¯ãã®ã»ã¯ã·ã§ã³ã«ãªã¹ããããŠããŸãã
ã»ãšãã©ã®æé©åã¯ã次ã®å Žåã«ã®ã¿æå¹ã«ãªããŸãã -O ã¬ãã«ã¯ã³ãã³ãã©ã€ã³ã§èšå®ãããŸãã ãããªããš
åã ã®æé©åãã©ã°ãæå®ãããŠããå Žåã§ãããããã¯ç¡å¹ã«ãªããŸãã
ã¿ãŒã²ãããšGCCã®æ§ææ¹æ³ã«å¿ããŠããããã«ç°ãªãã»ãã
æé©åã¯ããããã§æå¹ã«ããããšãã§ããŸã -O ããã«ãªã¹ããããŠãããã®ãããã¬ãã«ã GCCãåŒã³åºãããšãã§ããŸã
ã -Q --help =optimizers ã§æå¹ã«ãªã£ãŠããæé©åã®æ£ç¢ºãªã»ãããèŠã€ããã«ã¯
åã¬ãã«ã
-O
-O1 æé©åã ã³ã³ãã€ã«ã®æé©åã«ã¯å€å°æéããããã
倧ããªé¢æ°ã
é£çµ¡å -Oãã³ã³ãã€ã©ã¯ãå®è¡ããã«ã³ãŒããµã€ãºãšå®è¡æéãåæžããããšããŸã
ã³ã³ãã€ã«ã«å€å€§ãªæéãèŠããæé©åã
-O 次ã®æé©åãã©ã°ããªã³ã«ããŸãã
-fauto-inc-dec -fæ¯èŒ-elim -fcprop-ã¬ãžã¹ã¿ -fdce -fdefer-pop -fdelayed-ãã©ã³ã
-fdse -fguess-åå²ç¢ºç -fif-å€æ2 -fif-å€æ -fipa-pure-const
-fipa-ãããã¡ã€ã« -fipa-ãªãã¡ã¬ã³ã¹ -fmerge-å®æ° -fsplit-wide-types -ftree-ããã-ccp
-ftree-builtin-call-dce -ftree-ccp -ftree-ch -ftree-copyrename -ftree-dce
-ftree-ããããŒã¿ãŒ-opts -ftree-dse -ftree-forwprop -ftree-fre -ftree-phiprop -ftree-slsr
-ftree-sra -ftree-pta -ftree-ter -äžåºŠã«äžå°
-O ãŸããªã³ã«ãªããŸã -fomit-ãã¬ãŒã ãã€ã³ã¿ãŒ ããããããšãå¹²æžããªããã·ã³ã§
ãããã°ããã
-O2 ããã«æé©åããŸãã GCCã¯ããµããŒããããŠããã»ãŒãã¹ãŠã®æé©åãå®è¡ããŸãããå®è¡ããŸãã
å®å®ãšé床ã®ãã¬ãŒããªãã䌎ããŸãã ãšæ¯èŒã㊠-Oããã®ãªãã·ã§ã³ã¯äž¡æ¹ãå¢ãããŸã
ã³ã³ãã€ã«æéãšçæãããã³ãŒãã®ããã©ãŒãã³ã¹ã
-O2 ã§æå®ããããã¹ãŠã®æé©åãã©ã°ããªã³ã«ããŸã -Oã ãŸãã次ããªã³ã«ããŸã
æé©åãã©ã°ïŒ -fthread-ãžã£ã³ã -falign-é¢æ° -falign-ãžã£ã³ã -falign-ã«ãŒã
-falign-ã©ãã« -fcaller-saves -ã¯ãã¹ãžã£ã³ãã³ã° -fcse-ãã©ããŒãžã£ã³ã -fcse-ã¹ããã-ãããã¯
-fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-ææ©çã«
-é«äŸ¡ãªæé©å -fgcse -fgcse-lm -fhoist-é£æ¥ããŒã
-finline-small-functions -findirect-ã€ã³ã©ã€ã³å -ãã£ãã¹ã©
-fisolate-erroneous-paths-éæ¥åç § -foptimize-å åŒåŒã³åºã -éšåçãªã€ã³ã©ã€ã³å
-fã®ããç©Ž2 -ããªãŒãªãŒããŒããã㯠-freorder-é¢æ° -frerun-cse-ã«ãŒãåŸ
-fsched-ã€ã³ã¿ãŒããã㯠-fsched-spec -fschedule-insn -fschedule-insns2 -fstrict-ãšã€ãªã¢ã·ã³ã°
-fstrict-ãªãŒããŒãã㌠-ftree-ã¹ã€ããå€æ -ftree-tail-merge -ftree-pre -ftree-vrp
äžã®èŠåã«æ³šæããŠãã ãã -fgcse åŒã³åºãã«ã€ã㊠-O2 èšç®ã䜿çšããããã°ã©ã
ãŽãã¹ã
泚ïŒUbuntu 8.10以éã®ããŒãžã§ã³ã§ã¯ã -D_FORTIFY_SOURCE = 2 ããã©ã«ãã§èšå®ãããŠããã
èµ·åãããš -O 2以äžã«èšå®ãããŠããŸãã ããã«ãããè¿œå ã®ã³ã³ãã€ã«æãš
ããã€ãã®libcé¢æ°ã®å®è¡æãã§ãã¯ã ç¡å¹ã«ããã«ã¯ã次ã®ãããããæå®ããŸã
-U_FORTIFY_SOURCE or -D_FORTIFY_SOURCE = 0.
-O3 ããã«æé©åããŸãã -O3 ã§æå®ããããã¹ãŠã®æé©åããªã³ã«ããŸã -O2 ãŸãããªã³ã«ãªããŸã
ã -finline-é¢æ°, -funswitch-ã«ãŒã, -fpredictive-commoning, -fgcse-ã¢ãã¿ãŒãªããŒã,
-ftree-loop-vectorize, -ftree-slp-ãã¯ãã«å, -fvect-cost-ã¢ãã«, -ftree-éšå-pre ãš
-fipa-cp-ã¯ããŒã³ ãªãã·ã§ã³ã
-O0 ã³ã³ãã€ã«æéãççž®ãããããã°ã§æåŸ ã©ããã®çµæãåŸãããããã«ããŸãã ããã¯
ããã©ã«ãã
-ãªã¹ ãµã€ãºãæé©åããŸãã -ãªã¹ ãã¹ãŠãæå¹ã«ããŸã -O2 éåžžã¯å¢å ããªãæé©å
ã³ãŒããµã€ãºã ãŸããã³ãŒããµã€ãºãåæžããããã«èšèšããããããªãæé©åãå®è¡ããŸãã
-ãªã¹ 次ã®æé©åãã©ã°ãç¡å¹ã«ããŸãã -falign-é¢æ° -falign-ãžã£ã³ã
-falign-ã«ãŒã -falign-ã©ãã« -ããªãŒãªãŒããŒããã㯠-freeorder-blocks-and-partition
-fprefetch-ã«ãŒãé å
-ãªãŒãã¡ã¹ã
å³æ ŒãªèŠæ Œãžã®æºæ ã¯ç¡èŠããŠãã ããã -ãªãŒãã¡ã¹ã ãã¹ãŠãæå¹ã«ããŸã -O3 æé©åã ãŸã
ãã¹ãŠã®æšæºæºæ ããã°ã©ã ã«æå¹ã§ã¯ãªãæé©åãæå¹ã«ããŸãã ãã
ãªã³ã«ãªããŸã -ffast-æ°åŠ ããã³Fortranåºæ -fno-protect-parens ãš -fstack-é å.
-ãªã° ãããã°ãšã¯ã¹ããªãšã³ã¹ãæé©åããŸãã -ãªã° å¹²æžããªãæé©åãå¯èœã«ããŸã
ãããã°ã ããã¯ãæšæºç·šéã§éžæããæé©åã¬ãã«ã§ããå¿ èŠããããŸã-
ã³ã³ãã€ã«-ãããã°ãµã€ã¯ã«ãç¶æããªãã劥åœãªã¬ãã«ã®æé©åãæäŸ
é«éã³ã³ãã€ã«ãšåªãããããã°ãšã¯ã¹ããªãšã³ã¹ã
è€æ°äœ¿çšããå Žå -O ãªãã·ã§ã³ãã¬ãã«çªå·ã®æç¡ã«ããããããæåŸã®ãã®ãããªãªãã·ã§ã³ã¯
å¹æçãªãã®ã
ãã©ãŒã ã®ãªãã·ã§ã³ -fãã©ã° ãã·ã³ã«äŸåããªããã©ã°ãæå®ããŸãã ã»ãšãã©ã®ãã©ã°ã«ã¯äž¡æ¹ããããŸã
ããžãã£ããã©ãŒã ãšãã¬ãã£ããã©ãŒã ã ã®è² ã®åœ¢åŒ -ãµãµãŒ is -fno-fooã äžã®è¡šã§ã¯ã
ãã©ãŒã ã®XNUMXã€ã ãããªã¹ããããŠããŸã---ããªããé垞䜿çšãããã®ã ããªãã¯ä»ãç解ããããšãã§ããŸã
åé€ããããšã«ãã£ãŠåœ¢æãã NO- ãŸãã¯ãããè¿œå ããŸãã
次ã®ãªãã·ã§ã³ã¯ãç¹å®ã®æé©åãå¶åŸ¡ããŸãã ãããã¯ã©ã¡ããã«ãã£ãŠã¢ã¯ãã£ãåãããŸã -O
ãªãã·ã§ã³ãŸãã¯ãããã®ã«é¢é£ããŠããŸãã ãŸãã«æ¬¡ã®ãã©ã°ã䜿çšã§ããŸã
å®è¡ããæé©åã®ã埮調æŽããå¿ èŠãªå Žåã
-fno-defer-pop
ãã®é¢æ°ãæ»ããšããã«ãåžžã«åé¢æ°åŒã³åºãã®åŒæ°ããããããŸãã ã«ãšã£ãŠ
é¢æ°åŒã³åºãã®åŸã«åŒæ°ããããããå¿ èŠããããã·ã³ã§ã¯ãã³ã³ãã€ã©ã¯éåžžã
åŒæ°ã¯ãããã€ãã®é¢æ°åŒã³åºãã®ããã«ã¹ã¿ãã¯ã«èç©ãããããããã¹ãŠã次ã®å Žæã«ãããããŸãã
äžåºŠã
ã¬ãã«ã§ç¡å¹ -O, -O2, -O3, -ãªã¹.
-åæ¹äŒæ
RTLã§é æ¹åäŒæ¬ãã¹ãå®è¡ããŸãã ãã¹ã¯XNUMXã€ã®åœä»€ãçµã¿åãããããšããŸã
çµæãç°¡ç¥åã§ãããã©ããã確èªããŸãã ã«ãŒãå±éãã¢ã¯ãã£ããªå ŽåãXNUMXã€ã®ãã¹
ãå®è¡ãããXNUMXçªç®ã¯ã«ãŒãå±éåŸã«ã¹ã±ãžã¥ãŒã«ãããŸãã
ãã®ãªãã·ã§ã³ã¯ãæé©åã¬ãã«ã§ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O, -O2, -O3, -ãªã¹.
-ffp-contract =
-ffp-contract = off æµ®åå°æ°ç¹åŒã®çž®å°ãç¡å¹ã«ããŸãã -ffp-contract = fast
èåä¹ç®å ç®ã®åœ¢æãªã©ã®æµ®åå°æ°ç¹åŒã®çž®å°ãå¯èœã«ããŸã
ã¿ãŒã²ããããã€ãã£ããµããŒããæã£ãŠããå Žåã®æäœã -ffp-contract = on å¯èœ
èšèªæšæºã§èš±å¯ãããŠããå Žåã¯ãæµ®åå°æ°ç¹åŒã®çž®å°ã ããã¯
çŸåšå®è£ ãããŠããããåçã«æ±ãããŠããŸã -ffp-contract = off.
ããã©ã«ã㯠-ffp-contract = fast.
-fomit-ãã¬ãŒã ãã€ã³ã¿ãŒ
ãã¬ãŒã ãã€ã³ã¿ãå¿ èŠãšããªãé¢æ°ã®ã¬ãžã¹ã¿ã«ãã¬ãŒã ãã€ã³ã¿ãä¿æããªãã§ãã ããã ãã
ãã¬ãŒã ãã€ã³ã¿ãä¿åãèšå®ã埩å ããæé ãåé¿ããŸãã ããã¯ãŸã
å€ãã®æ©èœã§å©çšå¯èœãªè¿œå ã®ã¬ãžã¹ã¿ã It ãŸã MAKES ãããã®ã³ã° äžå¯èœ on
äžéš ãã·ã³ã
VAXãªã©ã®äžéšã®ãã·ã³ã§ã¯ãæšæºã§ããããããã®ãã©ã°ã¯å¹æããããŸããã
åŒã³åºãã·ãŒã±ã³ã¹ã¯èªåçã«ãã¬ãŒã ãã€ã³ã¿ãåŠçããäœãä¿åãããŸãã
ååšããªããµããããŸãã ãã·ã³èšè¿°ãã¯ããFRAME_POINTER_REQUIREDã
ã¿ãŒã²ãããã·ã³ããã®ãã©ã°ããµããŒããããã©ãããå¶åŸ¡ããŸãã
GCCããŒãžã§ã³4.6以éãããã©ã«ãèšå®ïŒãµã€ãºãæé©åããŠããªãå ŽåïŒ
32ãããGNU/Linuxx86ããã³32ãããDarwinx86ã¿ãŒã²ãããã«å€æŽãããŸãã
-fomit-ãã¬ãŒã ãã€ã³ã¿ãŒã ããã©ã«ãã«æ»ãããšãã§ããŸã -fno-çç¥ãã¬ãŒã ãã€ã³ã¿ by
ã§GCCãæ§æãã --æå¹ãã¬ãŒã ãã€ã³ã¿ ãªãã·ã§ã³ãæ§æããŸãã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-foptimize-å åŒåŒã³åºã
å åŒåŒã³åºããšæ«å°Ÿååž°åŒã³åºããæé©åããŸãã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fno-ã€ã³ã©ã€ã³
ãalways_inlineãã§ããŒã¯ãããé¢æ°ä»¥å€ã®é¢æ°ãã€ã³ã©ã€ã³å±éããªãã§ãã ãã
å±æ§ã ããã¯ãæé©åããªãå Žåã®ããã©ã«ãã§ãã
åäžã®é¢æ°ããnoinlineãã§ããŒã¯ããããšã«ãããã€ã³ã©ã€ã³åãå é€ã§ããŸãã
å±æ§ã
-finline-small-functions
äœãäºæ³ãããå°ããå Žåã¯ãåŒã³åºãå ã«é¢æ°ãçµ±åããŸã
é¢æ°åŒã³åºãã³ãŒãïŒãããã£ãŠãããã°ã©ã ã®å šäœçãªãµã€ãºã¯å°ãããªããŸãïŒã ã³ã³ãã€ã©
çµ±åãã䟡å€ãããã»ã©åçŽãªé¢æ°ããã¥ãŒãªã¹ãã£ãã¯ã«æ±ºå®ããŸã
ãã¡ãã§ãã ãã®ã€ã³ã©ã€ã³åã¯ãã€ã³ã©ã€ã³ã§å®£èšãããŠããªãé¢æ°ãå«ãããã¹ãŠã®é¢æ°ã«é©çšãããŸãã
ã¬ãã«ã§æå¹ -O2.
-findirect-ã€ã³ã©ã€ã³å
ã€ã³ã©ã€ã³ããã³ã³ãã€ã«æã«æ¢ç¥ã§ããããšãå€æããéæ¥åŒã³åºãã®ãããã§
åã®ã€ã³ã©ã€ã³åã ãã®ãªãã·ã§ã³ã¯ãã€ã³ã©ã€ã³åèªäœããªã³ã«ãªã£ãŠããå Žåã«ã®ã¿å¹æããããŸã
ãéããŠãã¿ã³ãã³ã°ãããã³ãŒããŒãããã®äžããåäžã«ãã£ã«ã¿ãŒãã¹ã±ããã®å ã®ç²ã«æµžéããŠãããŸãã -finline-é¢æ° or -finline-small-functions ãªãã·ã§ã³ã
ã¬ãã«ã§æå¹ -O2.
-finline-é¢æ°
ã€ã³ã©ã€ã³ãšããŠå®£èšãããŠããªãå Žåã§ããã€ã³ã©ã€ã³åããããã®ãã¹ãŠã®é¢æ°ãæ€èšããŠãã ããã The
ã³ã³ãã€ã©ãŒã¯ããã®æ¹æ³ã§çµ±åãã䟡å€ã®ããé¢æ°ããã¥ãŒãªã¹ãã£ãã¯ã«æ±ºå®ããŸãã
ç¹å®ã®é¢æ°ãžã®ãã¹ãŠã®åŒã³åºããçµ±åãããé¢æ°ã宣èšãããŠããå Žå
ãéçãã®å Žåãé¢æ°ã¯éåžžãããèªäœã§ã¢ã»ã³ãã©ã³ãŒããšããŠåºåãããŸããã
ã¬ãã«ã§æå¹ -O3.
-finline-functions-call-once
åŒã³åºãå ã«ã€ã³ã©ã€ã³åããããã«äžåºŠåŒã³åºããããã¹ãŠã®ãéçãé¢æ°ãèæ ®ããŠãã ããã
ãããã¯ãã€ã³ã©ã€ã³ããšããŒã¯ãããŠããŸããã ç¹å®ã®é¢æ°ã®åŒã³åºããçµ±åãããŠããå Žåã
é¢æ°ã¯ãããèªäœã§ã¯ã¢ã»ã³ãã©ã³ãŒããšããŠåºåãããŸããã
ã¬ãã«ã§æå¹ -O1, -O2, -O3 ãš -ãªã¹.
-æãããã€ã³ã©ã€ã³å
ãalways_inlineãã§ããŒã¯ãããã€ã³ã©ã€ã³é¢æ°ãšãæ¬äœã
å®è¡ããåã®æ©ã段éã§é¢æ°åŒã³åºãã®ãªãŒããŒããã -fprofile-generate èšè£ ãš
å®éã®ã€ã³ã©ã€ã³ãã¹ã ããããããšã§ããããã¡ã€ãªã³ã°ãå€§å¹ ã«å®ããªããéåžžã¯
ãã¹ããããã©ãããŒé¢æ°ã®å€§ããªãã§ãŒã³ãæã€ããã°ã©ã ã§ã¯ãããé«éã«ã€ã³ã©ã€ã³åã§ããŸãã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-ãã£ãã¹ã©
éèšã®æç¶ãéã¹ã«ã©ãŒçœ®æãæªäœ¿çšã®ãã©ã¡ãŒã¿ãŒã®åé€ãå®è¡ããŸã
åç §ã«ãã£ãŠæž¡ããããã©ã¡ãŒã¿ãŒãå€ã«ãã£ãŠæž¡ããããã©ã¡ãŒã¿ãŒã«çœ®ãæããã
ã¬ãã«ã§æå¹ -O2, -O3 ãš -ãªã¹.
-finline-limit =n
ããã©ã«ãã§ã¯ãGCCã¯ã€ã³ã©ã€ã³åã§ããé¢æ°ã®ãµã€ãºãå¶éããŸãã ãã®ãã©ã°ã«ããââã
ãã®å¶éã®å€§ãŸããªå¶åŸ¡ã n ã€ã³ã©ã€ã³åã§ããé¢æ°ã®ãµã€ãºã§ã
ç䌌åœä»€ã®æ°ã
ã€ã³ã©ã€ã³åã¯ãå®éã«ã¯ãæå®ã§ããããã€ãã®ãã©ã¡ãŒã¿ãŒã«ãã£ãŠå¶åŸ¡ãããŸãã
ã䜿çšããŠåå¥ã« --ãã©ã¡ãŒã¿ å=å€ãéžæããŸãã -finline-limit =n ãªãã·ã§ã³ã¯ããã€ããèšå®ããŸã
ãããã®ãã©ã¡ãŒã¿ã¯æ¬¡ã®ãšããã§ãã
max-inline-insn-single
ã«èšå®ãããŠããŸã n/ 2ã
max-inline-insns-auto
ã«èšå®ãããŠããŸã n/ 2ã
ã€ã³ã©ã€ã³åãšã€ã³ã©ã€ã³åãå¶åŸ¡ããåã ã®ãã©ã¡ãŒã¿ãŒã®ããã¥ã¡ã³ãã«ã€ããŠã¯ã以äžãåç §ããŠãã ããã
ãããã®ãã©ã¡ãŒã¿ã®ããã©ã«ãã«ã€ããŠã
ã泚æ: 䟡å€ããªããããããŸãã -finline å¶é ãã®çµæãããã©ã«ãã®åäœã«ãªããŸãã
ã泚æ: ç䌌åœä»€ã¯ããã®ç¹å®ã®ã³ã³ããã¹ãã§ã¯ãæœè±¡ãè¡šããŸã
é¢æ°ã®ãµã€ãºã®æž¬å®ã 決ããŠã¢ã»ã³ããªã®æ°ãè¡šããã®ã§ã¯ãããŸãã
æ瀺ãªã©ããã®æ£ç¢ºãªæå³ã¯XNUMXã€ã®ãªãªãŒã¹ãã
å¥ã
-fno-keep-inline-dllexport
ããã¯ããããã现ããããŒãžã§ã³ã§ãã -fkeep-ã€ã³ã©ã€ã³é¢æ°ãããã¯ã«ã®ã¿é©çšãããŸã
ãdllexportãå±æ§ãŸãã¯declspecã䜿çšããŠå®£èšãããé¢æ°
-fkeep-ã€ã³ã©ã€ã³é¢æ°
Cã§ã¯ããã€ã³ã©ã€ã³ããšå®£èšããããéçãé¢æ°ããªããžã§ã¯ããã¡ã€ã«ã«åºåããŸãã
é¢æ°ã¯ãã¹ãŠã®åŒã³åºãå ã«ã€ã³ã©ã€ã³åãããŠããŸãã ãã®ã¹ã€ããã¯åœ±é¿ããŸãã
GNUC90ã®ãexterninlineãæ¡åŒµã䜿çšããé¢æ°ã C ++ã§ã¯ããã¹ãŠãæŸåºããŸã
ãªããžã§ã¯ããã¡ã€ã«ãžã®ã€ã³ã©ã€ã³é¢æ°ã
-fkeep-static-consts
æé©åããªã³ã«ãªã£ãŠããªãå Žåã§ãããstaticconstããšå®£èšãããå€æ°ãåºåããŸãã
å€æ°ã¯åç §ãããŸããã
GCCã¯ããã®ãªãã·ã§ã³ãããã©ã«ãã§æå¹ã«ããŸãã ã³ã³ãã€ã©ã«æ¬¡ã®ããšã確èªãããå Žå
æé©åããªã³ã«ãªã£ãŠãããã©ããã«é¢ä¿ãªããå€æ°ãåç §ãããŸãã
ã -fno-keep-static-consts ãªãã·ã§ã³ãéžæããŸãã
-fmerge-å®æ°
åäžã®å®æ°ïŒæååå®æ°ãšæµ®åå°æ°ç¹å®æ°ïŒã®ããŒãžãè©Šã¿ãŸã
ã³ã³ãã€ã«ãŠãããéã
ãã®ãªãã·ã§ã³ã¯ãã¢ã»ã³ãã©ãŒãšãªã³ã«ãŒãæé©åãããã³ã³ãã€ã«ã®ããã©ã«ãã§ãã
ããããµããŒãããŸãã 䜿çšãã -fno-merge-å®æ° ãã®åäœãçŠæ¢ããŸãã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fmerge-all-constants
åäžã®å®æ°ãšåäžã®å€æ°ãããŒãžããŠã¿ãŠãã ããã
ãã®ãªãã·ã§ã³ã¯ã -fmerge-å®æ°ã ã«å ã㊠-fmerge-å®æ° ãã®
ããšãã°ãå®æ°ã§åæåãããé åãŸãã¯åæåãããå®æ°å€æ°ã§ããèæ ®ããŸã
æŽæ°åãŸãã¯æµ®åå°æ°ç¹åã CãC++ã®ãããªèšèªã«ã¯ãåå€æ°ãå¿ èŠã§ãã
ååž°åŒã³åºãã«åãå€æ°ã®è€æ°ã®ã€ã³ã¹ã¿ã³ã¹ãå«ããŠãåºå¥ãã
ãã®ããããã®ãªãã·ã§ã³ã䜿çšãããšãåäœãäžé©åã«ãªããŸãã
-fmodulo-sched
æåã®ã¹ã±ãžã¥ãŒãªã³ã°ãã¹ã®çŽåã«ã¹ã€ã³ã°ã¢ãžã¥ãã¹ã±ãžã¥ãŒãªã³ã°ãå®è¡ããŸãã ãã
passã¯æãå åŽã®ã«ãŒãã調ã¹ãç°ãªããã®ããªãŒããŒã©ãããããããšã«ãã£ãŠãããã®åœä»€ã䞊ã¹æ¿ããŸã
å埩ã
-fmodulo-sched-allow-regmoves
ã¬ãžã¹ã¿ã®ç§»åãèš±å¯ããŠãããç©æ¥µçãªSMSããŒã¹ã®ã¢ãžã¥ãã¹ã±ãžã¥ãŒãªã³ã°ãå®è¡ããŸãã ã«
ãã®ãã©ã°ãèšå®ãããšãç¹å®ã®äŸåé¢ä¿ã®ãªããšããžãåé€ããã
ã©ã€ãã¬ã³ãžåæã«åºã¥ãreg-movesã®çæã ãã®ãªãã·ã§ã³ã¯å¹æçã§ã
ãšã®ã¿ -fmodulo-sched æå¹ã«ãªããŸããã
-fno-åå²æ°-reg
ã«ãŠã³ãã¬ãžã¹ã¿ã§ããã¯ãªã¡ã³ããšåå²ãåœä»€ã䜿çšããã代ããã«
ã¬ãžã¹ã¿ããã¯ãªã¡ã³ãããäžé£ã®åœä»€ãçæãããããšæ¯èŒããŸã
ãŒãã®å Žåãçµæã«åºã¥ããŠåå²ããŸãã ãã®ãªãã·ã§ã³ã¯ã
x86ãPowerPCãIA-64ãããã³
S / 390ã
ããã©ã«ã㯠-fbranch-count-reg.
-fno-function-cse
é¢æ°ã¢ãã¬ã¹ãã¬ãžã¹ã¿ã«å ¥ããªãã§ãã ããã ãåŒã³åºãååœä»€ãäœæããŸã
å®æ°é¢æ°ã«ã¯ãé¢æ°ã®ã¢ãã¬ã¹ãæ瀺çã«å«ãŸããŠããŸãã
ãã®ãªãã·ã§ã³ã䜿çšãããšãã³ãŒãã®å¹çãäœäžããŸããã
ã¢ã»ã³ãã©ã®åºåã¯ããã®ãªãã·ã§ã³ã次ã®å Žåã«å®è¡ãããæé©åã«ãã£ãŠæ··ä¹±ããå¯èœæ§ããããŸãã
䜿çšãããŠããªãã
ããã©ã«ã㯠-ffunction-cse
-fno-zero-in-bss ã§åæå
ã¿ãŒã²ãããBSSã»ã¯ã·ã§ã³ããµããŒãããŠããå ŽåãGCCã¯ããã©ã«ãã§æ¬¡ã®å€æ°ãé 眮ããŸãã
BSSã«ãŒãã«åæåãããŸãã ããã«ãããçµæã®ã³ãŒãã®ã¹ããŒã¹ãç¯çŽã§ããŸãã
äžéšã®ããã°ã©ã ã¯å€æ°ã«æ瀺çã«äŸåããŠããããããã®ãªãã·ã§ã³ã¯ãã®åäœããªãã«ããŸã
ããŒã¿ã»ã¯ã·ã§ã³ã«ç§»å---ããšãã°ãçµæã®å®è¡å¯èœãã¡ã€ã«ã
ãã®ã»ã¯ã·ã§ã³ã®å§ãŸãããã³/ãŸãã¯ããã«åºã¥ããŠä»®å®ãç«ãŠãŸãã
ããã©ã«ã㯠-fzero-bss ã§åæå.
-fthread-ãžã£ã³ã
ãžã£ã³ããå¥ã®å Žæã«åå²ãããã©ããã確èªããæé©åãå®è¡ããŸã
æåã®ãã®ã«å«ãŸããæ¯èŒãèŠã€ãããŸãã ãã®å Žåãæåã®ãã©ã³ãã¯ã«ãªãã€ã¬ã¯ããããŸã
XNUMXçªç®ã®ãã©ã³ãã®å®å ããŸãã¯ãã®çŽåŸã®ãã€ã³ãã®ããããã
æ¡ä»¶ãçã§ãããåœã§ãããã«ãã£ãŠç°ãªããŸãã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fsplit-wide-types
32ãããã®ãlonglongããªã©ãè€æ°ã®ã¬ãžã¹ã¿ãå æããã¿ã€ãã䜿çšããå Žå
ã·ã¹ãã ã§ã¯ãã¬ãžã¹ã¿ãåå²ããŠåå¥ã«å²ãåœãŠãŸãã ããã¯éåžž
ãããã®ã¿ã€ãã«å¯ŸããŠããé©åãªã³ãŒããçæããŸããããããã°ãããå°é£ã«ãªãå¯èœæ§ããããŸãã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fcse-ãã©ããŒãžã£ã³ã
å ±ééšååŒé€å»ïŒCSEïŒã§ã¯ã次ã®å Žåã«ãžã£ã³ãåœä»€ãã¹ãã£ã³ããŸãã
ãžã£ã³ãã®ã¿ãŒã²ããã¯ãä»ã®ãã¹ã§ã¯å°éããŸããã ããšãã°ãCSEãééãããšã
ãelseãå¥ãå«ããifãã¹ããŒãã¡ã³ãã®å ŽåãCSEã¯æ¡ä»¶ãçºçãããšãã«ãžã£ã³ãã®åŸã«ç¶ããŸã
ãã¹ãæžã¿ã¯falseã§ãã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fcse-ã¹ããã-ãããã¯
ãã㯠-fcse-ãã©ããŒãžã£ã³ãããã ããCSEã¯ãžã£ã³ãã远跡ããŸãã
æ¡ä»¶ä»ãã§ãããã¯ãã¹ãããããŸãã CSEãåçŽãªãifãã¹ããŒãã¡ã³ãã«ééãããšã
elseç¯ã -fcse-ã¹ããã-ããã㯠CSEãæ¬äœã®åšãã®ãžã£ã³ãã远跡ããããã«ããŸã
"ããã"ã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-frerun-cse-ã«ãŒãåŸ
ã«ãŒãæé©åãå®è¡ãããåŸãå ±ééšååŒé€å»ãåå®è¡ããŸãã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fgcse
ã°ããŒãã«å ±ééšååŒé€å»ãã¹ãå®è¡ããŸãã ãã®ãã¹ãå®è¡ããŸã
ã°ããŒãã«å®æ°ãšã³ããŒäŒæã
ã泚æ: GCCæ¡åŒµæ©èœã§ããèšç®ãããgotoã䜿çšããŠããã°ã©ã ãã³ã³ãã€ã«ãããšã次ã®ããã«ãªããŸãã
ã°ããŒãã«å ±ééšååŒé€å»ãç¡å¹ã«ãããšãå®è¡æã®ããã©ãŒãã³ã¹ãåäžããŸã
è¿œå ããŠæž¡ã -fno-gcse ã³ãã³ãã©ã€ã³ã«ã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fgcse-lm
æ¥æ -fgcse-lm ãæå¹ã«ãªã£ãŠããå Žåãã°ããŒãã«å ±ééšååŒé€å»ã¯ç§»åãè©Šã¿ãŸã
åºèã«ãã£ãŠã®ã¿æ®ºãããè² è·ã ããã«ããã
ã«ãŒãå€ã®ããŒãã«å€æŽãããããŒã/ã¹ãã¢ã·ãŒã±ã³ã¹ãããã³ã«ãŒãå ã®ã³ããŒ/ã¹ãã¢
ã«ãŒã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããå Žå -fgcse æå¹ã«ãªã£ãŠããŸãã
-fgcse-sm
æ¥æ -fgcse-sm ãæå¹ã«ãªã£ãŠããå Žåãã¹ãã¢ã¢ãŒã·ã§ã³ãã¹ã¯ã°ããŒãã«ã³ã¢ã³ã®åŸã«å®è¡ãããŸã
éšååŒé€å»ã ãã®ãã¹ã¯ãã¹ãã¢ãã«ãŒãã®å€ã«ç§»åããããšããŸãã 䜿çšæ
ãšäžç·ã« -fgcse-lmãããŒã/ã¹ãã¢ã·ãŒã±ã³ã¹ãå«ãã«ãŒããå€æŽã§ããŸã
ã«ãŒãã®åã«ããŒãããã«ãŒãã®åŸã«ã¹ãã¢ããŸãã
ã©ã®æé©åã¬ãã«ã§ãæå¹ã«ãªã£ãŠããŸããã
-fgcse-ã©ã¹
æ¥æ -fgcse-ã©ã¹ ãæå¹ã«ãªã£ãŠããå Žåãã°ããŒãã«å ±ééšååŒé€å»ãã¹
åãã¡ã¢ãªäœçœ®ïŒäž¡æ¹ïŒã«æ ŒçŽãããåŸã«çºçããåé·ãªè² è·ãæé€ããŸã
éšåçããã³å®å šãªåé·æ§ïŒã
ã©ã®æé©åã¬ãã«ã§ãæå¹ã«ãªã£ãŠããŸããã
-fgcse-ã¢ãã¿ãŒãªããŒã
æ¥æ -fgcse-ã¢ãã¿ãŒãªããŒã ãæå¹ã«ãªã£ãŠããå Žåãåé·è² è·é€å»ãã¹ãå®è¡ãããŸã
ãªããŒãåŸã ãã®ãã¹ã®ç®çã¯ãåé·ãªæµåºãã¯ãªãŒã³ã¢ããããããšã§ãã
-faggressive-loop-optimizations
ãã®ãªãã·ã§ã³ã¯ãèšèªå¶çŽã䜿çšããŠæ¬¡ã®å¢çãå°åºããããã«ã«ãŒããªããã£ãã€ã¶ã«æ瀺ããŸãã
ã«ãŒãã®å埩åæ°ã ããã¯ãã«ãŒãã³ãŒããåŒã³åºããªãããšãåæãšããŠããŸã
ããšãã°ã笊å·ä»ãæŽæ°ã®ãªãŒããŒãããŒãŸãã¯ç¯å²å€ãåŒãèµ·ããããšã«ããæªå®çŸ©ã®åäœ
é åã¢ã¯ã»ã¹ã ã«ãŒãã®å埩åæ°ã®ç¯å²ã¯ãã¬ã€ãã«äœ¿çšãããŸã
ã«ãŒãã®å±éãšããŒãªã³ã°ãããã³ã«ãŒãçµäºãã¹ãã®æé©åã ãã®ãªãã·ã§ã³ã¯æå¹ã§ã
ããã©ã«ãã§ã¯
-funsafe ã«ãŒãã®æé©å
ãã®ãªãã·ã§ã³ã¯ãã«ãŒããªããã£ãã€ã¶ã«ãã«ãŒãã€ã³ããã¯ã¹ããªãŒããŒãããŒããªããšæ³å®ããããã«æ瀺ããŸãã
éèŠãªçµäºæ¡ä»¶ãæã€ã«ãŒãã¯ç¡éã§ã¯ãããŸããã ããã«ãããããåºã
ã«ãŒããªããã£ãã€ã¶èªäœããããã蚌æã§ããªãå Žåã§ããã«ãŒãæé©åã®ç¯å²
ä»®å®ã¯æå¹ã§ãã 䜿çšããå Žå -Wunsafe ã«ãŒãã®æé©åãã³ã³ãã€ã©ã¯èŠåããŸã
ãã®çš®ã®ã«ãŒããèŠã€ãã£ãå Žåã
-ã¯ãã¹ãžã£ã³ãã³ã°
ã¯ãã¹ãžã£ã³ãå€æãå®è¡ããŸãã ãã®å€æã«ãããåçã®ã³ãŒããš
ã³ãŒããµã€ãºãç¯çŽããŸãã çµæã®ã³ãŒãã¯ãã¯ãã¹ãªãã®å Žåãããããã©ãŒãã³ã¹ãåäžããå Žåãšããã§ãªãå ŽåããããŸãã
ãžã£ã³ãã³ã°ã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fauto-inc-dec
ã¢ãã¬ã¹ã®å¢åãŸãã¯æžåãã¡ã¢ãªã¢ã¯ã»ã¹ãšçµã¿åãããŸãã ãã®ãã¹ã¯
ããããµããŒãããããã®æ瀺ããªãã¢ãŒããã¯ãã£ã§ã¯åžžã«ã¹ããããããŸãã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ããããµããŒãããã¢ãŒããã¯ãã£ã§ã¯ãã以äžã§ãã
-fdce
RTLã§ãããã³ãŒãé€å»ïŒDCEïŒãå®è¡ããŸãã ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-fdse
RTLã§ãããã¹ãã¢é€å»ïŒDSEïŒãå®è¡ããŸãã ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-fif-å€æ
æ¡ä»¶ä»ããžã£ã³ãããã©ã³ãã®ãªãåçã®ãã®ã«å€æããããšããŸãã ããã
æ¡ä»¶ä»ã移åãæå°ãæ倧ããã©ã°ãšabsåœä»€ã®èšå®ãããã³ããã€ãã®ããªãã¯ã®äœ¿çš
æšæºã®ç®è¡æŒç®ã§å®è¡ã§ããŸãã ãããäžã§ã®æ¡ä»¶ä»ãå®è¡ã®äœ¿çš
å©çšå¯èœã¯ãif-conversion2ãã«ãã£ãŠå¶åŸ¡ãããŸãã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fif-å€æ2
æ¡ä»¶ä»ãå®è¡ïŒå©çšå¯èœãªå ŽåïŒã䜿çšããŠãæ¡ä»¶ä»ããžã£ã³ããã«å€æããŸã
ãã©ã³ãã¬ã¹ã®åçç©ã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fdeclone-ctor-dtor
C ++ ABIã«ã¯ãã³ã³ã¹ãã©ã¯ã¿ãšãã¹ãã©ã¯ã¿çšã«è€æ°ã®ãšã³ããªãã€ã³ããå¿ èŠã§ãã
åºæ¬ãµããªããžã§ã¯ããXNUMXã€ã¯å®å šãªãªããžã§ã¯ãçšãããXNUMXã€ã¯åŒã³åºããè¡ãä»®æ³ãã¹ãã©ã¯ã¿çšã§ãã
æŒç®åã¯åŸã§åé€ããŸãã ä»®æ³ããŒã¹ãæã€éå±€ã®å ŽåãããŒã¹ãšå®å š
ããªã¢ã³ãã¯ã¯ããŒã³ã§ããããã¯ãé¢æ°ã®XNUMXã€ã®ã³ããŒãæå³ããŸãã ãã®ãªãã·ã§ã³ã䜿çšãããšã
åºæ¬ããã³å®å šãªããªã¢ã³ãã¯ãå ±éã®å®è£ ãåŒã³åºããµã³ã¯ã«å€æŽãããŸãã
ã«ãã£ãŠå¯èœã«ãªããŸã -ãªã¹.
-fdelete-null-pointer-checks
ããã°ã©ã ãnullãã€ã³ã¿ãŒãå®å šã«éåç §ã§ãããã³ãŒããããŒã¿ããªããšä»®å®ããŸãã
èŠçŽ ã¯ããã«ãããŸãã ããã«ãããåçŽãªå®æ°ç³ã¿èŸŒã¿ã®æé©åãå¯èœã«ãªããŸãã
æé©åã¬ãã«ã ããã«ãGCCã®ä»ã®æé©åãã¹ã¯ããã®ãã©ã°ã䜿çšããŠ
nullãã€ã³ã¿ã®ç¡é§ãªãã§ãã¯ãæé€ããã°ããŒãã«ããŒã¿ãããŒåæãå¶åŸ¡ããŸãã
ãããã¯ããã€ã³ã¿ããã§ã«éåç §ãããåŸã«ãã§ãã¯ãããå Žåã
nullã«ããããšã¯ã§ããŸããã
ãã ããäžéšã®ç°å¢ã§ã¯ããã®ä»®å®ã¯æ£ãããªãããšã«æ³šæããŠãã ããã 䜿çšãã
-fno-delete-null-pointer-checks äŸåããããã°ã©ã ã«å¯ŸããŠãã®æé©åãç¡å¹ã«ãã
ãã®æ¯ãèãã«ã€ããŠã
äžéšã®ã¿ãŒã²ãããç¹ã«åã蟌ã¿ã¿ãŒã²ããã§ã¯ããã¹ãŠã®ã¬ãã«ã§ãã®ãªãã·ã§ã³ãç¡å¹ã«ãªã£ãŠããŸãã ãããªããš
ãã¹ãŠã®ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸãã -O0, -O1, -O2, -O3, -ãªã¹ã æ å ±ã䜿çšãããã¹
ããŸããŸãªæé©åã¬ãã«ã§åå¥ã«æå¹ã«ãªããŸãã
-fdevirtualize
åŒã³åºããä»®æ³é¢æ°ããçŽæ¥åŒã³åºãã«å€æããŠã¿ãŠãã ããã ããã¯äž¡æ¹ã§è¡ãããŸã
ããã·ãŒãžã£å ããã³éæ¥ã€ã³ã©ã€ã³åã®äžéšãšããŠã®ããã·ãŒãžã£é
ïŒ"-findirect-inlining"ïŒããã³æç¶ãéå®æ°äŒæïŒ-fipa-cpïŒã æå¹
ã¬ãã«ã§ -O2, -O3, -ãªã¹.
-fdevirtualize-ææ©çã«
ä»®æ³é¢æ°ãžã®åŒã³åºããææ©çãªçŽæ¥åŒã³åºãã«å€æããŠã¿ãŠãã ããã ã«åºã¥ã
ã¿ã€ãç¶æ¿ã°ã©ãã®åæãç¹å®ã®åŒã³åºãã«ã€ããŠã®ã»ããã決å®ããŸã
å¯èœæ§ã®é«ãã¿ãŒã²ããã ã»ãããå°ããå Žåãã§ããã°ãµã€ãº1ã®å Žåã¯ãåŒã³åºãã次ã®ããã«å€æŽããŸãã
çŽæ¥ããã³éæ¥åŒã³åºãã®æ¡ä»¶ä»ã決å®ã ææ©çãªåŒã³åºãã¯ããå€ããå¯èœã«ããŸã
ã€ã³ã©ã€ã³åãªã©ã®æé©åã ããã«æé©åããåŸããããã圹ã«ç«ããªããšæãããå Žåã
ãããã¯å ã®åœ¢åŒã«å€æãããŸãã
-é«äŸ¡ãªæé©å
æ¯èŒçè²»çšã®ãããããã€ãã®ãã€ããŒãªæé©åãå®è¡ããŸãã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
ããªãŒ
åé·ãªæ¡åŒµåœä»€ãåé€ããŠã¿ãŠãã ããã ããã¯ç¹ã«åœ¹ç«ã¡ãŸã
x86-64ã¢ãŒããã¯ãã£ã¯ã64ãããã¬ãžã¹ã¿ã§æé»çã«ãŒãæ¡åŒµããŸãã
äžååã®32ãããã«æžã蟌ã¿ãŸãã
AlphaãAArch64ãx86ã®ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fno-ã©ã€ãã¿ã€ã -dse
C ++ã§ã¯ããªããžã§ã¯ãã®å€ã¯ããã®åç¶æéå ã®å€æŽã«ãã£ãŠã®ã¿åœ±é¿ãåããŸãã
ã³ã³ã¹ãã©ã¯ã¿ãŒãéå§ããããªããžã§ã¯ãã®å€ãäžç¢ºå®ã«ãªãã
ãªããžã§ã¯ããç Žå£ããããšããªããžã§ã¯ãã®åç¶æéã¯ç¡å¹ã«ãªããŸãã éåžžã¯æ»ãã åº
é€å»ã¯ãããå©çšããŸãã ã³ãŒããã®å€ã«äŸåããŠããå Žå
ãªããžã§ã¯ãã®åç¶æéãè¶ ããŠåç¶ãããªããžã§ã¯ãã¹ãã¬ãŒãžã®å Žåããã®ãã©ã°ã䜿çšããŠæ¬¡ã®ããšãã§ããŸãã
ãã®æé©åãç¡å¹ã«ããŸãã
-çåç¯å²ã®çž®å°
ã¬ãžã¹ã¿ã®ã©ã€ãç¯å²ãçž®å°ããŠãã¬ãžã¹ã¿ã®å§åãäžããŠã¿ãŠãã ããã ããã¯
å°ãããŸãã¯äžçšåºŠã®ãµã€ãºã®ã¬ãžã¹ã¿ã»ãããæã€é«éããã»ããµã«åœ¹ç«ã¡ãŸãã
-fira-algorithm =ã¢ã«ãŽãªãºã
çµ±åã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã«æå®ãããã«ã©ãŒãªã³ã°ã¢ã«ãŽãªãºã ã䜿çšããŸãã The
ã¢ã«ãŽãªãºã åŒæ°ã¯ åªå é äœãChowã®åªå è²ä»ããæå®ããããŸã㯠CB,
Chaitin-Briggsã®ã«ã©ãŒãªã³ã°ãæå®ããŸãã Chaitin-Briggsã®ã«ã©ãŒãªã³ã°ã¯å®è£ ãããŠããŸãã
ãã¹ãŠã®ã¢ãŒããã¯ãã£ã§ããã ãããããµããŒãããã¿ãŒã²ããã§ã¯ããããããã©ã«ãã§ã
ããè¯ãã³ãŒããçæããããã§ãã
-fira-region =å°å
çµ±åã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã«æå®ãããé åã䜿çšããŸãã The å°å åŒæ°
次ã®ããããã«ãªããŸãã
ã ãã¹ãŠã®ã«ãŒããã¬ãžã¹ã¿å²ãåœãŠé åãšããŠäœ¿çšããŸãã ããã«ããã次ã®å Žåã«æè¯ã®çµæãåŸãããŸãã
å°ããªããã³/ãŸãã¯äžèŠåãªã¬ãžã¹ã¿ã»ãããåãããã·ã³ã
æ··å
é åãšããŠã¬ãžã¹ã¿å§åãå°ããã«ãŒããé€ããã¹ãŠã®ã«ãŒãã䜿çšããŸãã ãã
å€ã¯éåžžãã»ãšãã©ã®å Žåãã»ãšãã©ã®ã¢ãŒããã¯ãã£ã§æè¯ã®çµæããããããŸãã
é床ã®æé©åã䜿çšããŠã³ã³ãã€ã«ããå Žåãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãïŒ-O, -O2ã...ïŒã
XNUMX〠ãã¹ãŠã®æ©èœãåäžã®é åãšããŠäœ¿çšããŸãã ããã«ãããéåžžãã³ãŒããæå°ã«ãªããŸã
ãµã€ãºã§ãããããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -ãªã¹ or -O0.
-ãã£ã©ãã€ã¹ãå§å
IRAã䜿çšããŠãå·»ãäžãã決å®ããããã®ã³ãŒãå·»ãäžããã¹ã®ã¬ãžã¹ã¿å§åãè©äŸ¡ããŸã
åŒã ãã®ãªãã·ã§ã³ã䜿çšãããšãéåžžãã³ãŒããå°ãããªããŸãããé床ãäœäžããå¯èœæ§ããããŸãã
ã³ã³ãã€ã©ãããŠã³ããŠããŸãã
ãã®ãªãã·ã§ã³ã¯ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸã -ãªã¹ ãã¹ãŠã®ã¿ãŒã²ããã«å¯ŸããŠã
-ãã£ã©ã«ãŒãå§å
IRAã䜿çšããŠãã«ãŒãäžå€æ¡ä»¶ã移åãã決å®ã®ããã«ã«ãŒãå ã®ã¬ãžã¹ã¿å§åãè©äŸ¡ããŸãã
ãã®ãªãã·ã§ã³ã䜿çšãããšãéåžžã次ã®ãã·ã³ã§ããé«éã§å°ããªã³ãŒããçæãããŸãã
倧ããªã¬ãžã¹ã¿ãã¡ã€ã«ïŒ> = 32ã¬ãžã¹ã¿ïŒã§ãããã³ã³ãã€ã©ã®é床ãäœäžããå¯èœæ§ããããŸãã
ãã®ãªãã·ã§ã³ã¯ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸã -O3 äžéšã®ã¿ãŒã²ããã®å Žåã
-fno-ira-share-save-slots
é話ã§äœ¿çšãããããŒãã¬ãžã¹ã¿ãä¿åããããã«äœ¿çšãããã¹ã¿ãã¯ã¹ãããã®å ±æãç¡å¹ã«ããŸãã
åŒã³åºãã åããŒãã¬ãžã¹ã¿ã¯åå¥ã®ã¹ã¿ãã¯ã¹ããããååŸãããã®çµæãé¢æ°ã¹ã¿ãã¯ãååŸããŸã
ãã¬ãŒã ã倧ãããªããŸãã
-fno-ira-share-spill-slots
ç䌌ã¬ãžã¹ã¿ã«å²ãåœãŠãããã¹ã¿ãã¯ã¹ãããã®å ±æãç¡å¹ã«ããŸãã åç䌌ã¬ãžã¹ã¿
ããŒãã¬ãžã¹ã¿ãååŸããªãå Žåã¯ãå¥ã®ã¹ã¿ãã¯ã¹ããããååŸãããã®çµæãé¢æ°
ã¹ã¿ãã¯ãã¬ãŒã ã倧ãããªããŸãã
-fira-verbose =n
çµ±åã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã®ãã³ããã¡ã€ã«ã®è©³çŽ°åºŠãå¶åŸ¡ããŸãã ã¶
ããã©ã«ãå€ã¯5ã§ããå€ã n 10以äžã®å Žåããã³ãåºåãéä¿¡ãããŸã
ãšåã圢åŒã䜿çšããŠstderrã« n ãã€ãã¹10ã
-fdelayed-ãã©ã³ã
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããå Žåã¯ãæªçšããåœä»€ã䞊ã¹æ¿ããŠã¿ãŠãã ãã
é 延åå²åœä»€ã®åŸã«äœ¿çšå¯èœãªåœä»€ã¹ãããã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fschedule-insn
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããå Žåã¯ãåœä»€ã䞊ã¹æ¿ããŠåé€ããŠã¿ãŠãã ãã
å¿ èŠãªããŒã¿ãå©çšã§ããªããããå®è¡ãåæ¢ããŸãã ããã¯ã
ä»ã®åœä»€ã«æ¬¡ã®ããšãèš±å¯ããããšã«ãããæµ®åå°æ°ç¹ãŸãã¯ã¡ã¢ãªããŒãåœä»€ãé ããªããŸã
ããŒããŸãã¯æµ®åå°æ°ç¹åœä»€ã®çµæãå¿ èŠã«ãªããŸã§çºè¡ãããŸãã
ã¬ãã«ã§æå¹ -O2, -O3.
-fschedule-insns2
ãã㊠-fschedule-insnããã ããåœä»€ã¹ã±ãžã¥ãŒãªã³ã°ã®è¿œå ãã¹ãèŠæ±ããŸã
ã¬ãžã¹ã¿å²ãåœãŠãè¡ãããåŸã ããã¯ã
ã¬ãžã¹ã¿ã®æ°ãæ¯èŒçå°ãªããã¡ã¢ãªããŒãåœä»€ã
XNUMXãµã€ã¯ã«ã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fno-sched-interblock
åºæ¬ãããã¯å šäœã§åœä»€ãã¹ã±ãžã¥ãŒã«ããªãã§ãã ããã ããã¯éåžžãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ã¬ãžã¹ã¿å²ãåœãŠã®åã«ã¹ã±ãžã¥ãŒãªã³ã°ããå Žåãã€ãŸã -fschedule-insn ãŸãã¯ã§ -O2 or
é«ãã§ãã
-fno-sched-spec
éããŒãåœä»€ã®ææ©çãªåããèš±å¯ããªãã§ãã ããã ããã¯éåžžãã«ãã£ãŠæå¹ã«ãªããŸã
ã¬ãžã¹ã¿å²ãåœãŠã®åã«ã¹ã±ãžã¥ãŒãªã³ã°ãããšãã®ããã©ã«ããã€ãŸã -fschedule-insn ãŸãã¯ã§
-O2 以äžã§ãã
-fsched-å§å
ã¬ãžã¹ã¿å²ãåœãŠã®åã«ãã¬ãžã¹ã¿å§åã«ææãªinsnã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ããŸãã ãã
ã¬ãžã¹ã¿å²ãåœãŠãæå¹ã«ãªãåã«ã¹ã±ãžã¥ãŒãªã³ã°ããå Žåã«ã®ã¿æå³ããããŸãã
-fschedule-insn ãŸãã¯ã§ -O2 以äžã ãã®ãªãã·ã§ã³ã䜿çšãããšãçæããããã®ãæ¹åã§ããŸã
ã¬ãžã¹ã¿å§åãæ°å€ãè¶ ããŠå¢å ããã®ãé²ãããšã«ãããã³ãŒããäœæããŠãµã€ãºãå°ããããŸã
å©çšå¯èœãªããŒãã¬ãžã¹ã¿ãšããã«ç¶ãã¬ãžã¹ã¿å²ãåœãŠã®æµåºã®æ°ã
-fsched-spec-load
äžéšã®ããŒãåœä»€ã®ææ©çãªåããèš±å¯ããŸãã ããã¯ã次ã®å Žåã«ã®ã¿æå³ããããŸã
ã¬ãžã¹ã¿å²ãåœãŠåã®ã¹ã±ãžã¥ãŒãªã³ã°ãã€ãŸã -fschedule-insn ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-spec-load-dangerous
ããå€ãã®ããŒãåœä»€ã®ææ©çãªåããèš±å¯ããŸãã ããã¯ã次ã®å Žåã«ã®ã¿æå³ããããŸã
ã¬ãžã¹ã¿å²ãåœãŠåã®ã¹ã±ãžã¥ãŒãªã³ã°ãã€ãŸã -fschedule-insn ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-stalled-insn
-fsched-stalled-insns =n
åæ¢ãããã¥ãŒããææå°æ©ã«ç§»åã§ããinsnïŒååšããå ŽåïŒã®æ°ãå®çŸ©ããŸã
XNUMXçªç®ã®ã¹ã±ãžã¥ãŒãªã³ã°ãã¹äžã«æºåå®äºãªã¹ãã«æ¿å ¥ããŸãã -fno-sched-stalled-insn
ææå°æ©ã«ç§»åãããinsnããªãããšãæå³ããŸãã -fsched-stalled-insns = 0 ãªãããšãæå³ããŸã
ãã¥ãŒã«å ¥ããããinsnãææå°æ©ã«ç§»åã§ããæ°ã®å¶éã -fsched-stalled-insn
å€ãªãã¯ãšåçã§ã -fsched-stalled-insns = 1.
-fsched-stalled-insns-dep
-fsched-stalled-insns-dep =n
åæ¢ããinsnãžã®äŸåé¢ä¿ã«ã€ããŠæ€æ»ãããinsnã°ã«ãŒãïŒãµã€ã¯ã«ïŒã®æ°ãå®çŸ©ããŸã
ããã¯ãåæ¢ããinsnã®ãã¥ãŒããã®ææå°æ©ãªåé€ã®åè£ã§ãã ããã¯æã£ãŠããŸã
XNUMXçªç®ã®ã¹ã±ãžã¥ãŒãªã³ã°ãã¹äžã«ã®ã¿å¹æãããã次ã®å Žåã«ã®ã¿å¹æããããŸãã -fsched-stalled-insn is
äžå€ã -fno-sched-stalled-insns-dep ã«çžåœããŸã -fsched-stalled-insns-dep = 0.
-fsched-stalled-insns-dep å€ãªãã¯ãšåçã§ã
-fsched-stalled-insns-dep = 1.
-fsched2-use-ã¹ãŒããŒãããã¯
ã¬ãžã¹ã¿å²ãåœãŠåŸã«ã¹ã±ãžã¥ãŒãªã³ã°ããå Žåã¯ãã¹ãŒããŒãããã¯ã¹ã±ãžã¥ãŒãªã³ã°ã䜿çšããŠãã ããã ããã«ããã
åºæ¬ãããã¯ã®å¢çãè¶ããåãã«ãããã¹ã±ãžã¥ãŒã«ãéããªããŸãã ãã®ãªãã·ã§ã³ã¯
GCCã§äœ¿çšããããã¹ãŠã®ãã·ã³èšè¿°ãCPUãååã«å³å¯ã«ã¢ãã«åããŠããããã§ã¯ãªããããå®éšçã§ã
ã¢ã«ãŽãªãºã ããã®ä¿¡é Œã§ããªãçµæãåé¿ããããã
ããã¯ãã¬ãžã¹ã¿å²ãåœãŠåŸã«ã¹ã±ãžã¥ãŒãªã³ã°ããå Žåã«ã®ã¿æå³ããããŸãã
-fschedule-insns2 ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-group-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ã§ã°ã«ãŒããã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ã¯åœä»€ãæ¯æããŸã
ã¹ã±ãžã¥ãŒã«ã°ã«ãŒãã«å±ããŸãã ã¹ã±ãžã¥ãŒãªã³ã°ã次ã®å Žåãããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
æå¹ãã€ãŸã -fschedule-insn or -fschedule-insns2 ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-ã¯ãªãã£ã«ã«ãã¹-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ã§ã¯ãªãã£ã«ã«ãã¹ãã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ãªå¥œæ
ã¯ãªãã£ã«ã«ãã¹ã«é¢ããæ瀺ã ã¹ã±ãžã¥ãŒãªã³ã°ã次ã®å Žåãããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
æå¹ãã€ãŸã -fschedule-insn or -fschedule-insns2 ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-spec-insn-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ã§ææ©çåœä»€ãã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ãªå¥œæ
äŸåé¢ä¿ã®åŒ±ç¹ã倧ããææ©çåœä»€ã ããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ãªã£ãŠããå Žåãã€ãŸã -fschedule-insn or -fschedule-insns2 ãŸãã¯ã§ -O2
以äžã§ãã
-fsched-rank-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ã§ã©ã³ã¯ãã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ã¯åœä»€ãæ¯æããŸã
ãã倧ããªãµã€ãºãŸãã¯é »åºŠã®åºæ¬ãããã¯ã«å±ããŸãã ããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ãªã£ãŠããå Žåãã€ãŸã -fschedule-insn or -fschedule-insns2 ãŸãã¯ã§ -O2
以äžã§ãã
-fsched-last-insn-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ãŒã§æåŸã®åœä»€ã®ãã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ã¯
ã¹ã±ãžã¥ãŒã«ãããæåŸã®åœä»€ã«ããŸãäŸåããªãåœä»€ã ããã¯æå¹ã§ã
ããã©ã«ãã§ã¯ãã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ãªã£ãŠããå Žåãã€ãŸã -fschedule-insn or -fschedule-insns2
ãŸãã¯ã§ -O2 以äžã§ãã
-fsched-dep-count-ãã¥ãŒãªã¹ãã£ãã¯
ã¹ã±ãžã¥ãŒã©ãŒã§åŸå±ã«ãŠã³ããã¥ãŒãªã¹ãã£ãã¯ãæå¹ã«ããŸãã ãã®ãã¥ãŒãªã¹ãã£ãã¯ã¯
ããã«å¿ããŠããå€ãã®åœä»€ãããåœä»€ã ããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ãªã£ãŠããå Žåãã€ãŸã -fschedule-insn or -fschedule-insns2 ãŸãã¯ã§ -O2
以äžã§ãã
-freschedule-modulo-scheduled-loops
ã¢ãžã¥ãã¹ã±ãžã¥ãŒãªã³ã°ã¯ãåŸæ¥ã®ã¹ã±ãžã¥ãŒãªã³ã°ã®åã«å®è¡ãããŸãã ã«ãŒããã¢ãžã¥ãã®å Žå
ã¹ã±ãžã¥ãŒã«ãããåŸã®ã¹ã±ãžã¥ãŒã«ãã¹ã¯ãã¹ã±ãžã¥ãŒã«ãå€æŽããå ŽåããããŸãã ãã®ãªãã·ã§ã³ã䜿çšããŠ
ãã®åäœãå¶åŸ¡ããŸãã
-éžæçã¹ã±ãžã¥ãŒãªã³ã°
éžæçã¹ã±ãžã¥ãŒãªã³ã°ã¢ã«ãŽãªãºã ã䜿çšããŠåœä»€ãã¹ã±ãžã¥ãŒã«ããŸãã éžæçã¹ã±ãžã¥ãŒãªã³ã°ã®å®è¡
æåã®ã¹ã±ãžã¥ãŒã©ãã¹ã®ä»£ããã«ã
-féžæçã¹ã±ãžã¥ãŒãªã³ã°2
éžæçã¹ã±ãžã¥ãŒãªã³ã°ã¢ã«ãŽãªãºã ã䜿çšããŠåœä»€ãã¹ã±ãžã¥ãŒã«ããŸãã éžæçã¹ã±ãžã¥ãŒãªã³ã°ã®å®è¡
XNUMXçªç®ã®ã¹ã±ãžã¥ãŒã©ãã¹ã®ä»£ããã«ã
-fsel-sched-ãã€ãã©ã€ã³
éžæçã¹ã±ãžã¥ãŒãªã³ã°äžã«æãå åŽã®ã«ãŒãã®ãœãããŠã§ã¢ãã€ãã©ã€ã³ãæå¹ã«ããŸãã ãã
ãªãã·ã§ã³ã®ããããããªãéããå¹æã¯ãããŸãã -éžæçã¹ã±ãžã¥ãŒãªã³ã° or -féžæçã¹ã±ãžã¥ãŒãªã³ã°2
ãªã³ã«ãªã£ãŠããŸãã
-fsel-sched-pipelining-outer-loops
éžæçã¹ã±ãžã¥ãŒãªã³ã°äžã«ã«ãŒãããã€ãã©ã€ã³åããå Žåã¯ãå€éšã«ãŒãããã€ãã©ã€ã³åããŸãã ãã
ãªãã·ã§ã³ã¯ã -fsel-sched-ãã€ãã©ã€ã³ ãªã³ã«ãªã£ãŠããŸãã
-fshrink-wrap
é¢æ°ããããŒã°ãå¿ èŠãšããé¢æ°ã®éšåã®åã§ã®ã¿ãé¢æ°ããããŒã°ãçºè¡ããŸãã
é¢æ°ã®äžéšã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãããŠããé«ãã
-fcaller-saves
é¢æ°åŒã³åºãã«ãã£ãŠç Žå£ãããã¬ãžã¹ã¿ãžã®å€ã®å²ãåœãŠãæå¹ã«ããŸãã
ãã®ãããªåŒã³åºãã®åšãã®ã¬ãžã¹ã¿ãä¿åããã³åŸ©å ããããã®è¿œå ã®åœä»€ãçºè¡ããŸãã ãã®ãããª
å²ãåœãŠã¯ãããè¯ãã³ãŒããåŸããããšæãããå Žåã«ã®ã¿è¡ãããŸãã
ãã®ãªãã·ã§ã³ã¯ãç¹å®ã®ãã·ã³ãéåžžã¯
代ããã«äœ¿çšããåŒã³åºãä¿åã¬ãžã¹ã¿ã¯ãããŸããã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fcombine-stack-adjustments
ã¹ã¿ãã¯èª¿æŽïŒããã·ã¥ãšãããïŒã远跡ããã¡ã¢ãªåç §ãã¹ã¿ãã¯ããŠããè©Šè¡ããŸã
ããããçµã¿åãããæ¹æ³ãèŠã€ããããã«ã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O1 ãããŠããé«ãã
-fconserve-ã¹ã¿ãã¯
ã¹ã¿ãã¯ã®äœ¿çšãæå°éã«æããŠãã ããã ã³ã³ãã€ã©ã¯ãããã«å°ãªãã¹ã¿ãã¯ã¹ããŒã¹ã䜿çšããããšããŸã
ãããããã°ã©ã ãé ãããå Žåã ãã®ãªãã·ã§ã³ã¯ã ã©ãŒãžã¹ã¿ãã¯ãã¬ãŒã
ãã©ã¡ãŒã¿ã100ã«èšå®ãã ã©ãŒãžã¹ã¿ãã¯ãã¬ãŒã ã®æé· ãã©ã¡ãŒã¿ã400ã«èšå®ããŸãã
-ftree-reassoc
æšã®åé¢é£ä»ããå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãããŠããé«ãã
-ftree-pre
ããªãŒã§éšååé·æ§é€å»ïŒPREïŒãå®è¡ããŸãã ãã®ãã©ã°ã¯ã«ãã£ãŠæå¹ã«ãªããŸã
ããã©ã«ã㧠-O2 ãš -O3.
-ftree-éšå-pre
éšååé·æ§é€å»ïŒPREïŒãããç©æ¥µçã«ããŸãã ãã®ãã©ã°ã¯ã«ãã£ãŠæå¹ã«ãªããŸã
ããã©ã«ã㧠-O3.
-ftree-forwprop
æšã®é æ¹åäŒæãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãš
é«ãã§ãã
-ftree-fre
ããªãŒã§å®å šåé·æ§é€å»ïŒFREïŒãå®è¡ããŸãã FREãšã®éã
PREã¯ãFREã¯ãã«ã€ãªãããã¹ãŠã®ãã¹ã§èšç®ãããåŒã®ã¿ãèæ ®ãããšããããšã§ãã
åé·ãªèšç®ã ãã®åæã¯PREãããé«éã§ãããå ¬éãããã®ã¯å°ãªããªããŸã
åé·æ§ã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãããŠããé«ãã
-ftree-phiprop
ããªãŒã®æ¡ä»¶ä»ããã€ã³ã¿ããè² è·ã®å·»ãäžããå®è¡ããŸãã ãã®ãã¹ã¯ã«ãã£ãŠæå¹ã«ãªããŸã
ããã©ã«ã㧠-O ãããŠããé«ãã
-fhoist-é£æ¥ããŒã
è² è·ãããã®ãã®ã§ããå Žåãif-then-elseã®äž¡æ¹ã®ãã©ã³ãããææ©çã«è² è·ãæã¡äžããŸã
åãæ§é å ã®é£æ¥ããå Žæãšã¿ãŒã²ããã¢ãŒããã¯ãã£ã«æ¡ä»¶ä»ã
移ååœä»€ã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O2 ãããŠããé«ãã
-ftree-ã³ããŒ-ãããã
ããªãŒã§ã³ããŒäŒæãå®è¡ããŸãã ãã®ãã¹ã«ãããäžèŠãªã³ããŒæäœãæé€ãããŸãã
ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãããŠããé«ãã
-fipa-pure-const
ã©ã®é¢æ°ãçŽç²ã§ãããå®æ°ã§ããããçºèŠããŸãã ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-fipa-ãªãã¡ã¬ã³ã¹
ã©ã®éçå€æ°ãã³ã³ãã€ã«åäœããšã¹ã±ãŒãããªãããçºèŠããŸãã ã«ãã£ãŠå¯èœã«ãªããŸã
ããã©ã«ã㧠-O ãããŠããé«ãã
-fipa-pta
æç¶ãéãã€ã³ã¿åæãšæç¶ãéä¿®æ£ãå®è¡ãã
åç §åæã ãã®ãªãã·ã§ã³ã䜿çšãããšãã¡ã¢ãªãšã³ã³ãã€ã«æã®äœ¿çšéãéå°ã«ãªãå¯èœæ§ããããŸãã
倧ããªã³ã³ãã€ã«ãŠãããã ã©ã®æé©åã¬ãã«ã§ããããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠããŸããã
-fipa-ãããã¡ã€ã«
æç¶ãéãããã¡ã€ã«ã®äŒæãå®è¡ããŸãã å¯ãããã®ã¿åŒã³åºãããé¢æ°
é¢æ°ã¯ã³ãŒã«ããšããŠããŒã¯ãããŸãã ãŸããXNUMXåå®è¡ãããé¢æ°ïŒãã³ãŒã«ãããªã©ïŒ
ãnoreturnããéçã³ã³ã¹ãã©ã¯ã¿ãŸãã¯ãã¹ãã©ã¯ã¿ïŒãèå¥ãããŸãã ã³ãŒã«ãæ©èœãš
äžåºŠå®è¡ãããé¢æ°ã®ã«ãŒãã®å°ãªãéšåã¯ããµã€ãºãæé©åãããŸãã ã«ãã£ãŠå¯èœã«ãªããŸã
ããã©ã«ã㧠-O ãããŠããé«ãã
-fipa-cp
æç¶ãéå®æ°äŒæãå®è¡ããŸãã ãã®æé©åã¯ããã°ã©ã ãåæããŸã
é¢æ°ã«æž¡ãããå€ãå®æ°ã§ãããã©ãããå€æããæé©åãã
ã«ãããšã ãã®æé©åã«ãããããã©ãŒãã³ã¹ãå€§å¹ ã«åäžããå¯èœæ§ããããŸãã
ã¢ããªã±ãŒã·ã§ã³ã«ã¯ãé¢æ°ã«æž¡ãããå®æ°ããããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-O2, -ãªã¹ ãš -O3.
-fipa-cp-ã¯ããŒã³
é¢æ°ã®è€è£œãå®è¡ããŠãæç¶ãéã®å®æ°ã®äŒæã匷åããŸãã ãã€
æå¹ãªæç¶ãéå®æ°äŒæã¯ã次ã®å Žåã«é¢æ°ã®ã¯ããŒã³äœæãå®è¡ããŸã
å€éšããèŠããé¢æ°ã¯ãå®æ°åŒæ°ã䜿çšããŠåŒã³åºãããšãã§ããŸãã ããã¯
æé©åã«ãããé¢æ°ã®è€æ°ã®ã³ããŒãäœæãããå¯èœæ§ããããå€§å¹ ã«å¢å ããå¯èœæ§ããããŸã
ã³ãŒããµã€ãºïŒãåç §ïŒ --ãã©ã¡ãŒã¿ ipcp-unit-growth =å€ïŒã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-O3.
-fisolate-erroneous-paths-éæ¥åç §
éæ¥åç §ãåå ã§èª€ã£ãåäœãŸãã¯æªå®çŸ©ã®åäœãããªã¬ãŒãããã¹ãæ€åºããŸãã
NULLãã€ã³ã¿ã ãããã®ãã¹ãã¡ã€ã³ã®å¶åŸ¡ãããŒããåé¢ããã¹ããŒãã¡ã³ããå€æŽããŸã
誀ã£ãããŸãã¯æªå®çŸ©ã®åäœããã©ããã«å ¥ããŸãã
-fisolate-erroneous-paths-å±æ§
NULLå€ãåå ã§èª€ã£ãåäœãŸãã¯æªå®çŸ©ã®åäœãããªã¬ãŒãããã¹ãæ€åºããŸã
ãreturns_nonnullããŸãã¯ãnonnullãå±æ§ã«ãã£ãŠçŠæ¢ãããŠããæ¹æ³ã§äœ¿çšãããŸãã
ãããã®ãã¹ãã¡ã€ã³ã®å¶åŸ¡ãããŒããåé¢ãã誀ã£ãã¹ããŒãã¡ã³ãã䜿çšããŠãã ãã
ãŸãã¯ãã©ãããžã®æªå®çŸ©ã®åäœã ããã¯çŸåšæå¹ã§ã¯ãããŸããããæå¹ã«ãªã£ãŠããå¯èœæ§ããããŸã
å°æ¥çã«ã¯ã-O2ãã«ãã£ãŠã
-ftree-ã·ã³ã¯
æšã®åæ¹ã¹ãã¢ã¢ãŒã·ã§ã³ãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãš
é«ãã§ãã
-ftree-ããã-ccp
ããªãŒã§ã¹ããŒã¹æ¡ä»¶ä»ããããå®æ°ã®äŒæãå®è¡ãããã€ã³ã¿ãŒãäŒæããŸã
ã¢ã©ã€ã³ã¡ã³ãæ å ±ã ãã®ãã¹ã¯ããŒã«ã«ã¹ã«ã©ãŒå€æ°ã§ã®ã¿æ©èœãã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O 以äžã ããã¯ãããå¿ èŠãšããŸã -ftree-ccp æå¹ã«ãªã£ãŠããŸãã
-ftree-ccp
ããªãŒã«å¯ŸããŠã¹ããŒã¹æ¡ä»¶åå²äŒæïŒCCPïŒãå®è¡ããŸãã ãã®ãã¹ã®ã¿
ããŒã«ã«ã¹ã«ã©ãŒå€æ°ã§åäœããããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãããŠããé«ãã
-ftree-ã¹ã€ããå€æ
ã¹ã€ããã®åçŽãªåæåããåæåãžã®å€æãå®è¡ããŸã
ã¹ã«ã©ãŒé åã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O2 ãããŠããé«ãã
-ftree-tail-merge
åäžã®ã³ãŒãã·ãŒã±ã³ã¹ãæ¢ããŸãã èŠã€ãã£ãããäžæ¹ãããäžæ¹ãžã®ãžã£ã³ãã«çœ®ãæããŸãã
ãã®æé©åã¯ãããŒã«ããŒãžãŸãã¯ã¯ãã¹ãžã£ã³ããšããŠç¥ãããŠããŸãã ãã®ãã©ã°ã¯ã«ãã£ãŠæå¹ã«ãªããŸã
ããã©ã«ã㧠-O2 以äžã ãã®ãã¹ã®ã³ã³ãã€ã«æéã¯ã次ã䜿çšããŠå¶éã§ããŸãã
æ倧æ«å°ŸããŒãžæ¯èŒ ãã©ã¡ãŒã¿ãš æ倧æ«å°ŸããŒãžååŸ©æ° ãã©ã¡ãŒã¿ã«äžèŽããæåã®ããã€ã¹ã®ãªã¢ãŒãã³ã³ãããŒã« URL ãè¿ããŸãã
-ftree-dce
ããªãŒã§ãããã³ãŒãé€å»ïŒDCEïŒãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O
ãããŠããé«ãã
-ftree-builtin-call-dce
çµã¿èŸŒã¿é¢æ°ã®åŒã³åºãã«å¯ŸããŠæ¡ä»¶ä»ããããã³ãŒãé€å»ïŒDCEïŒãå®è¡ããŸãã
ãerrnoããèšå®ã§ããŸããããã以å€ã®å Žåã¯å¯äœçšã¯ãããŸããã ãã®ãã©ã°ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
at -O2 以äžã®å Žå -ãªã¹ ãæå®ãããŠããŸããã
-ftree-ããããŒã¿ãŒ-opts
ããŸããŸãªåçŽãªã¹ã«ã©ãŒã¯ãªãŒã³ã¢ããïŒå®æ°/ã³ããŒã®äŒæãåé·æ§ïŒãå®è¡ããŸã
ããããŒã¿ãŒã«åºã¥ãé€å»ãç¯å²äŒæãããã³åŒã®ç°¡ç¥åïŒ
ããªãŒãã©ããŒãµã«ã ããã¯ããžã£ã³ãã¹ã¬ãããå®è¡ããŸãïŒãžã£ã³ãããžã£ã³ãã«æžããããïŒã ãã
ãã©ã°ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-ftree-dse
æš¹æšã«ãããã¹ãã¢é€å»ïŒDSEïŒãå®è¡ããŸãã ãããã¹ãã¢ã¯ã¡ã¢ãªãžã®ã¹ãã¢ã§ã
åŸã§è² è·ããããã«å¥ã®ã¹ãã¢ã«ãã£ãŠäžæžããããå Žæã ã®
ãã®å Žåã以åã®ã¹ãã¢ãåé€ã§ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãš
é«ãã§ãã
-ftree-ch
ããªãŒã§ã«ãŒãããããŒã®ã³ããŒãå®è¡ããŸãã ããã¯å¢å ããã®ã§æçã§ã
ã³ãŒãã¢ãŒã·ã§ã³æé©åã®æå¹æ§ã ãŸããXNUMXåã®ãžã£ã³ããç¯çŽã§ããŸãã ãã®ãã©ã°ã¯
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O 以äžã æå¹ã«ãªã£ãŠããªã -ãªã¹ãéåžžãªã®ã§
ã³ãŒããµã€ãºã倧ãããªããŸãã
-ftree-ã«ãŒãæé©å
ããªãŒã§ã«ãŒãæé©åãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãš
é«ãã§ãã
-ftree-ã«ãŒã-ãªãã¢
ããªãŒã§ã«ãŒã亀æå€æãå®è¡ããŸãã ãšåã -floop-亀æã 䜿çšãã
ãã®ã³ãŒãå€æã§ã¯ãGCCã次ã®ããã«æ§æããå¿ èŠããããŸã --with-ppl ãš --è©°ãŸããã ããž
Graphiteã«ãŒãå€æã€ã³ãã©ã¹ãã©ã¯ãã£ãæå¹ã«ããŸãã
-floop-亀æ
ã«ãŒãã§ã«ãŒã亀æå€æãå®è¡ããŸãã XNUMXã€ã®ãã¹ããããã«ãŒãã®äº€æ
å åŽãšå€åŽã®ã«ãŒããåãæ¿ããŸãã ããšãã°ã次ã®ãããªã«ãŒãããããšããŸãã
DO J = 1ãM
DO I = 1ãN
AïŒJãIïŒ= AïŒJãIïŒ* C
é è€
é è€
ã«ãŒã亀æã¯ãã«ãŒããèšè¿°ãããŠãããã®ããã«å€æããŸãã
DO I = 1ãN
DO J = 1ãM
AïŒJãIïŒ= AïŒJãIïŒ* C
é è€
é è€
ããã¯ããNãããã£ãã·ã¥ããã倧ããå Žåã«åœ¹ç«ã¡ãŸããããã¯ãFortranã§ã¯
é åã®èŠçŽ ã¯ãåããšã«é£ç¶ããŠã¡ã¢ãªã«æ ŒçŽãããå ã®èŠçŽ ã¯
ã«ãŒãã¯è¡ãå埩åŠçããã¢ã¯ã»ã¹ããšã«ãã£ãã·ã¥ãã¹ãåŒãèµ·ããå¯èœæ§ããããŸãã ãã
æé©åã¯ãGCCã§ãµããŒããããŠãããã¹ãŠã®èšèªã«é©çšããã以äžã«éå®ãããŸããã
Fortranã ãã®ã³ãŒãå€æã䜿çšããã«ã¯ãGCCã次ã®ããã«æ§æããå¿ èŠããããŸãã --with-ppl
ãš --è©°ãŸããã ã°ã©ãã¡ã€ãã«ãŒãå€æã€ã³ãã©ã¹ãã©ã¯ãã£ãæå¹ã«ããŸãã
-floop-strip-mine
ã«ãŒãã§ã«ãŒãã¹ããªãããã€ãã³ã°å€æãå®è¡ããŸãã ã¹ããªãããã€ãã³ã°ã¯ã«ãŒããã«åå²ããŸã
XNUMXã€ã®ãã¹ããããã«ãŒãã å€åŽã®ã«ãŒãã¯ãã¹ããªãããµã€ãºãšå åŽã®ã«ãŒãã«çããã¹ãã©ã€ããæã£ãŠããŸã
ã«ãŒãã«ã¯ãã¹ããªããå ã®å ã®ã«ãŒãã®ã¹ãã©ã€ãããããŸãã ã¹ããªããã®é·ãã¯å€æŽã§ããŸã
ã«ãŒã ããã㯠ã¿ã€ã« ãµã€ãº ãã©ã¡ãŒã¿ã ããšãã°ã次ã®ãããªã«ãŒãããããšããŸãã
DO I = 1ãN
AïŒIïŒ= AïŒIïŒ+ C
é è€
ã«ãŒãã¹ããªãããã€ãã³ã°ã¯ãã«ãŒããèšè¿°ãããŠãããã®ããã«ã«ãŒããå€æããŸãã
DO II = 1ãNã51
DO I = IIãæå°ïŒII + 50ãNïŒ
AïŒIïŒ= AïŒIïŒ+ C
é è€
é è€
ãã®æé©åã¯ãGCCã§ãµããŒããããŠãããã¹ãŠã®èšèªã«é©çšããã以äžã«éå®ãããŸããã
Fortranã ãã®ã³ãŒãå€æã䜿çšããã«ã¯ãGCCã次ã®ããã«æ§æããå¿ èŠããããŸãã --with-ppl
ãš --è©°ãŸããã ã°ã©ãã¡ã€ãã«ãŒãå€æã€ã³ãã©ã¹ãã©ã¯ãã£ãæå¹ã«ããŸãã
-floop-ãããã¯
ã«ãŒãã§ã«ãŒãããããã³ã°å€æãå®è¡ããŸãã é²å€©æãã®é²å€©æãã¯ã
èŠçŽ ã«ãŒãã®ã¡ã¢ãªã¢ã¯ã»ã¹ããã£ãã·ã¥å ã«åãŸãããã«ã«ãŒããã¹ãããŸãã The
ã¹ããªããã®é·ãã¯ã ã«ãŒã ããã㯠ã¿ã€ã« ãµã€ãº ãã©ã¡ãŒã¿ã äŸãã°ã
次ã®ãããªã«ãŒããäžããããŸãïŒ
DO I = 1ãN
DO J = 1ãM
AïŒJãIïŒ= BïŒIïŒ+ CïŒJïŒ
é è€
é è€
ã«ãŒãããããã³ã°ã¯ãã«ãŒããèšè¿°ãããŠãããã®ããã«ã«ãŒããå€æããŸãã
DO II = 1ãNã51
DO JJ = 1ãMã51
DO I = IIãæå°ïŒII + 50ãNïŒ
DO J = JJãæå°ïŒJJ + 50ãMïŒ
AïŒJãIïŒ= BïŒIïŒ+ CïŒJïŒ
é è€
é è€
é è€
é è€
ããã¯ããMãããã£ãã·ã¥ããã倧ããå Žåã«åœ¹ç«ã¡ãŸããããã¯ãæãå åŽã®ã«ãŒããããããã§ãã
ãã£ãã·ã¥ã«ä¿æã§ããå°éã®ããŒã¿ãç¹°ãè¿ãåŠçããŸãã ãã
æé©åã¯ãGCCã§ãµããŒããããŠãããã¹ãŠã®èšèªã«é©çšããã以äžã«éå®ãããŸããã
Fortranã ãã®ã³ãŒãå€æã䜿çšããã«ã¯ãGCCã次ã®ããã«æ§æããå¿ èŠããããŸãã --with-ppl
ãš --è©°ãŸããã ã°ã©ãã¡ã€ãã«ãŒãå€æã€ã³ãã©ã¹ãã©ã¯ãã£ãæå¹ã«ããŸãã
-fgraphite-ã¢ã€ãã³ãã£ãã£
ã°ã©ãã¡ã€ãã®æçå€æãæå¹ã«ããŸãã ãã¹ãŠã®SCoPã«å¯ŸããŠã
å€é¢äœè¡šçŸãšãããgimpleã«å€æãçŽããŸãã 䜿çšãã -fgraphite-ã¢ã€ãã³ãã£ãã£
GIMPLE->GRAPHITE->GIMPLEå€æã®ã³ã¹ããŸãã¯ã¡ãªããã確èªã§ããŸãã
ã€ã³ããã¯ã¹ã®ããã«ãããã€ãã®æå°éã®æé©åãã³ãŒããžã§ãã¬ãŒã¿ãŒCLooGã«ãã£ãŠå®è¡ãããŸã
ã«ãŒãã§ã®åå²ãšãããã³ãŒãã®é€å»ã
-floop-nest-æé©å
ISLããŒã¹ã®ã«ãŒããã¹ããªããã£ãã€ã¶ãæå¹ã«ããŸãã ããã¯äžè¬çãªã«ãŒããã¹ããªããã£ãã€ã¶ããŒã¹ã§ã
å¥çææé©åã¢ã«ãŽãªãºã ã«ã€ããŠã æé©åãããã«ãŒãæ§é ãèšç®ããŸã
ããŒã¿ã®å±ææ§ãšäžŠåæ§ã ãã®ãªãã·ã§ã³ã¯å®éšçãªãã®ã§ãã
-floop-Parallelize-all
ã°ã©ãã¡ã€ãã®ããŒã¿äŸåæ§åæã䜿çšããŠã䞊ååã§ããã«ãŒããç¹å®ããŸãã
åæå¯èœãªãã¹ãŠã®ã«ãŒãã䞊ååããŠãã«ãŒãã«å«ãŸããäŸåé¢ä¿ãå«ãŸãªãããã«ããŸã
ã«ãŒãã䞊ååããããšãæçã§ããããšã確èªããã«ã
-fcheck-ããŒã¿-deps
ããã€ãã®ããŒã¿äŸåæ§ã¢ãã©ã€ã¶ãŒã®çµæãæ¯èŒããŸãã ãã®ãªãã·ã§ã³ã¯ã
ããŒã¿äŸåã¢ãã©ã€ã¶ãŒã®ãããã°ã
-ftree-ã«ãŒã-if-convert
æãå åŽã®ã«ãŒãã®æ¡ä»¶ä»ããžã£ã³ãããã©ã³ãã¬ã¹ã«å€æããããšããŸã
åçã®ãã®ã ç®çã¯ãæãå åŽã®ã«ãŒãããå¶åŸ¡ãããŒãé çªã«åé€ããããšã§ãã
ãããã®ã«ãŒããåŠçãããã¯ãã«åãã¹ã®æ©èœãåäžãããããã ããã¯
ãã¯ãã«åãæå¹ã«ãªã£ãŠããå Žåãããã©ã«ãã§æå¹ã«ãªããŸãã
-ftree-loop-if-convert-stores
ãŸããã¡ã¢ãªæžã蟌ã¿ãå«ãæ¡ä»¶ä»ããžã£ã³ããif-convertããŠã¿ãŠãã ããã ãã
å€æã¯æ¡ä»¶ä»ãã§å€æãããããããã«ãã¹ã¬ããããã°ã©ã ã«ãšã£ãŠå®å šã§ã¯ãªãå¯èœæ§ããããŸã
ã¡ã¢ãªã¯ç¡æ¡ä»¶ã®ã¡ã¢ãªæžã蟌ã¿ã«æžã蟌ã¿ãŸãã äŸãã°ã
forïŒi = 0; i <N; i ++ïŒ
ifïŒcondïŒ
A [i] = expr;
ã«å€æãããŸã
forïŒi = 0; i <N; i ++ïŒ
A [i] = condïŒ exprïŒA [i];
ããŒã¿ç«¶åãåŒãèµ·ããå¯èœæ§ããããŸãã
-ftree ã«ãŒãé åž
ã«ãŒãåæ£ãå®è¡ããŸãã ãã®ãã©ã°ã¯ã倧ããªã«ãŒãæ¬äœã®ãã£ãã·ã¥ããã©ãŒãã³ã¹ãåäžãããããšãã§ããŸã
䞊ååããã¯ãã«åãªã©ã®ã«ãŒãæé©åãããã«è¡ãããšãã§ããŸã
å Žæã ããšãã°ãã«ãŒã
DO I = 1ãN
AïŒIïŒ= BïŒIïŒ+ C
DïŒIïŒ= EïŒIïŒ* F
é è€
ã«å€æãããŸã
DO I = 1ãN
AïŒIïŒ= BïŒIïŒ+ C
é è€
DO I = 1ãN
DïŒIïŒ= EïŒIïŒ* F
é è€
-ftree-loop-distribute-patterns
ã®åŒã³åºãã§ã³ãŒãçæã§ãããã¿ãŒã³ã®ã«ãŒãåæ£ãå®è¡ããŸã
å³æžé€šã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O3.
ãã®ãã¹ã¯åæåã«ãŒããåæ£ããmemsetzeroãžã®åŒã³åºããçæããŸãã
ããšãã°ãã«ãŒã
DO I = 1ãN
AïŒIïŒ= 0
BïŒIïŒ= AïŒIïŒ+ I
é è€
ã«å€æãããŸã
DO I = 1ãN
AïŒIïŒ= 0
é è€
DO I = 1ãN
BïŒIïŒ= AïŒIïŒ+ I
é è€
ãããŠãåæåã«ãŒãã¯memsetzeroãžã®åŒã³åºãã«å€æãããŸãã
-ftree-loop-im
æšã®ã«ãŒãäžå€ã¢ãŒã·ã§ã³ãå®è¡ããŸãã ãã®ãã¹ã¯ãããŒããªäžå€æ¡ä»¶ã®ã¿ã移åããŸã
RTLã¬ãã«ã§åŠçããïŒé¢æ°åŒã³åºããéèŠãªã·ãŒã±ã³ã¹ã«æ¡åŒµãããæäœ
insnsã®ïŒã ãš -funswitch-ã«ãŒã ãŸãã次ã®æ¡ä»¶ã®ãªãã©ã³ãã移åããŸãã
ã«ãŒãã®å€ã§äžå€ã§ããããã
ã«ãŒãã®åãæ¿ã解é€ã ãã¹ã«ã¯ã¹ãã¢ã¢ãŒã·ã§ã³ãå«ãŸããŸãã
-ftree-loop-ivcanon
ã«ãŒãå ã®å埩åæ°ã®æ£èŠã«ãŠã³ã¿ãŒãäœæããŸãã
å埩åæ°ã«ã¯è€éãªåæãå¿ èŠã§ãã ãã®åŸã®æé©åã¯
ç°¡åã«æ°ã決å®ããŸãã ç¹ã«å±éã«é¢é£ããŠäŸ¿å©ã§ãã
-fivopts
åž°çŽå€æ°ã®æé©åãå®è¡ããŸãïŒåŒ·åºŠäœæžãåž°çŽå€æ°
æšã®ããŒãžãšèªå°å€æ°ã®é€å»ïŒã
-ftree-parallelize-loops = n
ã«ãŒãã䞊ååããŸããã€ãŸããå埩空éãåå²ããŠnåã®ã¹ã¬ããã§å®è¡ããŸãã ããã¯
å埩ãç¬ç«ããŠããŠä»»æã«ã§ããã«ãŒãã§ã®ã¿å¯èœ
å泚æããŸããã æé©åã¯ããã«ãããã»ããµãã·ã³ãforã«ãŒãã§ã®ã¿æçã§ã
ããã¯ãã¡ã¢ãªåž¯åå¹ ãªã©ã®å¶çŽãåããã®ã§ã¯ãªããCPUãéäžçã«äœ¿çšããŸãã ãã®ãªãã·ã§ã³
å«æãã -pthreadããããã£ãŠãããµããŒãããŠããã¿ãŒã²ããã§ã®ã¿ãµããŒããããŸã
-pthread.
-ftree-pta
é¢æ°-ããŒã«ã«ãã€ã³ã-ãå®è¡ããŠãããªãŒã®åæãè¡ããŸãã ãã®ãã©ã°ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
at -O ãããŠããé«ãã
-ftree-sra
éèšã®ã¹ã«ã©ãŒçœ®æãå®è¡ããŸãã ãã®ãã¹ã¯æ§é äœåç §ã眮ãæããŸã
æ§é ãã¡ã¢ãªã«æ©ãã³ãããããã®ãé²ãããã«ã¹ã«ã©ãŒã䜿çšããŸãã ãã®ãã©ã°ã¯
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-ftree-copyrename
ããªãŒã§ã³ããŒã®ååå€æŽãå®è¡ããŸãã ãã®ãã¹ã¯ãã³ã³ãã€ã©ã®äžæçãªååã次ã®ããã«å€æŽããããšããŸã
ã³ããŒå Žæã«ããä»ã®å€æ°ãéåžžãå€æ°åã¯ããã«å€ããªããŸãã
å ã®å€æ°ã«ãã䌌ãŠããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O ãš
é«ãã§ãã
-ftree-coalesce-inlined-vars
copyrenameãã¹ãäŒããŸãïŒãåç §ïŒ -ftree-copyrenameïŒå°ããªãŠãŒã¶ãŒãçµã¿åãããããšãã-
å€æ°ãå®çŸ©ããŸããããä»ã®é¢æ°ããã€ã³ã©ã€ã³åãããå Žåã«éããŸãã ããã¯
ããéå®ããã圢åŒã® -ftree-coalesce-varsã ããã¯ããã®ãããªãããã°æ å ±ã«å®³ãåãŒãå¯èœæ§ããããŸã
ã€ã³ã©ã€ã³åãããå€æ°ããã ããã€ã³ã©ã€ã³åãããé¢æ°ã®å€æ°ã¯å¥ã®å Žæã«ä¿æãããŸãã
ãäºãã«ãæåŸ å€ãå«ãå¯èœæ§ãé«ããªãããã«
ãããã°ã»ãã·ã§ã³ã ããã¯ã4.7ããåã®GCCããŒãžã§ã³ã®ããã©ã«ãã§ããã
-ftree-coalesce-vars
copyrenameãã¹ãäŒããŸãïŒãåç §ïŒ -ftree-copyrenameïŒå°ããªãŠãŒã¶ãŒãçµã¿åãããããšãã-
ã³ã³ãã€ã©ã®äžæçãªãã®ã ãã§ãªããå®çŸ©ãããå€æ°ãã ããã¯å³ããå¶éãããããããŸãã
ã§ã³ã³ãã€ã«ãããæé©åãããããã°ã©ã ããããã°ããæ©èœ -fno-var-tracking-assignments.
åŠå®ããã圢åŒã§ã¯ããã®ãã©ã°ã¯ã次ã®ãããªãŠãŒã¶ãŒå€æ°ã®SSAåäœãé²ããŸãã
ã€ã³ã©ã€ã³ã®ãã®ã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-ftree-ter
SSA->éåžžãã§ãŒãºäžã«äžæçãªåŒã®çœ®æãå®è¡ããŸãã ç¬èº«
use / single def temporariesã¯ã䜿çšå Žæã§å®çŸ©ããããã®ã«çœ®ãæããããŸã
è¡šçŸã ããã«ãããéGIMPLEã³ãŒããçæãããŸããããšã¯ã¹ãã³ããŒã«ããã«å€ãã®æ©èœãæäŸãããŸã
äœæ¥ããè€éãªããªãŒã«ãããRTLã®çæãåäžããŸãã ããã¯ã«ãã£ãŠå¯èœã«ãªããŸã
ããã©ã«ã㧠-O ãããŠããé«ãã
-ftree-slsr
æš¹æšã«å¯ŸããŠçŽç·çãªåŒ·åºŠäœæžãå®è¡ããŸãã ããã¯é¢é£ãããã®ãèªèããŸã
ä¹ç®ãå«ãåŒã§ãããå®äŸ¡ãªèšç®ã«çœ®ãæããŸã
å¯èœã§ããã°ã ããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O ãããŠããé«ãã
-ftree-ãã¯ãã«å
æšã®ãã¯ãã«åãå®è¡ããŸãã ãã®ãã©ã°ã¯æå¹ã«ããŸã -ftree-loop-vectorize ãš
-ftree-slp-ãã¯ãã«å æ瀺çã«æå®ãããŠããªãå Žåã
-ftree-loop-vectorize
ããªãŒã§ã«ãŒããã¯ãã«åãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O3 ãã€
-ftree-ãã¯ãã«å æå¹ã«ãªã£ãŠããŸãã
-ftree-slp-ãã¯ãã«å
ããªãŒã§åºæ¬ãããã¯ã®ãã¯ãã«åãå®è¡ããŸãã ãã®ãã©ã°ã¯ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -O3 ãš
ã〠-ftree-ãã¯ãã«å æå¹ã«ãªã£ãŠããŸãã
-fvect-cost-model =
ãã¯ãã«åã«äœ¿çšãããã³ã¹ãã¢ãã«ãå€æŽããŸãã The åŒæ°ã¯æ¬¡ã®ããããã§ããå¿ èŠããããŸã
ãç¡å¶éãããåçããŸãã¯ãå®ããã ãç¡å¶éãã¢ãã«ã§ã¯ããã¯ãã«åãããã³ãŒã-
ãåçãã¢ãã«ã§ã¯ã©ã³ã¿ã€ã ãã§ãã¯ãå®è¡ãããŸããããã¹ã¯æçã§ãããšèŠãªãããŸã
ãã¯ãã«åãããã³ãŒããã¹ãä¿è·ããŠãå¯èœæ§ãé«ãå埩ã«ãŠã³ãã«å¯ŸããŠã®ã¿æå¹ã«ããŸã
å ã®ã¹ã«ã©ãŒã«ãŒããå®è¡ããå Žåãããé«éã«å®è¡ããŸãã ãå®ããã¢ãã«ã¯
ããšãã°ãã«ãŒãã®ãã¯ãã«åãç¡å¹ã«ãããšãã³ã¹ããéåžžã«é«ããªããŸãã
ããŒã¿ã®äŸåé¢ä¿ãŸãã¯ã¢ã©ã€ã¡ã³ãã®å®è¡æãã§ãã¯ãå¿ èŠãªããã§ããããã以å€ã¯åãã§ã
ãåçãã¢ãã«ã«ã ããã©ã«ãã®ã³ã¹ãã¢ãã«ã¯ãä»ã®æé©åãã©ã°ã«äŸåããŸã
ãåçããŸãã¯ãå®äŸ¡ãã®ããããã§ãã
-fsimd-cost-model =
OpenMPãŸãã¯Cilkã§ããŒã¯ãããã«ãŒãã®ãã¯ãã«åã«äœ¿çšãããã³ã¹ãã¢ãã«ãå€æŽããŸã
ãã©ã¹simdãã£ã¬ã¯ãã£ãã The åŒæ°ã¯ãç¡å¶éãããåçãã
"å®ãã§ã"ã ã®ãã¹ãŠã®å€ ã§èª¬æãããŠããã®ãšåãæå³ãæã£ãŠããŸã -fvect-cost-ã¢ãã«
ããã©ã«ãã§ã¯ãã§å®çŸ©ãããã³ã¹ãã¢ãã« -fvect-cost-ã¢ã㫠䜿çšãããŠããã
-ftree-vrp
ããªãŒã§å€ã®ç¯å²ã®äŒæãå®è¡ããŸãã ããã¯å®æ°äŒæã«äŒŒãŠããŸã
ãã¹ããŸãããå€ã®ä»£ããã«ãå€ã®ç¯å²ãäŒæãããŸãã ããã«ããã
é åå¢çãã§ãã¯ãnullãã€ã³ã¿ãªã©ã®äžèŠãªç¯å²ãã§ãã¯ãåé€ãããªããã£ãã€ã¶
ãã§ãã¯ããŸãã ããã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -O2 以äžã ãã«ãã€ã³ã¿ãŒãã§ãã¯ã®é€å»
次ã®å Žåã«ã®ã¿å®è¡ãããŸã -fdelete-null-pointer-checks æå¹ã«ãªã£ãŠããŸãã
-ããã¬ãŒãµãŒ
ã¹ãŒããŒãããã¯ã®ãµã€ãºãæ¡å€§ããã«ã¯ãããŒã«è€è£œãå®è¡ããŸãã ãã®å€æã«ããã
é¢æ°ã®å¶åŸ¡ãããŒã«ãããä»ã®æé©åãããè¯ãä»äºãããããšãã§ããŸãã
-funroll-ã«ãŒã
ã³ã³ãã€ã«æãŸãã¯ã³ã³ãã€ã«æã«å埩åæ°ã決å®ã§ããã«ãŒããå±éããŸã
ã«ãŒããžã®ãšã³ããªã -funroll-ã«ãŒã å«æãã -frerun-cse-ã«ãŒãåŸ. ãã®ãªãã·ã§ã³ã«ããã
ã³ãŒãã倧ããããå®è¡é床ãäžããå Žåãšè¡ããªãå ŽåããããŸãã
-funroll-all-loops
ã«ãŒãã次ã®å Žåã«å埩åæ°ãäžç¢ºããªå Žåã§ãããã¹ãŠã®ã«ãŒããå±éããŸã
å ¥ã£ãã ããã«ãããéåžžãããã°ã©ã ã®å®è¡ãé ããªããŸãã -funroll-all-loops ãæå³ããŸã
ãšåããªãã·ã§ã³ -funroll-ã«ãŒã,
-fsplit-ivs-in-unroller
åŸã®å埩ã§èªå°å€æ°ã®å€ã®è¡šçŸãæå¹ã«ããŸã
æåã®å埩ã®å€ã䜿çšããŠå±éãããã«ãŒãã ããã¯é·ãäŸåé¢ä¿ãå£ããŸã
ãã§ãŒã³ããããã£ãŠã¹ã±ãžã¥ãŒãªã³ã°ãã¹ã®å¹çãåäžãããŸãã
ã®çµã¿åãã -fweb å€ãã®å Žåãåãå¹æãåŸãã«ã¯CSEã§ååã§ãã
ãã ããã«ãŒãæ¬äœã
åäžã®åºæ¬ãããã¯ã ãŸããäžéšã®ã¢ãŒããã¯ãã£ã§ã¯ã次ã®çç±ã«ãããŸã£ããæ©èœããŸããã
CSEãã¹ã®å¶éã
ãã®æé©åã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
ã¢ã³ããŒã©ãŒå ã® -f å€æ°å±é
ãã®ãªãã·ã§ã³ã䜿çšãããšãã³ã³ãã€ã©ã¯æ¬¡ã®å Žåã«ããã€ãã®ããŒã«ã«å€æ°ã®è€æ°ã®ã³ããŒãäœæããŸãã
ã«ãŒããå±éããŸããããã«ãããåªããã³ãŒããçæãããå¯èœæ§ããããŸãã
-éšåçãªã€ã³ã©ã€ã³å
é¢æ°ã®ã€ã³ã©ã€ã³éšåã ãã®ãªãã·ã§ã³ã¯ãããèªäœãã€ã³ã©ã€ã³åããå Žåã«ã®ã¿å¹æããããŸãã
ã«ãã£ãŠãªã³ã«ãªããŸã -finline-é¢æ° or -finline-small-functions ãªãã·ã§ã³ã
ã¬ãã«ã§æå¹ -O2.
-fpredictive-commoning
äºæž¬çå ±éåæé©åãå®è¡ããŸããã€ãŸããèšç®ãåå©çšããŸãïŒç¹ã«
ã«ãŒãã®åã®å埩ã§å®è¡ãããã¡ã¢ãªã®ããŒããšã¹ãã¢ïŒã
ãã®ãªãã·ã§ã³ã¯ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸã -O3.
-fprefetch-ã«ãŒãé å
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããå Žåã¯ãã¡ã¢ãªãããªãã§ããããåœä»€ãçæããŸãã
倧èŠæš¡ãªã¢ã¬ã€ã«ã¢ã¯ã»ã¹ããã«ãŒãã®ããã©ãŒãã³ã¹ãåäžãããŸãã
ãã®ãªãã·ã§ã³ã¯ãããè¯ããŸãã¯ããæªãã³ãŒããçæããå¯èœæ§ããããŸãã çµæã¯ã«å€§ããäŸåããŸã
ãœãŒã¹ã³ãŒãå ã®ã«ãŒãã®æ§é ã
ã¬ãã«ã§ç¡å¹ -ãªã¹.
-fno-ã®ããç©Ž
-fno-ã®ããç©Ž2
ãã·ã³åºæã®ã®ããç©Žã®æé©åãç¡å¹ã«ããŸãã ã®éã
-fno-ã®ããç©Ž ãš -fno-ã®ããç©Ž2 ã³ã³ãã€ã©ã§ã®å®è£ æ¹æ³ã«ãããŸãã ããã€ãã®
ã¿ãŒã²ããã¯äžæ¹ã䜿çšããäžéšã¯ä»æ¹ã䜿çšããããã€ãã¯äž¡æ¹ã䜿çšããŸãã
-fã®ããç©Ž ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã -fã®ããç©Ž2 ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fno-guess-branch-probability
ãã¥ãŒãªã¹ãã£ãã¯ã䜿çšããŠåå²ç¢ºçãæšæž¬ããªãã§ãã ããã
GCCã¯ããã¥ãŒãªã¹ãã£ãã¯ã䜿çšããŠããã©ã³ãã®ç¢ºçãæäŸãããŠããªãå Žåã«ããããæšæž¬ããŸãã
ãããã¡ã€ãªã³ã°ãã£ãŒãããã¯ïŒ-fprofile-arcsïŒã ãããã®ãã¥ãŒãªã¹ãã£ãã¯ã¯ãå¶åŸ¡ãããŒã«åºã¥ããŠããŸã
ã°ã©ãã äžéšã®åå²ç¢ºçãã«ãã£ãŠæå®ãããŠããå Žå __builtin_expectã ããããŠ
ãã¥ãŒãªã¹ãã£ãã¯ã¯ãæ®ãã®å¶åŸ¡ãããŒã®åå²ç¢ºçãæšæž¬ããããã«äœ¿çšãããŸã
ã°ã©ãã __builtin_expect æ å ±ãèæ ®ã«å ¥ããŸãã éã®çžäºäœçš
ãã¥ãŒãªã¹ãã£ãã¯ãš __builtin_expect è€éã«ãªãå¯èœæ§ããããå Žåã«ãã£ãŠã¯ã
ãã¥ãŒãªã¹ãã£ãã¯ãç¡å¹ã«ããŠã __builtin_expect ç°¡åã§ã
ãããã
ããã©ã«ã㯠-fguess-åå²ç¢ºç ã¬ãã«ã§ -O, -O2, -O3, -ãªã¹.
-ããªãŒãªãŒããŒãããã¯
ååŸæ°ãæžããããã«ãã³ã³ãã€ã«ãããé¢æ°ã®åºæ¬ãããã¯ã䞊ã¹æ¿ããŸã
åå²ããã³ãŒãã®å±ææ§ãåäžãããŸãã
ã¬ãã«ã§æå¹ -O2, -O3.
-freeorder-blocks-and-partition
ã³ã³ãã€ã«ãããé¢æ°ã®åºæ¬ãããã¯ã䞊ã¹æ¿ããã ãã§ãªãã
ååŸãããã©ã³ãã®æ°ãããããšã³ãŒã«ãã®åºæ¬ãããã¯ãå¥ã ã®ã»ã¯ã·ã§ã³ã«åå²
ã¢ã»ã³ããªãš.oãã¡ã€ã«ã®ããŒãžã³ã°ãšãã£ãã·ã¥ã®å±ææ§ã®ããã©ãŒãã³ã¹ãåäžãããŸãã
ãã®æé©åã¯ãäŸå€åŠçãååšããå Žåã«èªåçã«ãªãã«ãªããŸãã
linkonceã»ã¯ã·ã§ã³ã®å ŽåããŠãŒã¶ãŒå®çŸ©ã®ã»ã¯ã·ã§ã³å±æ§ãæã€é¢æ°ã®å Žåãããã³
ååä»ãã»ã¯ã·ã§ã³ããµããŒãããªãã¢ãŒããã¯ãã£ã
ã¬ãã«ã§x86ã«å¯ŸããŠæå¹ -O2, -O3.
-freorder-é¢æ°
ã³ãŒãã®å±ææ§ãåäžãããããã«ããªããžã§ã¯ããã¡ã€ã«å ã®é¢æ°ã䞊ã¹æ¿ããŸãã ããã¯
æãé »ç¹ã«å®è¡ãããç¹å¥ãªãµãã»ã¯ã·ã§ã³ã.text.hotãã䜿çšããŠå®è£ ãããŸã
é¢æ°ãšãå®è¡ãããå¯èœæ§ãäœãé¢æ°ã®å Žåã¯ã.text.unlikelyãã å泚æã¯ã«ãã£ãŠè¡ãããŸã
ãªã³ã«ãªã®ã§ããªããžã§ã¯ããã¡ã€ã«åœ¢åŒã¯ååä»ãã»ã¯ã·ã§ã³ããµããŒãããå¿ èŠãããããªã³ã«ã¯é 眮ããå¿ èŠããããŸã
åççãªæ¹æ³ã§ãããã
ãŸãããã®ãªãã·ã§ã³ãæå¹ã«ããã«ã¯ããããã¡ã€ã«ãã£ãŒãããã¯ãå©çšã§ããå¿ èŠããããŸãã èŠã
-fprofile-arcs 詳现ã«ã€ããŠã¯ã
ã¬ãã«ã§æå¹ -O2, -O3, -ãªã¹.
-fstrict-ãšã€ãªã¢ã·ã³ã°
ã³ã³ãã€ã©ããã®èšèªã«é©çšã§ããæãå³ãããšã€ãªã¢ã·ã³ã°ã«ãŒã«ãæ³å®ã§ããããã«ãã
ã³ã³ãã€ã«ãããŠããŸãã CïŒããã³C ++ïŒã®å Žåãããã«ããã次ã®ã¿ã€ãã«åºã¥ããŠæé©åãã¢ã¯ãã£ãåãããŸãã
åŒã ç¹ã«ãããã¿ã€ãã®ãªããžã§ã¯ãã¯ã
ã¿ã€ããã»ãšãã©åãã§ãªãéããç°ãªãã¿ã€ãã®ãªããžã§ã¯ããšåãã¢ãã¬ã¹ã
ããšãã°ããunsignedintãã¯ãintãã®ãšã€ãªã¢ã¹ãäœæã§ããŸããããvoid*ãããdoubleãããšã€ãªã¢ã¹ããããšã¯ã§ããŸããã A
æåã¿ã€ãã¯ãä»ã®ã¿ã€ãã®ãšã€ãªã¢ã¹ã«ããããšãã§ããŸãã
次ã®ãããªã³ãŒãã«ç¹ã«æ³šæããŠãã ããã
ãŠããªã³a_union{
int i;
ããã«d;
};
int fïŒïŒ{
ãŠããªã³ a_union t;
td = 3.0;
tiãè¿ããŸãã
}
æè¿ã®ãã®ãšã¯ç°ãªãçµåå¡ããèªãç¿æ £
ã«æžãããïŒãåã®ãã³ãã³ã°ããšåŒã°ããïŒã®ãäžè¬çã§ãã ã§ã㧠-fstrict-ãšã€ãªã¢ã·ã³ã°ã ã¿ã€ã-
å ±çšäœã¿ã€ããä»ããŠã¡ã¢ãªã«ã¢ã¯ã»ã¹ããå Žåã¯ãããããèš±å¯ãããŸãã ã ããã
äžèšã®ã³ãŒãã¯æåŸ ã©ããã«æ©èœããŸãã ãã ãããã®ã³ãŒãã¯æ¬¡ã®ããšãè¡ããªãå ŽåããããŸãã
int fïŒïŒ{
ãŠããªã³ a_union t;
int * ip;
td = 3.0;
ip =ïŒt.i;
*ipãè¿ããŸãã
}
åæ§ã«ãã¢ãã¬ã¹ãååŸããçµæã®ãã€ã³ã¿ããã£ã¹ãããŠã¢ã¯ã»ã¹ãã
ãã£ã¹ããå ±çšäœåã䜿çšããŠããå Žåã§ããçµæã®éæ¥åç §ã®åäœã¯æªå®çŸ©ã§ãã
äŸãã°ïŒ
int fïŒïŒ{
ããã«d = 3.0;
returnïŒïŒunion a_union *ïŒïŒdïŒ-> i;
}
ãã® -fstrict-ãšã€ãªã¢ã·ã³ã° ãªãã·ã§ã³ã¯ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸã -O2, -O3, -ãªã¹.
-fstrict-ãªãŒããŒãããŒ
èšèªã«å¿ããŠãã³ã³ãã€ã©ãå³å¯ãªçœ²åä»ããªãŒããŒãããŒã«ãŒã«ãæ³å®ã§ããããã«ããŸã
ã³ã³ãã€ã«ãããŠããŸãã CïŒããã³C ++ïŒã®å Žåãããã¯ãã§ç®è¡æŒç®ãè¡ããšãã«ãªãŒããŒãããŒããããšãæå³ããŸã
笊å·ä»ãæ°å€ã¯æªå®çŸ©ã§ããã€ãŸããã³ã³ãã€ã©ãŒã¯ãããå®çŸ©ãããŠããªããšæ³å®ããå¯èœæ§ããããŸãã
èµ·ããã ããã«ãããããŸããŸãªæé©åãå¯èœã«ãªããŸãã ããšãã°ãã³ã³ãã€ã©ã¯æ¬¡ã®ããšãåæãšããŠããŸãã
ãi+10> iãã®ãããªåŒã¯ã笊å·ä»ãã®ãiãã«å¯ŸããŠåžžã«åœãŠã¯ãŸããŸãã ãã®ä»®å®ã¯
ãi+10ãã®å ŽåãåŒã¯falseã§ããããã笊å·ä»ããªãŒããŒãããŒãæªå®çŸ©ã®å Žåã«ã®ã¿æå¹ã§ãã
XNUMXã®è£æ°æŒç®ã䜿çšãããšãªãŒããŒãããŒããŸãã ãã®ãªãã·ã§ã³ãæå¹ãªå Žå
笊å·ä»ãæ°å€ã®ãªãŒããŒãããŒã«å¯ŸããæŒç®ãæžã蟌ãå¿ èŠããããã©ãããå€æããããšããŸã
å®éã«ãªãŒããŒãããŒãèµ·ãããªãããã«æ³šæããŠãã ããã
ãã®ãªãã·ã§ã³ã䜿çšãããšãã³ã³ãã€ã©ãŒã¯å³å¯ãªãã€ã³ã¿ãŒã»ãã³ãã£ã¯ã¹ãæ³å®ããããšãã§ããŸãã
ãªããžã§ã¯ããžã®ãã€ã³ã¿ããã®ãã€ã³ã¿ã«ãªãã»ãããè¿œå ããŠããã€ã³ã¿ãçæãããªãå Žå
åããªããžã§ã¯ããžã®è¿œå ã¯æªå®çŸ©ã§ãã ããã«ãããã³ã³ãã€ã©ã¯çµè«ãåºãããšãã§ããŸã
ãã®ãp+u> pãã¯ããã€ã³ã¿ãpããšç¬Šå·ãªãæŽæ°ãuãã«å¯ŸããŠåžžã«çã§ãã ãã
åŒã次ã®ããã«ããã€ã³ã¿ã®ã©ããã¢ã©ãŠã³ããå®çŸ©ãããŠããªããããä»®å®ã¯æå¹ã§ãã
XNUMXã®è£æ°æŒç®ã䜿çšããŠãp+uãããªãŒããŒãããŒããå Žåã¯falseã
åç §ããŠãã ãã -fwrapv ãªãã·ã§ã³ã 䜿çšãã -fwrapv æŽæ°ç¬Šå·ä»ããªãŒããŒãããŒã¯
å®å šã«å®çŸ©ãããŠããŸãïŒã©ããããŸãã ã〠-fwrapv 䜿çšãããŠããå Žåãéãã¯ãããŸãã
-fstrict-ãªãŒããŒãã㌠㚠-fno-strict-ãªãŒããŒãã㌠æŽæ°ã®å Žåã ãš -fwrapv ç¹å®ã®ã¿ã€ã
ãªãŒããŒãããŒã¯èš±å¯ãããŸãã ããšãã°ãã³ã³ãã€ã©ãå®è¡äžã«ãªãŒããŒãããŒãååŸããå Žå
å®æ°ã®ç®è¡æŒç®ã§ã¯ããªãŒããŒãããŒããå€ãåŒãç¶ã䜿çšã§ããŸã -fwrapvã§ã¯ãªã
ãããªããšã
ãã® -fstrict-ãªãŒããŒãã㌠ãªãã·ã§ã³ã¯ã¬ãã«ã§æå¹ã«ãªã£ãŠããŸã -O2, -O3, -ãªã¹.
-falign-é¢æ°
-falign-functions =n
é¢æ°ã®éå§ã次ã®XNUMXä¹ã«åãããŸãã nããŸã§ã¹ããã n
ãã€ãã äŸãã°ã -falign-functions = 32 é¢æ°ã次ã®32ãã€ãã«æããŸã
å¢çãããã -falign-functions = 24 ããã次ã®å Žåã«ã®ã¿ã次ã®32ãã€ãå¢çã«æŽåããŸã
23ãã€ã以äžãã¹ãããããããšã§å®è¡ã§ããŸãã
-fno-align-functions ãš -falign-functions = 1 åçã§ããããã®æ©èœãæå³ããŸã
æŽåãããŠããŸããã
äžéšã®ã¢ã»ã³ãã©ã¯ããã®ãã©ã°ããµããŒãããã®ã¯æ¬¡ã®å Žåã®ã¿ã§ãã n XNUMXã®çŽ¯ä¹ã§ãã ãã®å Žåã¯
åãäžãã
If n ãæå®ãããŠããªãããŒãã®å Žåã¯ããã·ã³ã«äŸåããããã©ã«ãã䜿çšããŠãã ããã
ã¬ãã«ã§æå¹ -O2, -O3.
-falign-ã©ãã«
-falign-labels =n
ãã¹ãŠã®ãã©ã³ãã¿ãŒã²ãããXNUMXã®çŽ¯ä¹ã®å¢çã«æããæ倧ã§ã¹ãããããŸã n ã®ãããªãã€ã
-falign-é¢æ°ã ãã®ãªãã·ã§ã³ã¯ãæ¿å ¥ããå¿ èŠããããããã³ãŒããç°¡åã«é ãããå¯èœæ§ããããŸã
ã³ãŒãã®éåžžã®ãããŒã§åå²ã¿ãŒã²ããã«å°éãããšãã®ãããŒæäœã
-fno-align-labels ãš -falign-labels = 1 åçã§ãããã©ãã«ãããã§ã¯ãªãããšãæå³ããŸã
æŽåã
If -falign-ã«ãŒã or -falign-ãžã£ã³ã é©çšå¯èœã§ããããã®å€ãã倧ããå Žåã
代ããã«ãããã®å€ã䜿çšãããŸãã
If n æå®ãããŠããªãããŒãã®å Žåã¯ããã·ã³ã«äŸåããããã©ã«ãã䜿çšããŠãã ããã
ããã«ããã«ã¯ 1ãã¢ã©ã€ã¡ã³ãããªãããšãæå³ããŸãã
ã¬ãã«ã§æå¹ -O2, -O3.
-falign-ã«ãŒã
-falign-loops =n
ã«ãŒããXNUMXã®çŽ¯ä¹ã®å¢çã«æããæ倧ã§ã¹ãããããŸã n ã®ãããªãã€ã -falign-é¢æ°.
ã«ãŒããäœåºŠãå®è¡ãããå Žåãããã¯ãããŒã®å®è¡ãè£ããŸã
æäœã
-fno-align-loops ãš -falign-loops = 1 åçã§ãããã«ãŒããããã§ã¯ãªãããšãæå³ããŸã
æŽåã
If n ãæå®ãããŠããªãããŒãã®å Žåã¯ããã·ã³ã«äŸåããããã©ã«ãã䜿çšããŠãã ããã
ã¬ãã«ã§æå¹ -O2, -O3.
-falign-ãžã£ã³ã
-falign-jumps =n
ã¿ãŒã²ãããååšãããã©ã³ãã¿ãŒã²ããã®å Žåããã©ã³ãã¿ãŒã²ãããXNUMXã®çŽ¯ä¹ã®å¢çã«æããŸã
ãžã£ã³ãããŠãäžã«ã¹ãããããããšã«ãã£ãŠã®ã¿å°éã§ããŸã n ã®ãããªãã€ã -falign-é¢æ°ã ã«
ãã®å ŽåããããŒæäœãå®è¡ããå¿ èŠã¯ãããŸããã
-fno-align-ãžã£ã³ã ãš -falign-jumps = 1 åçã§ãããã«ãŒããããã§ã¯ãªãããšãæå³ããŸã
æŽåã
If n ãæå®ãããŠããªãããŒãã®å Žåã¯ããã·ã³ã«äŸåããããã©ã«ãã䜿çšããŠãã ããã
ã¬ãã«ã§æå¹ -O2, -O3.
-äžåºŠã«äžå°
ãã®ãªãã·ã§ã³ã¯ãäºææ§ã®çç±ããæ®ãããŠããŸãã -äžåºŠã«äžå° å¹æã¯ãããŸããã
-fäžåºŠã«åäœãªã å«æãã -fno-toplevel-reorder ãš -fno-ã»ã¯ã·ã§ã³ã¢ã³ã«ãŒ.
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-fno-toplevel-reorder
ãããã¬ãã«ã®é¢æ°ãå€æ°ãããã³ãasmãã¹ããŒãã¡ã³ãã䞊ã¹æ¿ããªãã§ãã ããã ããããåºåããŸã
å ¥åãã¡ã€ã«ã«è¡šç€ºãããã®ãšåãé åºã ãã®ãªãã·ã§ã³ã䜿çšãããšã
åç §ãããŠããªãéçå€æ°ã¯åé€ãããŸããã ãã®ãªãã·ã§ã³ã¯ããµããŒãããããšãç®çãšããŠããŸã
ç¹å®ã®é åºã«äŸåããæ¢åã®ã³ãŒãã æ°ããã³ãŒãã®å Žåã¯ãã䜿çšããããšããå§ãããŸã
å¯èœãªå Žåã¯å±æ§ã
ã¬ãã«ã§æå¹ -O0ã æ瀺çã«ç¡å¹ã«ãããšãããã¯ãŸãæå³ããŸã -fno-ã»ã¯ã·ã§ã³ã¢ã³ã«ãŒ,
ãã以å€ã®å Žåã¯ã§æå¹ã«ãªããŸã -O0 äžéšã®ã¿ãŒã²ããã§ã
-fweb
ã¬ãžã¹ã¿å²ãåœãŠã®ç®çã§äžè¬çã«äœ¿çšãããWebãæ§ç¯ããåWebãå²ãåœãŠãŸã
åã ã®ç䌌ã¬ãžã¹ã¿ã ããã«ãããã¬ãžã¹ã¿å²ãåœãŠãã¹ãæäœã§ããŸã
çŽæ¥ç䌌ããŸãããCSEãªã©ã®ä»ã®ããã€ãã®æé©åãã¹ã匷åããŸãã
ã«ãŒããªããã£ãã€ã¶ãŒãšäºçŽ°ãªãããã³ãŒããªã ãŒããŒã ãã ãããããã°ã¯å¯èœã§ã
å€æ°ããããŒã ã¬ãžã¹ã¿ãã«ãšã©ãŸããªããããäžå¯èœã§ãã
ããã©ã«ãã§æå¹ã«ãªããŸã -funroll-ã«ãŒã.
-fwhole-ããã°ã©ã
çŸåšã®ã³ã³ãã€ã«åäœããã³ã³ãã€ã«ãããããã°ã©ã å šäœãè¡šããŠãããšæ³å®ããŸãã
ãmainããšã«ãã£ãŠããŒãžããããã®ãé€ããã¹ãŠã®ãããªãã¯é¢æ°ãšå€æ°
å±æ§ãexternally_visibleãã¯éçé¢æ°ã«ãªããäºå®äžæé©åãããŸã
æç¶ãéãªããã£ãã€ã¶ãŒã«ãã£ãŠããç©æ¥µçã«ã
ãã®ãªãã·ã§ã³ã¯ãã-fltoããšçµã¿åãããŠäœ¿çšââããªãã§ãã ããã 代ããã«
ãªã³ã«ãŒãã©ã°ã€ã³ã¯ãããå®å šã§æ£ç¢ºãªæ å ±ãæäŸããå¿ èŠããããŸãã
-flto [=n]
ãã®ãªãã·ã§ã³ã¯ãæšæºã®ãªã³ã¯ã¿ã€ã ãªããã£ãã€ã¶ãå®è¡ããŸãã ãœãŒã¹ã³ãŒãã§åŒã³åºããšã
GIMPLEïŒGCCã®å éšè¡šçŸã®XNUMXã€ïŒãçæãããããç¹å¥ãªELFã«æžã蟌ã¿ãŸã
ãªããžã§ã¯ããã¡ã€ã«ã®ã»ã¯ã·ã§ã³ã ãªããžã§ã¯ããã¡ã€ã«ããªã³ã¯ããããšããã¹ãŠã®
é¢æ°æ¬äœã¯ãããã®ELFã»ã¯ã·ã§ã³ããèªã¿åãããããããããããããã§ãã£ããã®ããã«ã€ã³ã¹ã¿ã³ã¹åãããŸã
åã翻蚳åäœã®äžéšã
ãªã³ã¯ã¿ã€ã ãªããã£ãã€ã¶ã䜿çšããã«ã¯ã -flto æé©åãªãã·ã§ã³ã¯ã§æå®ããå¿ èŠããããŸã
ã³ã³ãã€ã«æãšæçµãªã³ã¯äžã äŸãã°ïŒ
gcc -c -O2 -flto foo.c
gcc -c -O2 -flto bar.c
gcc -o myprog -flto -O2 foo.o bar.o
GCCãžã®æåã®XNUMXåã®åŒã³åºãã¯ãGIMPLEã®ãã€ãã³ãŒãè¡šçŸãç¹å¥ãªãã®ã«ä¿åããŸã
å éšã®ELFã»ã¯ã·ã§ã³ ãµãŒã ãš ããŒãªãŒã æåŸã®åŒã³åºãã¯ãGIMPLEãã€ãã³ãŒããèªã¿åããŸã
from ãµãŒã ãš ããŒãªãŒãXNUMXã€ã®ãã¡ã€ã«ãXNUMXã€ã®å éšã€ã¡ãŒãžã«ããŒãžããã³ã³ãã€ã«ããŸã
ãã€ãã®ããã«çµæã äž¡æ¹ãã ãµãŒã ãš ããŒãªãŒ åäžã®ç»åã«ããŒãžãããŸãããã
GCCã®ãã¹ãŠã®æç¶ãéåæãšæé©åã
XNUMXã€ã®ãã¡ã€ã«ãXNUMXã€ã§ãããã®ããã«ã ããã¯ãããšãã°ãã€ã³ã©ã€ããŒã
ã§é¢æ°ãã€ã³ã©ã€ã³åã§ããŸã ããŒãªãŒ ã®é¢æ°ã« ãµãŒã ããã³ãã®éã
ãªã³ã¯æã®æé©åãæå¹ã«ããå¥ã®ïŒããç°¡åãªïŒæ¹æ³ã¯æ¬¡ã®ãšããã§ãã
gcc -o myprog -flto -O2 foo.c bar.c
äžèšã¯ã®ãã€ãã³ãŒããçæããŸã foo.c ãš bar.cãããããXNUMXã€ã«ããŒãžããŸã
GIMPLEè¡šçŸãäœæããéåžžã©ããã«æé©åããŠçæããŸã ãã€ããã°.
èŠããŠããã¹ãå¯äžã®éèŠãªããšã¯ããªã³ã¯æã®æé©åãæå¹ã«ããããšã§ãã
ãªã³ã¯ã¹ããããå®è¡ããã«ã¯ãGCCãã©ã€ããŒã䜿çšããå¿ èŠããããŸãã ãã®åŸãGCCã¯èªåçã«å®è¡ããŸã
é¢é£ãããªããžã§ã¯ãã®ãããããã§ã³ã³ãã€ã«ãããå Žåã®ãªã³ã¯æéã®æé©å -flto.
éåžžããªã³ã¯æéã«äœ¿çšããæé©åãªãã·ã§ã³ãæå®ããå¿ èŠããããŸã
GCCã¯ã䜿çšããæé©åã¬ãã«ãå·§åŠã«æšæž¬ããããšããŸãããæé©å
ãªã³ã¯æã«æå®ããªãã£ãå Žåã¯ãã³ã³ãã€ã«æã«äœ¿çšããããªãã·ã§ã³ããã åã¯
ãªã³ã¯æã«ãªã³ã¯æã®æé©åãè¡ããšããèªå決å®ãåžžã«ãªãŒããŒã©ã€ãã§ããŸã
ééããããšã«ãã£ãŠ -fno-lto linkã³ãã³ãã«ã
ããã°ã©ã å šäœã®æé©åãå¹æçã«ããã«ã¯ãç¹å®ã®å šäœãäœæããå¿ èŠããããŸã
ããã°ã©ã ã®ä»®å®ã ã³ã³ãã€ã©ã¯ãé¢æ°ãšå€æ°ãäœã§ããããç¥ãå¿ èŠããããŸã
ãªã³ã¯æéæé©åãŠãããã®å€éšã®ã©ã€ãã©ãªããã³ã©ã³ã¿ã€ã ã«ãã£ãŠã¢ã¯ã»ã¹ãããŸãã ãã€
ãªã³ã«ãŒããªã³ã«ãŒãã©ã°ã€ã³ã§ãµããŒããããŠããŸãïŒãåç §ïŒ -ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³ïŒãã¹
䜿çšæžã¿ããã³å€éšããèŠããã·ã³ãã«ã«é¢ããã³ã³ãã€ã©ãžã®æ å ±ã ãã€
ãªã³ã«ãŒãã©ã°ã€ã³ã¯å©çšã§ããŸããã -fwhole-ããã°ã©ã ã³ã³ãã€ã©ãèš±å¯ããããã«äœ¿çšããå¿ èŠããããŸã
ãããã®ä»®å®ãè¡ãããšã§ãããç©æ¥µçãªæé©åã®æ±ºå®ã«ã€ãªãããŸãã
æ¥æ -ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³ ãã¡ã€ã«ãã§ã³ã³ãã€ã«ããããšãã«æå¹ã«ãããŠããªã -flto
çæããããªããžã§ã¯ããã¡ã€ã«ã¯ãGIMPLEãå«ãŸããŠãããããéåžžã®ãªããžã§ã¯ããã¡ã€ã«ããã倧ãããªããŸãã
ãã€ãã³ãŒããšéåžžã®æçµã³ãŒãïŒãåç §ïŒ -ffat-lto-objectsã ããã¯ããã®ãªããžã§ã¯ããæå³ããŸã
LTOæ å ±ãå«ããã¡ã€ã«ã¯ãéåžžã®ãªããžã§ã¯ããã¡ã€ã«ãšããŠãªã³ã¯ã§ããŸãã ããã -fno-lto åæ Œ
ãªã³ã«ãŒã«ã¯ãæç¶ãéæé©åã¯é©çšãããŸããã ãã€
-fno-fat-lto-objects æå¹ã«ãããšãã³ã³ãã€ã«æ®µéã¯é«éã«ãªããŸãããå®è¡ã§ããŸãã
ãããã®éåžžã®éLTOãªã³ã¯ã
ããã«ãåã ã®ãã¡ã€ã«ã®ã³ã³ãã€ã«ã«äœ¿çšãããæé©åãã©ã°ã¯
å¿ ç¶çã«ãªã³ã¯æã«äœ¿çšããããã®ã«é¢é£ããŠããŸãã äŸãã°ã
gcc -c -O0 -ffat-lto-objects -flto foo.c
gcc -c -O0 -ffat-lto-objects -flto bar.c
gcc -o myprog -O3 foo.o bar.o
ããã«ãããæé©åãããŠããªãã¢ã»ã³ãã©ã³ãŒããå«ãåã ã®ãªããžã§ã¯ããã¡ã€ã«ãçæãããŸããã
çµæã®ãã€ã㪠ãã€ããã° ã§æé©åãããŠããŸã -O3ã 代ããã«ãæçµçãªãã€ããªã
ã§çæ -fno-ltoãã¿ãããããã®åŸã ãã€ããã° æé©åãããŠããŸããã
æçµçãªãã€ããªãçæãããšããGCCã¯ãªã³ã¯æéã®æé©åã®ã¿ããããã«é©çšããŸã
ãã€ãã³ãŒããå«ããã¡ã€ã«ã ãããã£ãŠããªããžã§ã¯ããã¡ã€ã«ãš
GIMPLEãã€ãã³ãŒããšæçµãªããžã§ã¯ãã³ãŒããå«ãã©ã€ãã©ãªã GCCã¯èªåçã«éžæããŸã
LTOã¢ãŒãã§æé©åãããã¡ã€ã«ãšããã以äžãªã³ã¯ããªããã¡ã€ã«
åŠçã
ãã€ãã³ãŒããçæãããšãã«GCCã«ãã£ãŠä¿æãããã³ãŒãçæãã©ã°ãããã€ããããŸãã
ãããã¯ããªã³ã¯ã®æçµæ®µéã§äœ¿çšããå¿ èŠããããŸãã äžè¬çã«ã§æå®ããããªãã·ã§ã³
ãªã³ã¯æã¯ãã³ã³ãã€ã«æã«æå®ããããã®ããªãŒããŒã©ã€ãããŸãã
æé©åã¬ãã«ãªãã·ã§ã³ãæå®ããªãå Žå -O ãªã³ã¯æã«GCCã¯
ãªããžã§ã¯ããã¡ã€ã«ã®ã³ã³ãã€ã«æã«äœ¿çšãããæé©åã¬ãã«ã«åºã¥ããŠèšç®ããŸãã
ããã§æé«ã®æé©åã¬ãã«ãåã¡ãŸãã
çŸåšã次ã®ãªãã·ã§ã³ãšãã®èšå®ã¯æåã®ãªããžã§ã¯ããã¡ã€ã«ããååŸãããŸã
æ瀺çã«æå®ãããã®ïŒ -fPIC, -fpic, -fpie, -fcommon, -äŸå€,
-fnon-call-äŸå€, -fgnu-tm ãããŠãã¹ãŠ -m ã¿ãŒã²ãããã©ã°ã
ç¹å®ã®ABIå€æŽãã©ã°ã¯ããã¹ãŠã®ã³ã³ãã€ã«åäœã§äžèŽããè©Šè¡ããå¿ èŠããããŸã
ãªã³ã¯æã«ç«¶åããå€ã§ããããªãŒããŒã©ã€ãããããšã¯ç¡èŠãããŸãã ããã
ãªã©ã®ãªãã·ã§ã³ -freg-æ§é äœ-ãªã¿ãŒã³ ãš -fpcc-æ§é äœ-ãªã¿ãŒã³.
ãªã©ã®ä»ã®ãªãã·ã§ã³ -ffp-å¥çŽ, -fno-strict-ãªãŒããŒãããŒ, -fwrapv, -fno-trapv or
-fno-strict-ãšã€ãªã¢ã·ã³ã° ãªã³ã¯ã¹ããŒãžã«æž¡ãããä¿å®çã«ããŒãžãããŸã
競åãã翻蚳åäœã®å Žåã å ·äœçã«ã¯ -fno-strict-ãªãŒããŒãããŒ, -fwrapv ãš
-fno-trapv åªå ããäŸãã° -ffp-contract = off ãããåªå ãããŸã
-ffp-contract = fastã linke-timeã§ãããããªãŒããŒã©ã€ãã§ããŸãã
åããªã³ã¯ã«åå ããŠãããã¹ãŠã®ãã¡ã€ã«ãã³ã³ãã€ã«ããããšããå§ãããŸã
åããªãã·ã§ã³ã䜿çšãããªã³ã¯æã«ãããã®ãªãã·ã§ã³ãæå®ããŸãã
LTOããäºææ§ã®ãªãã¿ã€ãã§å®£èšãããCãªã³ã±ãŒãžãæã€ãªããžã§ã¯ããåå¥ã«æ€åºããå Žå
äžç·ã«ãªã³ã¯ããã翻蚳åäœïŒISOC99ã«ããæªå®çŸ©ã®åäœ
6.2.7ïŒãèŽåœçã§ã¯ãªã蚺æãçºè¡ãããå ŽåããããŸãã å®è¡æã®åäœã¯ãŸã å®çŸ©ãããŠããŸãã
æéã ä»ã®èšèªã§ãåæ§ã®èšºæãè¡ãããå ŽåããããŸãã
LTOã®ããXNUMXã€ã®æ©èœã¯ãæç¶ãéæé©åãé©çšã§ããããšã§ãã
ç°ãªãèšèªã§æžããããã¡ã€ã«ã®å ŽåïŒ
gcc -c -flto foo.c
g ++ -c -flto bar.cc
gfortran -c -flto baz.f90
g ++ -o myprog -flto -O3 foo.o bar.o baz.o -lgfortran
æçµçãªãªã³ã¯ã¯æ¬¡ã®ããã«è¡ãããããšã«æ³šæããŠãã ãã g ++ C++ã©ã³ã¿ã€ã ã©ã€ãã©ãªãååŸãã
-lgfortran Fortranã©ã³ã¿ã€ã ã©ã€ãã©ãªãååŸããããã«è¿œå ãããŸããã äžè¬çã«ãæ··åãããšã
LTOã¢ãŒãã®èšèªã§ã¯ãããã·ã³ã°æãšåããªã³ã¯ã³ãã³ããªãã·ã§ã³ã䜿çšããå¿ èŠããããŸã
éåžžã®ïŒéLTOïŒã³ã³ãã€ã«ã®èšèªã
GIMPLEãã€ãã³ãŒããå«ããªããžã§ã¯ããã¡ã€ã«ãã©ã€ãã©ãªã¢ãŒã«ã€ãã«ä¿åãããŠããå Žåã
libfoo.aãã䜿çšããŠããå Žåã¯ãLTOãªã³ã¯ã§ããããæœåºããŠäœ¿çšããããšãã§ããŸã
ãã©ã°ã€ã³ããµããŒããããªã³ã«ãŒã LTOã«é©ããéçã©ã€ãã©ãªãäœæããã«ã¯ã gcc-ar
ãš gcc-ranlib ar ããã³ãranlibã; ãªããžã§ã¯ããã¡ã€ã«ã®ã·ã³ãã«ã衚瀺ããã«ã¯
GIMPLEãã€ãã³ãŒããäœ¿çš gcc-nmã ãããã®ã³ãã³ãã¯ãããå¿ èŠãšããŸã ar, ã©ã³ãªã ãš nm ãããŠãã
ãã©ã°ã€ã³ãµããŒãä»ãã§ã³ã³ãã€ã«ã ãªã³ã¯æã«ãã©ã°ã䜿çšããŸã -ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³ ããž
ã©ã€ãã©ãªãLTOæé©åããã»ã¹ã«åå ããŠããããšã確èªããŸãã
gcc -o myprog -O2 -flto -fuse-linker-plugin ao bo -lfoo
ãªã³ã«ãã©ã°ã€ã³ãæå¹ã«ãããšããªã³ã«ã¯å¿ èŠãªGIMPLEãã¡ã€ã«ã
libfoo.a ããããå®è¡äžã®GCCã«æž¡ããŠãéçŽããããã®ã®äžéšã«ããŸã
æé©åããGIMPLEç»åã
ãã©ã°ã€ã³ããµããŒããããªã³ã«ãŒã䜿çšããŠããªãå Žåãããã³/ãŸãã¯ãªã³ã«ãŒãæå¹ã«ããªãå Žå
ãã©ã°ã€ã³ã次ã«å éšã®ãªããžã§ã¯ã libfoo.a ãã€ãã®ããã«æœåºãããŠãªã³ã¯ãããŸããã
LTOæé©åããã»ã¹ã«åå ããªãã§ãã ããã éçã©ã€ãã©ãªãäœæããã«ã¯
LTOæé©åãšéåžžã®ãªã³ã±ãŒãžã®äž¡æ¹ã«é©ããŠããããªããžã§ã¯ããã¡ã€ã«ã次ã®ããã«ã³ã³ãã€ã«ããŸãã
-flto ã-ffat-lto-objectsãã
ãªã³ã¯æã®æé©åã¯ãåäœããããã«ããã°ã©ã å šäœã®ååšãå¿ èŠãšããŸããã
ããã°ã©ã ã§ã·ã³ãã«ããšã¯ã¹ããŒãããå¿ èŠããªãå Žåã¯ãçµã¿åãããããšãã§ããŸã
-flto ãš -fwhole-ããã°ã©ã æç¶ãéãªããã£ãã€ã¶ãŒãããå€ãã䜿çšã§ããããã«ãã
æé©åã®æ©äŒã®æ¹åã«ã€ãªããå¯èœæ§ã®ããç©æ¥µçãªä»®å®ã ã®äœ¿çš
-fwhole-ããã°ã©ã ãªã³ã«ãŒãã©ã°ã€ã³ãã¢ã¯ãã£ããªå Žåã¯å¿ èŠãããŸããïŒãåç §ïŒ -ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³).
LTOã®çŸåšã®å®è£ ã§ã¯ã次ã®ãããªãã€ãã³ãŒããçæããããšã¯ããŠããŸããã
ç°ãªãã¿ã€ãã®ãã¹ãéã§ç§»æ€å¯èœã ãã€ãã³ãŒããã¡ã€ã«ã¯ããŒãžã§ã³ç®¡çãããŠããã
ã¯å³å¯ãªããŒãžã§ã³ãã§ãã¯ã§ãããããGCCã®XNUMXã€ã®ããŒãžã§ã³ã§çæããããã€ãã³ãŒããã¡ã€ã«ã¯
å€ãããŒãžã§ã³ãŸãã¯æ°ããããŒãžã§ã³ã®GCCã§åäœããŸãã
ãªã³ã¯æã®æé©åã¯ããããã°æ å ±ã®çæã§ã¯ããŸãæ©èœããŸããã
çµå -flto ã -g çŸåšå®éšçã§ãããäºæããªãçæãäºæ³ãããŸã
çµæã
ãªãã·ã§ã³ãæå®ããå Žå nããªã³ã¯æã«è¡ãããæé©åãšã³ãŒãçæ
ã䜿çšããŠäžŠè¡ããŠå®è¡ãããŸã n ã€ã³ã¹ããŒã«ããããå©çšããããšã«ãã䞊åãžã§ã make ããã°ã©ã ã
ç°å¢å€æ° MAKE 䜿çšããããã°ã©ã ãäžæžãããããã«äœ¿çšã§ããŸãã ããã©ã«ã
ã®å€ n 1ã§ãã
æå®ããããšãã§ããŸã -flto = jobserver GNUmakeã®ãžã§ããµãŒããŒã¢ãŒãã䜿çšããŠæ±ºå®ãã
䞊åãžã§ãã®æ°ã ããã¯ãGCCãåŒã³åºãMakefileããã§ã«ååšããå Žåã«åœ¹ç«ã¡ãŸã
䞊è¡ããŠå®è¡ããŸãã ããªãã¯åã«è¿œå ããå¿ èŠããããŸã + 芪ã®ã³ãã³ãã¬ã·ãã«
ãããæ©èœããããã®Makefileã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿æ©èœããå¯èœæ§ããããŸã MAKE GNUmakeã§ãã
-flto-partition =ALG
ãªã³ã¯æãªããã£ãã€ã¶ã䜿çšããããŒãã£ã·ã§ãã³ã°ã¢ã«ãŽãªãºã ãæå®ããŸãã å€ã¯
ã1to1ãã§å ã®ãœãŒã¹ãã¡ã€ã«ããã©ãŒãªã³ã°ããããŒãã£ã·ã§ã³ãæå®ãããã
ããã©ã³ã¹ã®åãããã§ãåããµã€ãºã®ãã£ã³ã¯ãžã®ããŒãã£ã·ã§ã³åå²ãæå®ããŸãïŒå¯èœãªå Žåã¯ãã€ã§ãïŒãŸãã¯
ãmaxãã¯ãå¯èœãªå Žåã¯ãã¹ãŠã®ã·ã³ãã«ã«æ°ããããŒãã£ã·ã§ã³ãäœæããŸãã ããªãããæå®ãã
ã¢ã«ãŽãªãºã ã«ãããããŒãã£ã·ã§ãã³ã°ãšã¹ããªãŒãã³ã°ãå®å šã«ç¡å¹ã«ãªããŸãã ããã©ã«ãå€ã¯
ããã©ã³ã¹ã®ãšãããã ã1to1ãã¯ããŸããŸãªã³ãŒãé åºã®åé¿çãšããŠäœ¿çšã§ããŸãã
åé¡ã®å Žåããæ倧ãããŒãã£ã·ã§ãã³ã°ã¯å éšãã¹ãã®ã¿ãç®çãšããŠããŸãã
-flto-compression-level =n
ãã®ãªãã·ã§ã³ã¯ãèšè¿°ãããäžéèšèªã«äœ¿çšãããå§çž®ã®ã¬ãã«ãæå®ããŸã
LTOãªããžã§ã¯ããã¡ã€ã«ã«å€æãããLTOã¢ãŒããšçµã¿åãããå Žåã«ã®ã¿æå³ããããŸãïŒ-flto).
æå¹ãªå€ã¯ã0ïŒå§çž®ãªãïŒãã9ïŒæ倧å§çž®ïŒã§ãã ãã以å€ã®å€
ç¯å²ã¯0ãŸãã¯9ã®ããããã«ã¯ã©ã³ããããŸãããªãã·ã§ã³ãæå®ãããŠããªãå Žåãããã©ã«ãã®ãã©ã³ã¹ãåããŠããŸã
å§çž®èšå®ã䜿çšãããŸãã
-flto-ã¬ããŒã
ãªã³ã¯ã¿ã€ã ãªããã£ãã€ã¶ã®åäœã«é¢ããå éšè©³çŽ°ãå«ãã¬ããŒããå°å·ããŸãã The
ãã®ã¬ããŒãã®å 容ã¯ããŒãžã§ã³ããšã«ç°ãªããŸãã GCCã«åœ¹ç«ã€ããšãç®çãšããŠããŸã
LTOã¢ãŒãã§ãªããžã§ã¯ããã¡ã€ã«ãåŠçããå Žåã®éçºè ïŒçµç± -flto).
ããã©ã«ãã§ã¯ç¡å¹ã§ãã
-flto-ã¬ããŒã-wpa
ããã -flto-ã¬ããŒãããã ãããªã³ã¯æéæé©åã®WPAãã§ãŒãºã§ã®ã¿å°å·ããŸãã
-ãã¥ãŒãº-ãªã³ã«ãŒ-ãã©ã°ã€ã³
ãªã³ã¯æã®æé©åäžã«ãªã³ã«ãŒãã©ã°ã€ã³ã䜿çšã§ããããã«ããŸãã ãã®ãªãã·ã§ã³ã¯äŸåããŠããŸã
ãªã³ã«ãŒã§ã®ãã©ã°ã€ã³ãµããŒãã«ã€ããŠããŽãŒã«ããŸãã¯GNUld2.21ãŸãã¯
æ°ããã
ãã®ãªãã·ã§ã³ã䜿çšãããšãã©ã€ãã©ãªããGIMPLEãã€ãã³ãŒããå«ããªããžã§ã¯ããã¡ã€ã«ãæœåºã§ããŸãã
ã¢ãŒã«ã€ãã ããã«ãããããå€ãã®ã³ãŒãããªã³ã¯ã«å ¬éããããããæé©åã®å質ãåäžããŸã-
æéãªããã£ãã€ã¶ãŒã ãã®æ å ±ã¯ãå€éšããã¢ã¯ã»ã¹ã§ããã·ã³ãã«ãæå®ããŸã
ïŒéLTOãªããžã§ã¯ããŸãã¯ãã€ãããã¯ãªã³ã¯äžïŒã çµæãšããŠåŸãããã³ãŒãå質ã®åäž
ãã€ããªïŒããã³é衚瀺ã®å¯èŠæ§ã䜿çšããå ±æã©ã€ãã©ãªïŒã¯ã
ã-fwhole-programãã èŠã -flto ãã®ãã©ã°ã®å¹æãšæ¹æ³ã®èª¬æã«ã€ããŠã¯
ããã䜿çšããŠããŸãã
ãã®ãªãã·ã§ã³ã¯ãGCCã§ã®LTOãµããŒããæå¹ã§ãGCCãæå¹ã«ãªã£ãŠããå Žåã«ããã©ã«ãã§æå¹ã«ãªããŸãã
ãã©ã°ã€ã³ïŒGNU ld 2.21以éãŸãã¯ãŽãŒã«ãïŒããµããŒããããªã³ã«ãŒã§äœ¿çšããããã«æ§æãããŠããŸãã
-ffat-lto-objects
Fat LTOãªããžã§ã¯ãã¯ãäžéèšèªãš
ãªããžã§ã¯ãã³ãŒãã ããã«ãããLTOãªã³ã¯ãšéåžžã®ãªã³ã¯ã®äž¡æ¹ã§äœ¿çšã§ããããã«ãªããŸãã ãã
ãªãã·ã§ã³ã¯ã次ã®ã³ãã³ãã§ã³ã³ãã€ã«ããå Žåã«ã®ã¿æå¹ã§ãã -flto ãªã³ã¯æã«ç¡èŠãããŸãã
-fno-fat-lto-objects ãã¬ãŒã³LTOãããã³ã³ãã€ã«æéãæ¹åããŸããã
LTOãèªèããããã®å®å šãªããŒã«ãã§ãŒã³ã ãªã³ã«ãŒãã©ã°ã€ã³ããµããŒããããªã³ã«ãŒãå¿ èŠã§ã
åºæ¬çãªæ©èœã®ããã ããã«ã nm, ar ãš ã©ã³ãªã ãªã³ã«ãŒããµããŒãããå¿ èŠããããŸã
ãã«æ©èœã®ãã«ãç°å¢ãå¯èœã«ãããã©ã°ã€ã³ïŒéçãªãã«ããå¯èœïŒ
ã©ã€ãã©ãªãªã©ïŒã GCC㯠gcc-ar, gcc-nm, gcc-ranlib æž¡ãã©ãããŒ
ãããã®ããŒã«ãžã®æ£ãããªãã·ã§ã³ã éãã¡ããLTOã®å Žåãmakefileã䜿çšããã«ã¯å€æŽããå¿ èŠããããŸã
ãããã
ããã©ã«ã㯠-fno-fat-lto-objects ãªã³ã«ãŒãã©ã°ã€ã³ããµããŒãããã¿ãŒã²ããã
-fæ¯èŒ-elim
ã¬ãžã¹ã¿å²ãåœãŠãšã¬ãžã¹ã¿åŸå²ãåœãŠåœä»€ã®åå²åŸã次ã®ããã«èå¥ããŸãã
æ¯èŒæŒç®ãšåæ§ã«ããã»ããµãââã©ã°ãèšç®ããç®è¡åœä»€
ãã®ç®è¡ã«åºã¥ããŠããŸãã å¯èœã§ããã°ãæ瀺çãªæ¯èŒæäœãåé€ããŠãã ããã
ãã®ãã¹ã¯ãæ瀺çã«è¡šãããšãã§ããªãç¹å®ã®ã¿ãŒã²ããã«ã®ã¿é©çšãããŸã
ã¬ãžã¹ã¿å²ãåœãŠãå®äºããåã®æ¯èŒæäœã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fuse-ld = bfd
BFD ããã©ã«ãã®ãªã³ã«ãŒã®ä»£ããã«ãªã³ã«ãŒã
-fuse-ld = gold
ãŽãŒã«ã ããã©ã«ãã®ãªã³ã«ãŒã®ä»£ããã«ãªã³ã«ãŒã
-fcprop-ã¬ãžã¹ã¿
ã¬ãžã¹ã¿å²ãåœãŠãšã¬ãžã¹ã¿åŸå²ãåœãŠåœä»€ã®åå²åŸã次ã®ããã«å®è¡ããŸãã
ã¹ã±ãžã¥ãŒã«ã®äŸåé¢ä¿ãæžãããå Žåã«ãã£ãŠã¯ã³ããŒäŒæãã¹ã䜿çšããŠ
ã³ããŒãåé€ããŸãã
ã¬ãã«ã§æå¹ -O, -O2, -O3, -ãªã¹.
-fprofile-ä¿®æ£
ãã«ãã¹ã¬ããããã°ã©ã çšã«ã€ã³ã¹ãã«ã¡ã³ãåããããã€ããªã䜿çšããŠåéããããããã¡ã€ã«ã¯ã
ã«ãŠã³ã¿ãŒã®æŽæ°ãèŠéãããããäžè²«æ§ããããŸããã ãã®ãªãã·ã§ã³ãæå®ãããšãGCCã¯
ãã®ãããªäžæŽåãä¿®æ£ãŸãã¯å¹³æ»åããããã®ãã¥ãŒãªã¹ãã£ãã¯ã ããã©ã«ãã§ã¯ãGCCã¯
äžè²«æ§ã®ãªããããã¡ã€ã«ãæ€åºãããå Žåã®ãšã©ãŒã¡ãã»ãŒãžã
-fprofile-dir =path
ãããã¡ã€ã«ããŒã¿ãã¡ã€ã«ãæ€çŽ¢ãããã£ã¬ã¯ããªãèšå®ããŸã pathã ãã®ãªãã·ã§ã³
ã«ãã£ãŠçæããããããã¡ã€ã«ããŒã¿ã«ã®ã¿åœ±é¿ããŸã -fprofile-generate, -ftest-ã«ãã¬ããž,
-fprofile-arcs ãšäœ¿çš -fprofile-äœ¿çš ãš -fbranch-確ç ããã³ããã«é¢é£ãã
ãªãã·ã§ã³ã 絶察ãã¹ãšçžå¯Ÿãã¹ã®äž¡æ¹ã䜿çšã§ããŸãã ããã©ã«ãã§ã¯ãGCCã¯
çŸåšã®ãã£ã¬ã¯ããªãšã㊠pathããããã£ãŠããããã¡ã€ã«ããŒã¿ãã¡ã€ã«ã¯ãšåããã£ã¬ã¯ããªã«è¡šç€ºãããŸã
ãªããžã§ã¯ããã¡ã€ã«ã
-fprofile-generate
-fprofile-generate =path
ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã¢ããªã±ãŒã·ã§ã³ã«é垞䜿çšããããªãã·ã§ã³ãæå¹ã«ããŠãæçšãªãããã¡ã€ã«ãäœæããŸã
ãããã¡ã€ã«ãã£ãŒãããã¯ããŒã¹ã®æé©åã䜿çšããŠåŸã§åã³ã³ãã€ã«ããããã 䜿çšããå¿ èŠããããŸã
-fprofile-generate ã³ã³ãã€ã«æãšããã°ã©ã ã®ãªã³ã¯æã®äž¡æ¹ã
次ã®ãªãã·ã§ã³ãæå¹ã«ãªã£ãŠããŸãïŒ "-fprofile-arcs"ã "-fprofile-values"ã"-fvpt"ã
If path ãæå®ãããŠããå ŽåãGCC㯠path ãããã¡ã€ã«ãã£ãŒãããã¯ããŒã¿ãã¡ã€ã«ãæ€çŽ¢ããŸãã
èŠã -fprofile-dir.
-fprofile-䜿çš
-fprofile-use =path
ãããã¡ã€ã«ãã£ãŒãããã¯ã«åããããæé©åãæå¹ã«ããæé©åã¯äžè¬çã«æçã§ã
ãããã¡ã€ã«ãã£ãŒãããã¯ã®ã¿ãå©çšå¯èœã§ãã
次ã®ãªãã·ã§ã³ãæå¹ã«ãªã£ãŠããŸãïŒ "-fbranch-probabilities"ã "-fvpt"ã
"-funroll-loops"ã "-fpeel-loops"ã "-ftracer"ã "-ftree-vectorize"ã
ãftree-loop-distribute-patternsã
ããã©ã«ãã§ã¯ããã£ãŒãããã¯ãããã¡ã€ã«ã
ãœãŒã¹ã³ãŒãã ãã®ãšã©ãŒã¯ãã䜿çšããŠèŠåã«å€ããããšãã§ããŸã -Wcoverage-äžäžèŽ.
ããã«ãããã³ãŒãã®æé©åãäžååã«ãªãå¯èœæ§ãããããšã«æ³šæããŠãã ããã
If path ãæå®ãããŠããå ŽåãGCC㯠path ãããã¡ã€ã«ãã£ãŒãããã¯ããŒã¿ãã¡ã€ã«ãæ€çŽ¢ããŸãã
èŠã -fprofile-dir.
次ã®ãªãã·ã§ã³ã¯ãæµ®åå°æ°ç¹æŒç®ã«é¢ããã³ã³ãã€ã©ã®åäœãå¶åŸ¡ããŸãã
ãããã®ãªãã·ã§ã³ã¯ãé床ãšæ£ç¢ºãã®éã§ãã¬ãŒããªãã«ãªããŸãã ãã¹ãŠãæ確ã«æå¹ã«ããå¿ èŠããããŸãã
-ãããŒãã¹ãã¢
æµ®åå°æ°ç¹å€æ°ãã¬ãžã¹ã¿ã«æ ŒçŽããããä»ã®ãªãã·ã§ã³ãçŠæ¢ãããããªãã§ãã ããã
æµ®åå°æ°ç¹å€ãã¬ãžã¹ã¿ãŸãã¯ã¡ã¢ãªã®ã©ã¡ãããååŸãããããå€ããå¯èœæ§ããããŸãã
ãã®ãªãã·ã§ã³ã¯ã68000ãªã©ã®ãã·ã³ã§æãŸãããªãéå°ãªç²ŸåºŠãé²ããŸãã
ïŒ68881ã®ïŒãããŒãã£ã³ã°ã¬ãžã¹ã¿ã¯ããdoubleããæ³å®ãããŠãããããé«ã粟床ãç¶æããŸã
æã€ããã x86ã¢ãŒããã¯ãã£ã«ã€ããŠãåæ§ã§ãã ã»ãšãã©ã®ããã°ã©ã ã§ã¯ãéå°ãªç²ŸåºŠ
è¯ãã ãã§ãããããã€ãã®ããã°ã©ã ã¯IEEEãããŒãã£ã³ã°ã®æ£ç¢ºãªå®çŸ©ã«äŸåããŠããŸã
ç¹ã 䜿çšãã -ãããŒãã¹ã㢠ãã®ãããªããã°ã©ã ã®å Žåããã¹ãŠãä¿åããããã«å€æŽããåŸ
å€æ°ãžã®é©åãªäžéèšç®ã
-fexcess-precision =
ãã®ãªãã·ã§ã³ã䜿çšãããšããããŒãã£ã³ã°ãã·ã³ã®éå°ãªç²ŸåºŠãããã«å¶åŸ¡ã§ããŸãã
ãã€ã³ãã¬ãžã¹ã¿ã¯ãIEEEã®ãfloatãããã³ãdoubleãã¿ã€ãããã粟床ãé«ãã
ããã»ããµã¯ããããã®ã¿ã€ããžã®äžžãæäœããµããŒãããŠããŸããã ããã©ã«ãã§ã¯ã
-fexcess-precision = fast æå¹ã§ãã ããã¯ãæäœãã§å®è¡ãããããšãæå³ããŸã
ã¬ãžã¹ã¿ã®ç²ŸåºŠãšãåã«äžžãããšãã«äºæž¬ã§ããªãããš
ãœãŒã¹ã³ãŒãã§æå®ããããã®ãå®è¡ãããŸãã Cãã³ã³ãã€ã«ãããšãã
-fexcess-precision = standard ãæå®ãããŠããå Žåãéå°ãªç²ŸåºŠã¯ã«ãŒã«ã«åŸããŸã
ISOC99ã§æå®ãããŠããŸãã ç¹ã«ããã£ã¹ããšå²ãåœãŠã®äž¡æ¹ã«ãããå€ã¯æ¬¡ã®ããã«ãªããŸãã
ã»ãã³ãã£ãã¯ã¿ã€ãã«äžžããããŸãïŒ -ãããŒãã¹ã㢠å²ãåœãŠã«ã®ã¿åœ±é¿ããŸãïŒã
ãã®ãªãã·ã§ã³ã¯ãCã®ãããªå³å¯ãªé©åãªãã·ã§ã³ã®å Žåãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-std = c99 䜿çšãããŠããã
-fexcess-precision = standard C以å€ã®èšèªã«ã¯å®è£ ãããŠãããã
å¹æãããå Žå -funsafe-æ°åŠã®æé©å or -ffast-æ°åŠ ãæå®ãããŠããŸãã x86ã§ã¯ã
次ã®å Žåãå¹æããããŸãã -mfpmath = sse or -mfpmath = sse + 387 æå®ãããŠããŸãã åè ã§
å ŽåãIEEEã»ãã³ãã£ã¯ã¹ã¯é床ã®ç²ŸåºŠãªãã§é©çšãããåŸè ã®å Žåãäžžãã¯
äºæž¬äžå¯èœãªã
-ffast-æ°åŠ
ã»ãã -fno-math-errno, -funsafe-æ°åŠã®æé©å, -æéæ°åŠã®ã¿,
-fno-äžžã-æ°åŠ, -fno-ã·ã°ããªã³ã°-nans ãš -fcxéå®ç¯å².
ãã®ãªãã·ã§ã³ã«ãããããªããã»ããµãã¯ãã__FAST_MATH__ããå®çŸ©ãããŸãã
ãã®ãªãã·ã§ã³ã¯èª°ã«ãã£ãŠããªã³ã«ãããŠããŸãã -O 以å€ã®ãªãã·ã§ã³ -ãªãŒãã¡ã¹ã çµæãšããŠçããå¯èœæ§ããããã
IEEEãŸãã¯ISOã®æ£ç¢ºãªå®è£ ã«äŸåããããã°ã©ã ã®èª€ã£ãåºå
æ°åŠé¢æ°ã®ã«ãŒã«/ä»æ§ã ãã ãã
ãããã®ä»æ§ã®ä¿èšŒãå¿ èŠãšããªãããã°ã©ã ã
-fno-math-errno
åäžã§å®è¡ãããæ°åŠé¢æ°ãåŒã³åºããåŸã«ãerrnoããèšå®ããªãã§ãã ãã
åœä»€ãäŸãã°ãsqrtãã æ°åŠãšã©ãŒã®IEEEäŸå€ã«äŸåããããã°ã©ã
åŠçã§ã¯ãIEEEæŒç®ãç¶æããªããããã®ãã©ã°ã䜿çšããŠé床ãäžããããšãã§ããŸãã
äºææ§ã
ãã®ãªãã·ã§ã³ã¯èª°ã«ãã£ãŠããªã³ã«ãããŠããŸãã -O 誀ã£ãåºåã«ãªãå¯èœæ§ãããããããªãã·ã§ã³
IEEEãŸãã¯ISOã®æ£ç¢ºãªå®è£ ã«äŸåããããã°ã©ã ã®å Žå
æ°åŠé¢æ°ã®ã«ãŒã«/ä»æ§ã ãã ãã
ãããã®ä»æ§ã®ä¿èšŒãå¿ èŠãšããªãããã°ã©ã ã
ããã©ã«ã㯠-fmath-errno.
ããŒãŠã£ã³ã·ã¹ãã ã§ã¯ãæ°åŠã©ã€ãã©ãªããerrnoããèšå®ããããšã¯ãããŸããã ãããã£ãŠãçç±ã¯ãããŸãã
ã³ã³ãã€ã©ããã®å¯èœæ§ãæ€èšããããã«ããã㊠-fno-math-errno ã¯
ããã©ã«ãã
-funsafe-æ°åŠã®æé©å
ïŒaïŒåŒæ°ãš
çµæã¯æå¹ã§ãããïŒbïŒIEEEãŸãã¯ANSIèŠæ Œã«éåããŠããå¯èœæ§ããããŸãã ãªã³ã¯æã«äœ¿çšããå Žåã
ããã©ã«ãã®FPUå¶åŸ¡ã¯ãŒããå€æŽããã©ã€ãã©ãªãŸãã¯ã¹ã¿ãŒãã¢ãããã¡ã€ã«ãå«ãŸããå ŽåããããŸãã
ä»ã®åæ§ã®æé©åã
ãã®ãªãã·ã§ã³ã¯èª°ã«ãã£ãŠããªã³ã«ãããŠããŸãã -O 誀ã£ãåºåã«ãªãå¯èœæ§ãããããããªãã·ã§ã³
IEEEãŸãã¯ISOã®æ£ç¢ºãªå®è£ ã«äŸåããããã°ã©ã ã®å Žå
æ°åŠé¢æ°ã®ã«ãŒã«/ä»æ§ã ãã ãã
ãããã®ä»æ§ã®ä¿èšŒãå¿ èŠãšããªãããã°ã©ã ã æå¹ã«ãã
-fno-signed-zeros, -fno-ãã©ãã-æ°åŠ, -é£æ³æ°åŠ ãš -freciprocal-æ°åŠ.
ããã©ã«ã㯠-fno-unsafe-math-optimizations.
-é£æ³æ°åŠ
äžé£ã®æµ®åå°æ°ç¹æŒç®ã§ãªãã©ã³ãã®åé¢é£ä»ããèš±å¯ããŸãã ãã
èšç®çµæãå€æŽããå¯èœæ§ããããããISOCããã³C++èšèªæšæºã«éåããŠããŸãã
泚ïŒäžŠã¹æ¿ãããšããŒãã®ç¬Šå·ãå€ããã ãã§ãªããNaNãç¡èŠããããŸãã¯
ã¢ã³ããŒãããŒãŸãã¯ãªãŒããŒãããŒãäœæããŸãïŒãããã£ãŠãäžžãã«äŸåããã³ãŒãã§ã¯äœ¿çšã§ããŸãã
ãïŒx + 2 ** 52ïŒ-2**52ãã®ãããªåäœã æµ®åå°æ°ç¹æ¯èŒã䞊ã¹æ¿ããããšãã§ããŸã
ãããã£ãŠãé åºä»ããããæ¯èŒãå¿ èŠãªå Žåã¯äœ¿çšã§ããŸããã ãã®ãªãã·ã§ã³ã§ã¯ã
äž¡èšèªã§ -fno-signed-zeros ãš -fno-ãã©ãã-æ°åŠ æå¹ã«ãªããŸãã ãŸããããã¯ããŸãã
ãšå€ãã®æå³ -ãã©ãŠã³ãã£ã³ã°-æ°åŠã Fortranã®å Žåããã®ãªãã·ã§ã³ã¯æ¬¡ã®å Žåã«èªåçã«æå¹ã«ãªããŸãã
äž¡èšèªã§ -fno-signed-zeros ãš -fno-ãã©ãã-æ°åŠ æå¹ã§ãã
ããã©ã«ã㯠-fno-é£æ³æ°åŠ.
-freciprocal-æ°åŠ
ãã®å Žåãå€ã§é€ç®ãã代ããã«ãå€ã®éæ°ã䜿çšã§ããããã«ããŸã
æé©åãæå¹ã«ããŸãã ããšãã°ããx / yãã¯ããx *ïŒ1 / yïŒãã«çœ®ãæããããšãã§ããŸãã
ãïŒ1 / yïŒããå ±ééšååŒé€å»ã®å¯Ÿè±¡ãšãªãå Žåã«åœ¹ç«ã¡ãŸãã ããã«æ³šæããŠãã ãã
粟床ãäœäžããå€ã§åäœããããããã®æ°ãå¢å ããŸãã
ããã©ã«ã㯠-fno-éæ°-æ°åŠ.
-æéæ°åŠã®ã¿
åŒæ°ãš
çµæã¯NaNãŸãã¯+-Infsã§ã¯ãããŸããã
ãã®ãªãã·ã§ã³ã¯èª°ã«ãã£ãŠããªã³ã«ãããŠããŸãã -O 誀ã£ãåºåã«ãªãå¯èœæ§ãããããããªãã·ã§ã³
IEEEãŸãã¯ISOã®æ£ç¢ºãªå®è£ ã«äŸåããããã°ã©ã ã®å Žå
æ°åŠé¢æ°ã®ã«ãŒã«/ä»æ§ã ãã ãã
ãããã®ä»æ§ã®ä¿èšŒãå¿ èŠãšããªãããã°ã©ã ã
ããã©ã«ã㯠-fno-æéæ°åŠã®ã¿.
-fno-signed-zeros
ãŒãã®ç¬Šå·ãç¡èŠããæµ®åå°æ°ç¹æŒç®ã®æé©åãèš±å¯ããŸãã
IEEEç®è¡ã¯ãç°ãªã+0.0å€ãš-0.0å€ã®åäœãæå®ããŸãã
x+0.0ã0.0*xãªã©ã®åŒã®ç°¡ç¥åãçŠæ¢ããŸãïŒ
-æéæ°åŠã®ã¿ïŒã ãã®ãªãã·ã§ã³ã¯ãçµæããŒãã®ç¬Šå·ãããã§ã¯ãªãããšãæå³ããŸã
éèŠã§ãã
ããã©ã«ã㯠-fsigned-zeros.
-fno-ãã©ãã-æ°åŠ
æµ®åå°æ°ç¹æŒç®ã§ã¯ãŠãŒã¶ãŒã«è¡šç€ºãããªããã®ãçæã§ããªããšæ³å®ããŠã³ãŒããã³ã³ãã€ã«ããŸã
ãã©ããã ãããã®ãã©ããã«ã¯ããŒãé€ç®ããªãŒããŒãããŒãã¢ã³ããŒãããŒãäžæ£ç¢ºãªçµæãããã³
ç¡å¹ãªæäœã ãã®ãªãã·ã§ã³ã§ã¯ã -fno-ã·ã°ããªã³ã°-nans æå¹ã«ãªããŸãã
ãã®ãªãã·ã§ã³ãèšå®ãããšãããã³ã¹ããããIEEEæŒç®ã«äŸåããŠããå Žåãããé«éãªã³ãŒããå¯èœã«ãªãå¯èœæ§ããããŸãã
äŸãã°ã
ãã®ãªãã·ã§ã³ã¯ã誰ããªã³ã«ããªãã§ãã ãã -O çµæãšããŠçããå¯èœæ§ãããããããªãã·ã§ã³
IEEEãŸãã¯ISOã®æ£ç¢ºãªå®è£ ã«äŸåããããã°ã©ã ã®èª€ã£ãåºå
æ°åŠé¢æ°ã®ã«ãŒã«/ä»æ§ã
ããã©ã«ã㯠-ããã©ããã³ã°-æ°åŠ.
-ãã©ãŠã³ãã£ã³ã°-æ°åŠ
ããã©ã«ãã®æµ®åå°æ°ç¹äžžããæ³å®ããå€æãšæé©åãç¡å¹ã«ããŸã
è¡åã ããã¯ããã¹ãŠã®æµ®åå°æ°ç¹ããæŽæ°ãžã®å€æã§ãŒãã«äžžãããã
ä»ã®ãã¹ãŠã®ç®è¡åãæšãŠã®å Žåã¯ãæãè¿ãå€ã«äžžããŸãã ãã®ãªãã·ã§ã³ã¯
FPäžžãã¢ãŒããåçã«å€æŽããããã°ã©ã ããŸãã¯
ããã©ã«ã以å€ã®äžžãã¢ãŒãã§å®è¡ãããŸãã ãã®ãªãã·ã§ã³ã¯ãå®æ°ç³ã¿èŸŒã¿ãç¡å¹ã«ããŸã
ã³ã³ãã€ã«æã®æµ®åå°æ°ç¹åŒïŒäžžãã¢ãŒãã®åœ±é¿ãåããå¯èœæ§ããããŸãïŒ
笊å·ã«äŸåããååšäžã§ã¯å®å šã§ã¯ãªãç®è¡å€æ
äžžãã¢ãŒãã
ããã©ã«ã㯠-fno-äžžã-æ°åŠ.
ãã®ãªãã·ã§ã³ã¯å®éšçãªãã®ã§ãããçŸåšããã¹ãŠã®GCCãç¡å¹ã«ããããšãä¿èšŒãããã®ã§ã¯ãããŸããã
äžžãã¢ãŒãã®åœ±é¿ãåããæé©åã GCCã®å°æ¥ã®ããŒãžã§ã³ã¯æäŸããå¯èœæ§ããããŸã
C99ã®ãFENV_ACCESSããã©ã°ãã䜿çšããŠããã®èšå®ããã现ããå¶åŸ¡ããŸãã ãã®ã³ãã³ãã©ã€ã³
ãªãã·ã§ã³ã¯ããFENV_ACCESSãã®ããã©ã«ãç¶æ ãæå®ããããã«äœ¿çšãããŸãã
-fsignaling-nans
IEEEã·ã°ããªã³ã°NaNããŠãŒã¶ãŒã«è¡šç€ºããããã©ãããçæããå¯èœæ§ããããšæ³å®ããŠã³ãŒããã³ã³ãã€ã«ããŸã
æµ®åå°æ°ç¹æŒç®ã ãã®ãªãã·ã§ã³ãèšå®ãããšãå€æŽãããå¯èœæ§ã®ããæé©åãç¡å¹ã«ãªããŸã
ã·ã°ããªã³ã°NaNã§è¡šç€ºãããäŸå€ã®æ°ã ãã®ãªãã·ã§ã³ã¯ã
-ããã©ããã³ã°-æ°åŠ.
ãã®ãªãã·ã§ã³ã«ãããããªããã»ããµãã¯ãã__SUPPORT_SNAN__ããå®çŸ©ãããŸãã
ããã©ã«ã㯠-fno-ã·ã°ããªã³ã°-nans.
ãã®ãªãã·ã§ã³ã¯å®éšçãªãã®ã§ãããçŸåšããã¹ãŠã®GCCãç¡å¹ã«ããããšãä¿èšŒãããã®ã§ã¯ãããŸããã
NaNã®åäœã®ã·ã°ããªã³ã°ã«åœ±é¿ãäžããæé©åã
-fså粟床å®æ°
æµ®åå°æ°ç¹å®æ°ãæé»çã«å€æããã®ã§ã¯ãªããå粟床ãšããŠæ±ããŸã
ããããå粟床å®æ°ã«å€æããŸãã
-fcxéå®ç¯å²
æå¹ã«ãããšããã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ç¯å²çž®å°æé ãäžèŠã§ããããšã瀺ããŸãã
è€éãªé€ç®ãå®è¡ããŸãã ãŸããçµæã
èæ°ä¹ãŸãã¯é€ç®ã¯ãNaN+I * NaNãã§ããã
ãã®å Žåã®ç¶æ³ã ããã©ã«ã㯠-fno-cx-éãããç¯å²ããã ããã«ãã£ãŠæå¹ã«ãªããŸã
-ffast-æ°åŠ.
ãã®ãªãã·ã§ã³ã¯ãISOC99"CX_LIMITED_RANGE"ãã©ã°ãã®ããã©ã«ãèšå®ãå¶åŸ¡ããŸãã
ããã§ãããã®ãªãã·ã§ã³ã¯ãã¹ãŠã®èšèªã«é©çšãããŸãã
-fcx-fortran-rules
è€éãªä¹ç®ãšé€ç®ã¯Fortranã®èŠåã«åŸããŸãã ç¯å²ã®çž®å°ã¯æ¬¡ã®ããã«è¡ãããŸã
è€éãªé€ç®ã®äžéšã§ãããè€éãªçµæãã©ããã®ãã§ãã¯ã¯ãããŸãã
æãç®ãå²ãç®ã¯ãNaN+I * NaNãã§ãç¶æ³ãæãããšããŸã
ãã®å Žåã¯ã
ããã©ã«ã㯠-fno-cx-fortran-rules.
次ã®ãªãã·ã§ã³ã¯ãããã©ãŒãã³ã¹ãåäžãããå¯èœæ§ãããããããã§ã¯ãªãæé©åãå¶åŸ¡ããŸã
ä»»æã®ã«ãã£ãŠæå¹ã«ãªããŸã -O ãªãã·ã§ã³ã ãã®ã»ã¯ã·ã§ã³ã«ã¯ãçæãããå¯èœæ§ã®ããå®éšãªãã·ã§ã³ãå«ãŸããŠããŸã
å£ããã³ãŒãã
-fbranch-確ç
ã§ã³ã³ãã€ã«ãããããã°ã©ã ãå®è¡ããåŸ -fprofile-arcsãããäžåºŠã³ã³ãã€ã«ã§ããŸã
-fbranch-確çãåæ°ã«åºã¥ããŠæé©åãæ¹åãã
åãã©ã³ããåãããŸããã ããã°ã©ã ãã§ã³ã³ãã€ã«ããããšã -fprofile-arcs çµäºããä¿åããŸã
ã¢ãŒã¯å®è¡ã¯ããšãããã¡ã€ã«ã«ã«ãŠã³ããããŸã ãœãŒã¹å.gcda ãœãŒã¹ãã¡ã€ã«ããšã«ã The
ãã®ããŒã¿ãã¡ã€ã«ã®æ å ±ã¯ãçæãããæ§é ã«å€§ããäŸåããŸã
ã³ãŒããªã®ã§ãäž¡æ¹ã«åããœãŒã¹ã³ãŒããšåãæé©åãªãã·ã§ã³ã䜿çšããå¿ èŠããããŸã
ã³ã³ãã€ã«ã
é£çµ¡å -fbranch-確çãGCC㯠REG_BR_PROB ããããã«æ³šæããŠãã ãã JUMP_INSN ãš
CALL_INSNã ãããã¯ãæé©åãæ¹åããããã«äœ¿çšã§ããŸãã çŸåšããããã¯äœ¿çšãããŠããã ãã§ã
äžç®æã§ïŒã§ reorg.cããã©ã³ããã©ã®ãã¹ãå®è¡ããå¯èœæ§ãæãé«ãããæšæž¬ãã代ããã«
åãã REG_BR_PROB å€ã¯ãã©ã®ãã¹ãããå€ãåãããããæ£ç¢ºã«æ±ºå®ããããã«äœ¿çšãããŸã
ãã°ãã°ã
-fprofile-values
ãšçµã¿åãããå Žå -fprofile-arcsãã³ãŒããè¿œå ããŠã
ããã°ã©ã å ã®è¡šçŸãéããããŸãã
é£çµ¡å -fbranch-確çããããã¡ã€ãªã³ã°å€ããåéãããããŒã¿ãèªã¿æ»ããŸã
æé©åã§äœ¿çšããããã®åŒã
æå¹å -fprofile-generate ãš -fprofile-䜿çš.
-fprofile-reorder-functions
ãããã¡ã€ã«ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã«åºã¥ãé¢æ°ã®äžŠã¹æ¿ãã¯ãæåã®å®è¡ãåéããŸã
é¢æ°ã®æé ã§ãããã®é¢æ°ã䞊ã¹æ¿ããŸãã
æå¹å -fprofile-䜿çš.
-fvpt
ãšçµã¿åãããå Žå -fprofile-arcsããã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ã«ã³ãŒããè¿œå ããããã«æ瀺ããŸã
åŒã®å€ã«é¢ããæ å ±ãåéããŸãã
é£çµ¡å -fbranch-確çãåéãããããŒã¿ãèªã¿æ»ããå®éã«å®è¡ããŸã
ãããã«åºã¥ãæé©åã çŸåšãæé©åã«ã¯
åæ¯ã®å€ã«é¢ããç¥èã䜿çšããé€ç®æŒç®ã
-frename-registers
æ®ã£ãŠããã¬ãžã¹ã¿ãå©çšããŠãã¹ã±ãžã¥ãŒã«ãããã³ãŒãã®èª€ã£ãäŸåé¢ä¿ãåé¿ããããšããŸã
ã¬ãžã¹ã¿å²ãåœãŠåŸã«çµäºããŸãã ãã®æé©åã¯ãå€ãã®ããã»ããµã«æãã¡ãªããããããŸã
ã¬ãžã¹ã¿ã®ã ã¿ãŒã²ãããæ¡çšããŠãããããã°æ å ±ã®åœ¢åŒã«å¿ããŠã
ãã ããå€æ°ããããŒã ãã«ãšã©ãŸããªãããããããã°ãäžå¯èœã«ãªãå¯èœæ§ããããŸãã
ç»é²"ã
ããã©ã«ãã§æå¹ã«ãªããŸã -funroll-ã«ãŒã ãš -fpeel-ã«ãŒã.
-ããã¬ãŒãµãŒ
ã¹ãŒããŒãããã¯ã®ãµã€ãºãæ¡å€§ããã«ã¯ãããŒã«è€è£œãå®è¡ããŸãã ãã®å€æã«ããã
é¢æ°ã®å¶åŸ¡ãããŒã«ãããä»ã®æé©åãããè¯ãä»äºãããããšãã§ããŸãã
æå¹å -fprofile-䜿çš.
-funroll-ã«ãŒã
ã³ã³ãã€ã«æãŸãã¯ã³ã³ãã€ã«æã«å埩åæ°ã決å®ã§ããã«ãŒããå±éããŸã
ã«ãŒããžã®ãšã³ããªã -funroll-ã«ãŒã å«æãã -frerun-cse-ã«ãŒãåŸ, -fweb ãš
-frename-registersã ãŸããå®å šãªã«ãŒãããŒãªã³ã°ïŒã€ãŸããå®å šãªé€å»
å埩åæ°ãå°ãªãã«ãŒãïŒã ãã®ãªãã·ã§ã³ã¯ã³ãŒãã倧ãããã
å®è¡é床ãäžããå Žåãšã§ããªãå ŽåããããŸãã
æå¹å -fprofile-䜿çš.
-funroll-all-loops
ã«ãŒãã次ã®å Žåã«å埩åæ°ãäžç¢ºããªå Žåã§ãããã¹ãŠã®ã«ãŒããå±éããŸã
å ¥ã£ãã ããã«ãããéåžžãããã°ã©ã ã®å®è¡ãé ããªããŸãã -funroll-all-loops ãæå³ããŸã
ãšåããªãã·ã§ã³ -funroll-ã«ãŒã.
-fpeel-ã«ãŒã
ããŸãããŒã«ããªãã»ã©ååãªæ å ±ãããããŒã«ã«ãŒãïŒãã
ãããã¡ã€ã«ãã£ãŒãããã¯ïŒã ãŸããå®å šãªã«ãŒãããŒãªã³ã°ïŒã€ãŸããå®å šãªé€å»
å埩åæ°ãå°ãªãã«ãŒãïŒã
æå¹å -fprofile-䜿çš.
-fmove-ã«ãŒãäžå€
RTLã«ãŒããªããã£ãã€ã¶ã§ã«ãŒãäžå€ã¢ãŒã·ã§ã³ãã¹ãæå¹ã«ããŸãã ã¬ãã«ã§æå¹
-O1
-funswitch-ã«ãŒã
ã«ãŒãäžå€æ¡ä»¶ã®ãã©ã³ããã«ãŒãã®å€ã«ç§»åãã
äž¡æ¹ã®ãã©ã³ãã§ã«ãŒãããŸãïŒæ¡ä»¶ã®çµæã«å¿ããŠå€æŽãããŸãïŒã
-æ©èœ-ã»ã¯ã·ã§ã³
-fdata-ã»ã¯ã·ã§ã³
ã¿ãŒã²ããã®å Žåã¯ãåé¢æ°ãŸãã¯ããŒã¿é ç®ãåºåãã¡ã€ã«ã®ç¬èªã®ã»ã¯ã·ã§ã³ã«é 眮ããŸã
ä»»æã®ã»ã¯ã·ã§ã³ããµããŒãããŸãã é¢æ°ã®ååãŸãã¯ããŒã¿é ç®ã®åå
åºåãã¡ã€ã«å ã®ã»ã¯ã·ã§ã³ã®ååã決å®ããŸãã
ãªã³ã«ãæé©åãå®è¡ããŠæ¹åã§ããã·ã¹ãã ã§ãããã®ãªãã·ã§ã³ã䜿çšããŸã
åœä»€ã¹ããŒã¹ã§ã®åç §ã®å±ææ§ã ELFãªããžã§ã¯ãã䜿çšããã»ãšãã©ã®ã·ã¹ãã
Solaris 2ãå®è¡ããŠãããã©ãŒãããããã³SPARCããã»ããµã«ã¯ããã®ãããªæé©åãåãããªã³ã«ãŒããããŸãã
AIXã¯ãå°æ¥ãããã®æé©åãè¡ãå¯èœæ§ããããŸãã
ãããã®ãªãã·ã§ã³ã¯ãããããããšã§å€§ããªã¡ãªãããããå Žåã«ã®ã¿äœ¿çšããŠãã ããã ããªãã
ãããã®ãªãã·ã§ã³ãæå®ãããšãã¢ã»ã³ãã©ãšãªã³ã«ããã倧ããªãªããžã§ã¯ããšå®è¡å¯èœãã¡ã€ã«ãäœæããŸã
ãã¡ã€ã«ãšãŸãé ãã§ãã ãããæå®ããå Žåããã¹ãŠã®ã·ã¹ãã ã§ãgprofãã䜿çšããããšã¯ã§ããŸãã
ãªãã·ã§ã³ã§ããããã®ãªãã·ã§ã³ãšãªãã·ã§ã³ã®äž¡æ¹ãæå®ãããšããããã°ã§åé¡ãçºçããå¯èœæ§ããããŸãã
-g.
-fbranch-ã¿ãŒã²ãã-ããŒã-æé©å
ããããŒã°/ãšãããŒã°ã¹ã¬ããã®åã«åå²ã¿ãŒã²ããã¬ãžã¹ã¿ã®è² è·æé©åãå®è¡ããŸãã
ã¿ãŒã²ããã¬ãžã¹ã¿ã®äœ¿çšã¯ãéåžžããªããŒãäžã«ã®ã¿å ¬éããããããå·»ãäžããè¡ãããŸãã
ã«ãŒãããããŒããããããã¯éã¹ã±ãžã¥ãŒãªã³ã°ãè¡ãã«ã¯ãåå¥ã®æé©åãå¿ èŠã§ã
ãã¹ã
-fbranch-ã¿ãŒã²ãã-ããŒã-æé©å2
ããããŒã°/ãšãããŒã°ã¹ã¬ããã®åŸã«åå²ã¿ãŒã²ããã¬ãžã¹ã¿ã®è² è·æé©åãå®è¡ããŸãã
-fbtr-bb-æä»ç
åå²ã¿ãŒã²ããã¬ãžã¹ã¿ã®è² è·æé©åãå®è¡ãããšãã¯ãåå²ã¿ãŒã²ãããåå©çšããªãã§ãã ãã
åºæ¬ãããã¯å ã®ã¬ãžã¹ã¿ã
-fstack-ãããã¯ã¿ãŒ
ã¹ã¿ãã¯ã¹ããã·ã³ã°æ»æãªã©ã®ãããã¡ãªãŒããŒãããŒããã§ãã¯ããããã«ãè¿œå ã®ã³ãŒããçºè¡ããŸãã ãã
è匱ãªãªããžã§ã¯ããæã€é¢æ°ã«ã¬ãŒãå€æ°ãè¿œå ããããšã«ãã£ãŠè¡ãããŸãã ãã
ãallocaããåŒã³åºãé¢æ°ãšã8ãã€ããè¶ ãããããã¡ãŒãæã€é¢æ°ãå«ãŸããŸãã
ã¬ãŒãã¯ãé¢æ°ãå ¥åããããšãã«åæåãããé¢æ°ãå ¥åããããšãã«ãã§ãã¯ãããŸãã
é¢æ°ãçµäºããŸãã ã¬ãŒããã§ãã¯ã倱æããå Žåããšã©ãŒã¡ãã»ãŒãžãåºåãããããã°ã©ã ãåºåãããŸã
çµäºããŸãã
-fstack-protector-all
ããã -fstack-ãããã¯ã¿ãŒ ãã¹ãŠã®æ©èœãä¿è·ãããŠããããšãé€ããŠã
-fstack-protector-strong
ããã -fstack-ãããã¯ã¿ãŒ ãã ããä¿è·ããè¿œå æ©èœãå«ãŸããŠããŸã---ããã
ããŒã«ã«é åå®çŸ©ãããããããŒã«ã«ãã¬ãŒã ã¢ãã¬ã¹ãžã®åç §ããããŸãã
泚ïŒUbuntu 14.10以éã®ããŒãžã§ã³ã§ã¯ã -fstack-protector-strong ã«ãã£ãŠæå¹ã«ãªããŸã
CãC ++ãObjCãObjC ++ã®ããã©ã«ãïŒãããããªãã®å ŽåïŒ -fno-ã¹ã¿ãã¯ãããã¯ã¿ãŒ, -nostdlibããŸãã¯
-èªç« ãèŠã€ãããŸããã
-fsection-ã¢ã³ã«ãŒ
å ±æãã¢ã³ã«ãŒãã䜿çšããŠãã·ã³ããªãã¯ã¢ãã¬ã¹èšç®ã®æ°ãæžãããŠã¿ãŠãã ãã
è¿ãã®ãªããžã§ã¯ããã¢ãã¬ã¹æå®ããããã®èšå·ã ãã®å€æã¯ãæ°ãæžããã®ã«åœ¹ç«ã¡ãŸã
ããã€ãã®ã¿ãŒã²ããã§ã®GOTãšã³ããªãšGOTã¢ã¯ã»ã¹ã®æ°ã
ããšãã°ã次ã®é¢æ°ãfooãã®å®è£ ïŒ
static int aãbãc;
int fooïŒvoidïŒ{return a + b + c; }
éåžžãXNUMXã€ã®å€æ°ãã¹ãŠã®ã¢ãã¬ã¹ãèšç®ããŸããã
-fsection-ã¢ã³ã«ãŒã代ããã«ãå ±éã®ã¢ã³ã«ãŒãã€ã³ãããå€æ°ã«ã¢ã¯ã»ã¹ããŸãã The
å¹æã¯æ¬¡ã®æ¬äŒŒã³ãŒãã«äŒŒãŠããŸãïŒããã¯æå¹ãªCã§ã¯ãããŸããïŒã
int fooïŒvoidïŒ
{
ã¬ãžã¹ã¿int*xr =ïŒx;
xr [ïŒa-ïŒx] + xr [ïŒb-ïŒx] + xr [ïŒc-ïŒx];ãè¿ããŸãã
}
ãã¹ãŠã®ã¿ãŒã²ããããã®ãªãã·ã§ã³ããµããŒãããŠããããã§ã¯ãããŸããã
--ãã©ã¡ãŒã¿ å=å€
äžéšã®å Žæã§ã¯ãGCCã¯ããŸããŸãªå®æ°ã䜿çšããŠãæé©åã®éãå¶åŸ¡ããŸãã
çµããããã ããšãã°ãGCCã¯ãç¹å®ãè¶ ããé¢æ°ãå«ãé¢æ°ãã€ã³ã©ã€ã³åããŸããã
åœä»€ã®æ°ã ãããã®å®æ°ã®äžéšã¯ãã³ãã³ãã©ã€ã³ã§å¶åŸ¡ã§ããŸã
--ãã©ã¡ãŒã¿ ãªãã·ã§ã³ãéžæããŸãã
ç¹å®ã®ãã©ã¡ãŒã¿ãŒã®ååãããã³å€ã®æå³ã¯ã
ã³ã³ãã€ã©ã®å éšã§ãããå°æ¥äºåãªãã«å€æŽãããå¯èœæ§ããããŸã
ãªãªãŒã¹ã
ãããã®å Žåãã å€ ã¯æŽæ°ã§ãã ã®èš±å®¹ãããéžæè¢ å ã«ã¯æ¬¡ã®å€ããããŸã:
äºæž¬å¯èœãªãã©ã³ãã®çµæ
ãã®ãããå€ãããäœã確çã§åå²ãè¡ããããšäºæž¬ãããå Žå
ïŒããŒã»ã³ãïŒã®å Žåãããã¯ååã«äºæž¬å¯èœã§ãããšèŠãªãããŸãã ããã©ã«ãã¯10ã§ãã
æ倧ã¯ãã¹ãžã£ã³ããšããž
ã¯ãã¹ãžã£ã³ãã®å¯Ÿè±¡ãšãªãå ¥åãšããžã®æ倧æ°ã ã¢ã«ãŽãªãºã
ã«ãã£ãŠäœ¿çšããã -ã¯ãã¹ãžã£ã³ãã³ã° åãããã¯ã«å ¥ããšããžã®æ°ã®OïŒN ^ 2ïŒã§ãã
å€ã倧ãããããšãããç©æ¥µçãªæé©åãè¡ãããã³ã³ãã€ã«æéãé·ããªããŸãã
å®è¡å¯èœãã¡ã€ã«ã®ãµã€ãºããããã«æ¹åããããšãå¢å ããŸãã
min-crossjump-insn
XNUMXã€ã®ãããã¯ã®çµããã§äžèŽããªããã°ãªããªãåœä»€ã®æå°æ°
ãããã«ã¯ãã¹ãžã£ã³ããå®è¡ãããåã«ã ãã®å Žåããã®å€ã¯ç¡èŠãããŸã
ã¯ãã¹ãžã£ã³ãå ã®ãããã¯å ã®ãã¹ãŠã®åœä»€ãäžèŽããŸãã The
ããã©ã«ãå€ã¯5ã§ãã
max-grow-copy-bb-insn
代ããã«åºæ¬ãããã¯ãã³ããŒããå Žåã®æ倧ã³ãŒããµã€ãºæ¡åŒµä¿æ°
ãžã£ã³ãã³ã°ã å±éã¯ãžã£ã³ãåœä»€ã«é¢é£ããŠããŸãã ããã©ã«ãå€ã¯
8.
max-goto-duplication-insn
ã«ãžã£ã³ããããããã¯ã«è€è£œããåœä»€ã®æ倧æ°
èšç®ãããgotoã å€æ°ã®ãã¹ã§OïŒN ^ 2ïŒã®åäœãåé¿ããããã«ãGCCã¯
ã³ã³ãã€ã«ããã»ã¹ã®æ©ã段éã§gotosãèšç®ããé ããšãããããã¢ã³ãã¡ã¯ã¿ãªã³ã°ããŸã
å¯èœã æ倧以äžã®åºæ¬ãããã¯ã®çµããã§èšç®ããããžã£ã³ãã®ã¿-
goto-duplication-insnsã¯ãã¡ã¯ã¿ãªã³ã°ãããŠããŸããã ããã©ã«ãå€ã¯8ã§ãã
æ倧é 延ã¹ããã insn æ€çŽ¢
åœä»€ãæ¢ããšãã«èæ ®ãã¹ãåœä»€ã®æ倧æ°
é 延ã¹ããããåããŸãã ãã®ä»»æã®æ°ãè¶ ããåœä»€ã
æ€çŽ¢ãããå Žåãé 延ã¹ããããåããããšã«ããæéã®ç¯çŽã¯æå°éã§ãããããåæ¢ããŸã
æ€çŽ¢ã å€ã倧ãããããšãããç©æ¥µçãªæé©åãè¡ããã
ã³ã³ãã€ã«æéã¯å¢å ããŸãããå®è¡æéã¯ãããããããã«æ¹åãããŸãã
æ倧é 延ã¹ããã ã©ã€ãæ€çŽ¢
é 延ã¹ããããåããããšãããšããèæ ®ãã¹ãåœä»€ã®æ倧æ°
æå¹ãªã©ã€ãã¬ãžã¹ã¿æ å ±ãæã€ãããã¯ãæ€çŽ¢ããå Žåã ãããå¢ãã
ä»»æã«éžæãããå€ã¯ãããç©æ¥µçãªæé©åãæå³ãã
ã³ã³ãã€ã«æéã é 延ã¹ãããã³ãŒãã次ã®å Žåããã®ãã©ã¡ãŒã¿ãåé€ããå¿ èŠããããŸã
å¶åŸ¡ãããŒã°ã©ããç¶æããããã«æžãçŽãããŸããã
æ倧gcseã¡ã¢ãª
å®è¡ããããã«å²ãåœãŠãããšãã§ããã¡ã¢ãªã®ããããã®æ倧é
ã°ããŒãã«å ±ééšååŒé€å»ã®æé©åã ããå€ãã®ã¡ã¢ãªãããå Žå
æå®ãå¿ èŠãªå Žåãæé©åã¯è¡ãããŸããã
max-gcse-æ¿å ¥-æ¯ç
åŒã®æ¿å ¥ãšåé€ã®æ¯çããã®å€ããã倧ããå Žå
ä»»æã®åŒã®å ŽåãRTL PREã¯åŒãæ¿å ¥ãŸãã¯åé€ããŠããã®ãŸãŸã«ããŸã
åœä»€ã¹ããªãŒã å ã®éšåçã«åé·ãªèšç®ã ããã©ã«ãå€ã¯
20.
æ倧ä¿çãªã¹ãé·
ä¿çäžã®äŸåé¢ä¿ã®ã¹ã±ãžã¥ãŒãªã³ã°ã®æ倧æ°ã¯ããã©ãã·ã¥ããåã«èš±å¯ãããŸã
çŸåšã®ç¶æ ãšæåããããçŽããŸãã ãã©ã³ããåŒã³åºããå°ãªã倧ããªé¢æ°ã¯
ã¡ã¢ãªãšãªãœãŒã¹ãäžå¿ èŠã«æ¶è²»ããéåžžã«å€§ããªãªã¹ããäœæããŸãã
æ倧ã¢ãžã¥ãããã¯ãã©ãã¯è©Šè¡åæ°
ã¢ãžã¥ãã®å Žåã«ã¹ã±ãžã¥ãŒã©ãå®è¡ããå¿ èŠãããããã¯ãã©ãã¯è©Šè¡ã®æ倧æ°
ã«ãŒãã®ã¹ã±ãžã¥ãŒãªã³ã°ã å€ã倧ãããããšãã³ã³ãã€ã«æéãææ°é¢æ°çã«å¢å ããå¯èœæ§ããããŸãã
max-inline-insn-single
ããã€ãã®ãã©ã¡ãŒã¿ãŒã¯ãGCCã§äœ¿çšãããããªãŒã€ã³ã©ã€ããŒãå¶åŸ¡ããŸãã ãã®çªå·ã¯ã
å ã®åœä»€ã®æ倧æ°ïŒGCCã®å éšè¡šçŸã§ã«ãŠã³ãïŒ
ããªãŒã€ã³ã©ã€ã³åãã€ã³ã©ã€ã³åã®ããã«èæ ®ããåäžã®é¢æ°ã ããã¯åœ±é¿ããã ãã§ã
ã€ã³ã©ã€ã³ã§å®£èšãããé¢æ°ãšã¯ã©ã¹å®£èšïŒC ++ïŒã§å®è£ ãããã¡ãœããã
ããã©ã«ãå€ã¯400ã§ãã
max-inline-insns-auto
ãã®æ¹æ³ã§ãšã¹ãã¬ããœã®æœåºãèšéããå Žåããšã¹ãã¬ããœãã¹ããŠãããèœã¡ãã¿ã€ãã³ã°ãšã¹ã±ãŒã«ãåå¿ããã¿ã€ãã³ã°ã«æéå·®ãçããŸãããšã¹ãã¬ããœãã¹ããŠããããšã¹ãã¬ããœã«ããã«èœã¡ãã¹ã±ãŒã«ãèšéãããŸã§è¥å¹²ã®æéå·®ãçãããããæœåºãã¿ã³ãæ¢ããåŸã液éãçŽïŒïœïŒgå¢å ããããšã念é ã«çœ®ããŠæœåºãæ¢ããŠãã ããã -finline-é¢æ° ïŒã«å«ãŸãã -O3ïŒãå€ãã®é¢æ°
ãã以å€ã®å Žåã¯ãã³ã³ãã€ã©ã«ããã€ã³ã©ã€ã³åã¯èæ ®ãããŸããã ã«
ãããã®é¢æ°ãé¢æ°ãšæ¯èŒããŠç°ãªãïŒããå¶éçãªïŒå¶é
宣èšãããã€ã³ã©ã€ã³ãé©çšã§ããŸãã ããã©ã«ãå€ã¯40ã§ãã
ã€ã³ã©ã€ã³-æå°-ã¹ããŒãã¢ãã
çºä¿¡è +çä¿¡è ã®å®è¡æéã®æšå®ããã©ãŒãã³ã¹æ¹åããããè¶ ããå Žå
ãããå€ïŒããŒã»ã³ãïŒãé¢æ°ã¯ã®å¶éã«é¢ä¿ãªãã€ã³ã©ã€ã³åã§ããŸã
--ãã©ã¡ãŒã¿ max-inline-insn-single ãš --ãã©ã¡ãŒã¿ max-inline-insns-auto.
倧æ©èœ-insns
éåžžã«å€§ããªé¢æ°ãæå®ããå¶éã ãã®å¶éãã倧ããé¢æ°ã®å Žå
ã€ã³ã©ã€ã³ååŸãã€ã³ã©ã€ã³åã¯ã«ãã£ãŠå¶çŽãããŸã --ãã©ã¡ãŒã¿ 倧æ©èœã®æé·ã ãã®
ãã©ã¡ãŒã¿ã¯ãäž»ã«é
ããã¯ãšã³ãã§äœ¿çšãããç·åœ¢ã¢ã«ãŽãªãºã ã ããã©ã«ãå€ã¯2700ã§ãã
倧æ©èœã®æé·
ã€ã³ã©ã€ã³åã«ãã£ãŠåŒãèµ·ãããã倧ããªé¢æ°ã®æ倧æé·ãããŒã»ã³ãã§æå®ããŸãã The
ããã©ã«ãå€ã¯100ã§ã倧èŠæš¡ãªé¢æ°ã®æ¡åŒµãå ã®2.0åã«å¶éããŸã
ãµã€ãºã
ã©ãŒãžãŠãããã€ã³
倧ããªå€æåäœãæå®ããå¶éã ãŠãããã®ã€ã³ã©ã€ã³åã«ãã£ãŠåŒãèµ·ããããæé·
ãã®å¶éããã倧ããå Žåã¯ã --ãã©ã¡ãŒã¿ ã€ã³ã©ã€ã³ãŠãããæé·ã å°ããªãŠãããã®å Žå
ããã¯ãã€ããããããããŸããã ããšãã°ãé¢æ°Aã§æ§æããããŠãããã«ã€ããŠèããŠã¿ãŸãã
ããã¯ã€ã³ã©ã€ã³ã§ãBã¯AãXNUMXååŒã³åºãã ãã§ãã BãAã«æ¯ã¹ãŠå°ããå Žåã
ãŠãããã®æé·ã¯300\ïŒ ã§ããããã®ãããªã€ã³ã©ã€ã³åã¯éåžžã«æ£åžžã§ãã éåžžã«å€§ããå Žå
å°ããªã€ã³ã©ã€ã³æ©èœã§æ§æããããŠãããããã ããå šäœçãªãŠãããã®æé·
ã³ãŒããµã€ãºã®æ¥æ¿ãªå¢å ãé¿ããããã«å¶éãå¿ èŠã§ãã ãããã£ãŠãå°ããå Žå
åäœããµã€ãºã¯ã«å¢å ããŸã --ãã©ã¡ãŒã¿ ã©ãŒãžãŠãããã€ã³ ç³ã蟌ãåã« --ãã©ã¡ãŒã¿
ã€ã³ã©ã€ã³ãŠãããæé·ã ããã©ã«ãã¯10000ã§ãã
ã€ã³ã©ã€ã³ãŠãããæé·
ã€ã³ã©ã€ã³åã«ãã£ãŠåŒãèµ·ããããã³ã³ãã€ã«åäœã®æ倧ã®å šäœçãªæé·ãæå®ããŸãã The
ããã©ã«ãå€ã¯30ã§ããŠãããã®æé·ãå ã®ãµã€ãºã®1.3åã«å¶éããŸãã
ipcp ãŠãããã®æé·
æç¶ãéã«ãã£ãŠåŒãèµ·ããããã³ã³ãã€ã«åäœã®æ倧ã®å šäœçãªæé·ãæå®ããŸã
äžå®ã®äŒæã ããã©ã«ãå€ã¯10ã§ããŠãããã®å¢å ã1.1ã«å¶éããŸãã
å ã®ãµã€ãºã®åã
ã©ãŒãžã¹ã¿ãã¯ãã¬ãŒã
倧ããªã¹ã¿ãã¯ãã¬ãŒã ãæå®ããå¶éã ã¢ã«ãŽãªãºã ã®ã€ã³ã©ã€ã³åãè©Šè¡ãããŠããé
ãã®éçãè¶ ããŠæé·ããããªãããã«ããŸãã ããã©ã«ãå€ã¯256ãã€ãã§ãã
ã©ãŒãžã¹ã¿ãã¯ãã¬ãŒã ã®æé·
ã€ã³ã©ã€ã³åã«ãã£ãŠåŒãèµ·ãããã倧ããªã¹ã¿ãã¯ãã¬ãŒã ã®æ倧æé·ãããŒã»ã³ãã§æå®ããŸãã
ããã©ã«ãå€ã¯1000ã§ã倧ããªã¹ã¿ãã¯ãã¬ãŒã ã®å¢å ã11åã«å¶éããŸãã
ãªãªãžãã«ãµã€ãºã
max-inline-insns-recursive
max-inline-insns-recursive-auto
èªå·±ã®ã¢ãŠããªãã©ã€ã³ã³ããŒã§ããåœä»€ã®æ倧æ°ãæå®ããŸãã
ååž°çã€ã³ã©ã€ã³é¢æ°ã¯ãååž°çã€ã³ã©ã€ã³åãå®è¡ããããšã«ãã£ãŠã«æé·ã§ããŸãã
ã€ã³ã©ã€ã³ã§å®£èšãããé¢æ°ã®å Žåã --ãã©ã¡ãŒã¿ max-inline-insns-recursive ã«åã蟌ãŸããŸã
ã¢ã«ãŠã³ãã ã€ã³ã©ã€ã³ã§å®£èšãããŠããªãé¢æ°ã®å Žåãååž°çãªã€ã³ã©ã€ã³åã¯æ¬¡ã®å Žåã«ã®ã¿çºçããŸã
-finline-é¢æ° ïŒã«å«ãŸãã -O3ïŒãæå¹ã«ãªã£ãŠã㊠--ãã©ã¡ãŒã¿ max-inline-insn-
ååž°èªå 䜿çšãããŠããã ããã©ã«ãå€ã¯450ã§ãã
æ倧ã€ã³ã©ã€ã³å垰深床
æ倧ã€ã³ã©ã€ã³ååž°æ·±ãèªå
ååž°çãªã€ã³ã©ã€ã³åã«äœ¿çšãããæ倧ã®ååž°ã®æ·±ããæå®ããŸãã
ã€ã³ã©ã€ã³ã§å®£èšãããé¢æ°ã®å Žåã --ãã©ã¡ãŒã¿ æ倧ã€ã³ã©ã€ã³å垰深床 ã«åã蟌ãŸããŸã
ã¢ã«ãŠã³ãã ã€ã³ã©ã€ã³ã§å®£èšãããŠããªãé¢æ°ã®å Žåãååž°çãªã€ã³ã©ã€ã³åã¯æ¬¡ã®å Žåã«ã®ã¿çºçããŸã
-finline-é¢æ° ïŒã«å«ãŸãã -O3ïŒãæå¹ã«ãªã£ãŠã㊠--ãã©ã¡ãŒã¿ max-inline-recursive-
ããã¹ãªãŒã 䜿çšãããŠããã ããã©ã«ãå€ã¯8ã§ãã
æå°ã€ã³ã©ã€ã³å垰確ç
ååž°çãªã€ã³ã©ã€ã³åã¯ãååž°ãæ·±ãé¢æ°ã«å¯ŸããŠã®ã¿æçã§ãã
å¹³åçã§ãããååž°ã®æ·±ããã»ãšãã©ãªãé¢æ°ãå¢ããããšã§ãæ©èœãæãªãå¯èœæ§ããããŸãã
ä»ã®ãªããã£ãã€ã¶ã«å¯Ÿããé¢æ°æ¬äœã®ããããŒã°ãµã€ãºãŸãã¯è€éãã
ãããã¡ã€ã«ãã£ãŒãããã¯ãå©çšå¯èœãªå ŽåïŒãåç §ïŒ -fprofile-generateïŒå®éã®ååž°
æ·±ãã¯ãé¢æ°ãç¹å®ã®åŒã³åºããä»ããŠç¹°ãè¿ããã確çããæšæž¬ã§ããŸã
è¡šçŸã ãã®ãã©ã¡ãŒã¿ãŒã¯ãã€ã³ã©ã€ã³åãåŒã³åºãåŒã®ã¿ã«å¶éããŸãã
確çãæå®ããããããå€ïŒããŒã»ã³ãïŒãè¶ ããŠããŸãã ããã©ã«ãå€ã¯10ã§ãã
æ©æã€ã³ã©ã€ã³å-insns
åæã®ã€ã³ã©ã€ããŒãäœæã§ããæé·ãæå®ããŸãã äºå®äžãããã¯éãå¢ãããŸã
æœè±¡åã®ããã«ãã£ã倧ããã³ãŒãã®ã€ã³ã©ã€ã³åã ããã©ã«ãå€ã¯10ã§ãã
max-early-inliner-ã€ãã¬ãŒã·ã§ã³
max-early-inliner-ã€ãã¬ãŒã·ã§ã³
åæã®ã€ã³ã©ã€ããŒã®å埩ã®å¶éã ããã¯åºæ¬çã«
åæã®ã€ã³ã©ã€ããŒã解決ã§ãããã¹ããããéæ¥åŒã³åºãã ããæ·±ããã§ãŒã³ã¯ãŸã ã§ã
é ãã€ã³ã©ã€ã³åã«ãã£ãŠåŠçãããŸãã
comdat å ±æ確ç
comdat å ±æ確ç
comdatã®å¯èŠæ§ãåããC++ã€ã³ã©ã€ã³é¢æ°ã®ç¢ºçïŒããŒã»ã³ãïŒ
è€æ°ã®ã³ã³ãã€ã«ãŠãããéã§å ±æãããŸãã ããã©ã«ãå€ã¯20ã§ãã
min-vect-loop-bound
ã«ãŒãããã¯ãã«åãããªãæå°å埩åæ°
-ftree-ãã¯ãã«å 䜿çšãããŠããã ãã¯ãã«ååŸã®å埩åæ°ã¯ã
ãã¯ãã«åãå¯èœã«ããã«ã¯ããã®ãªãã·ã§ã³ã§æå®ãããå€ããã倧ããããŸãã The
ããã©ã«ãå€ã¯0ã§ãã
gcse ã³ã¹ãè·é¢æ¯
åŒã移åã§ããæ倧è·é¢ã®èšç®ã«ãããã¹ã±ãŒãªã³ã°ä¿æ°
GCSEã®æé©åã ããã¯çŸåšãã³ãŒãå·»ãäžããã¹ã§ã®ã¿ãµããŒããããŠããŸãã
æ¯çã倧ããã»ã©ãåçŽãªã³ãŒãã®å·»ãäžããããç©æ¥µçã«ãªããŸãã
åŒãã€ãŸããã³ã¹ãã gcse-ç¡å¶é-
ã³ã¹ãã 0ãæå®ãããšãåçŽãªåŒã®å·»ãäžããç¡å¹ã«ãªããŸãã ããã©ã«ãå€ã¯
10.
gcse-ç¡å¶éã®ã³ã¹ã
ã³ã¹ãã¯ãXNUMXã€ã®å žåçãªæ©æ¢°åœä»€ã®ã³ã¹ããšããŠå€§ãŸãã«æž¬å®ãããŸãã
ã©ã®GCSEæé©åã¯ãåŒã移åã§ããè·é¢ãå¶çŽããŸããã
ããã¯çŸåšãã³ãŒãå·»ãäžããã¹ã§ã®ã¿ãµããŒããããŠããŸãã ã³ã¹ããäœãã»ã©ã
ããç©æ¥µçãªã³ãŒããã€ã¹ãã§ãã 0ãæå®ãããšããã¹ãŠã®åŒã§æ¬¡ã®ããšãå¯èœã«ãªããŸãã
ç¡å¶éã®è·é¢ã移åããŸãã ããã©ã«ãå€ã¯3ã§ãã
æ倧ãã€ã¹ã深床
ããããŒã¿ãŒããªãŒã§ã®è¡šçŸã®æ€çŽ¢ã®æ·±ãã ããã䜿çšãããŸã
å·»ãäžãã¢ã«ãŽãªãºã ã§ã®äºæ¬¡åäœãåé¿ããããã 0ã®å€ã¯å¶éããŸãã
æ€çŽ¢ã§ã¯ãããã巚倧ãªé¢æ°ã®ã³ã³ãã€ã«ãé ããããããããŸããã ããã©ã«ãå€
30ã§ãã
æ倧æ«å°ŸããŒãžæ¯èŒ
bbãæ¯èŒããé¡äŒŒã®bbã®æ倧éã ããã¯åé¿ããããã«äœ¿çšãããŸã
ããªãŒããŒã«ã®ããŒãžã«ããã10次åäœã ããã©ã«ãå€ã¯XNUMXã§ãã
æ倧æ«å°ŸããŒãžå埩æ°
é¢æ°ã®ãã¹ã®æ倧å埩åæ°ã ããã¯
ããªãŒããŒã«ã®ããŒãžã§ã³ã³ãã€ã«æéãå¶éããŸãã ããã©ã«ãå€ã¯2ã§ãã
max-unrolled-insn
ã«ãŒããå±éããå¿ èŠãããå¯èœæ§ã®ããåœä»€ã®æ倧æ°ã ã«ãŒãã®å Žå
ãå±éãããŠããå Žåããã®ãã©ã¡ãŒã¿ãŒã¯ã«ãŒãã³ãŒãã®åæ°ã決å®ããŸã
å±éã
æ倧平åã¢ã³ããŒã«ãã€ã³SNS
å®è¡ã®ç¢ºçã«ãã£ãŠãã€ã¢ã¹ãããåœä»€ã®æ倧æ°
ã«ãŒããå±éããå¿ èŠãããå ŽåããããŸãã ã«ãŒããå±éãããŠããå Žåããã®ãã©ã¡ãŒã¿ãŒã
ã«ãŒãã³ãŒããå±éãããåæ°ã決å®ããŸãã
æ倧ã¢ã³ããŒã«åæ°
åäžã«ãŒãã®å±éã®æ倧æ°ã
æ倧ç®ããããinsns
ã«ãŒããããŒãªã³ã°ããå¿ èŠãããå¯èœæ§ã®ããåœä»€ã®æ倧æ°ã ã«ãŒãã®å Žå
ãããŒãªã³ã°ãããå Žåããã®ãã©ã¡ãŒã¿ãŒã¯ã«ãŒãã³ãŒããããŒãªã³ã°ãããåæ°ã決å®ããŸãã
æ倧å¥é¢æé
åäžã«ãŒãã®å¥é¢ã®æ倧æ°ã
max-peel-branchs
ããŒãªã³ã°ãããã·ãŒã±ã³ã¹ãéãããããã¹äžã®ãã©ã³ãã®æ倧æ°ã
æ倧å®å šã«ç®ããããinsns
å®å šã«å¥ããããã«ãŒãã®æ倧æ°ã
æ倧å®å šã«å¥ããåæ°
å®å šãªå¥é¢ã«é©ããã«ãŒãã®æ倧å埩åæ°ã
æ倧å®å šããŒã«ã«ãŒããã¹ãæ·±ã
å®å šãªå¥é¢ã«é©ããã«ãŒããã¹ãã®æ倧深ãã
max-unswitch-insn
åãæ¿ããããŠããªãã«ãŒãã®insnsã®æ倧æ°ã
æ倧åãæ¿ãã¬ãã«
XNUMXã€ã®ã«ãŒãã§åãæ¿ããããªããã©ã³ãã®æ倧æ°ã
ãªã é«äŸ¡
ã«ãŒãäžå€æ¡ä»¶ã§ã®é«äŸ¡ãªåŒã®æå°ã³ã¹ãã
iv-èæ ®-ãã¹ãŠã®åè£è -ãã€ã³ã
èªå°å€æ°ã®åè£æ°ã«å¶éãããããããäžåããšãã¹ãŠã®åè£ã
èªå°å€æ°ã®æé©åã§ã®äœ¿çšããšã«èæ ®ãããŸãã ããå Žå
ãããããå€ãã®åè£è ã¯ãæãé¢é£æ§ã®é«ããã®ã ããé¿ãããšèŠãªãããŸã
äºæ¬¡æéèšç®éã
iv-max-æ€èšãããçšé
èªå°å€æ°ã®æé©åã¯ãããå€ãã®èªå°ãå«ãã«ãŒãããããããŸã
å€æ°ã®äœ¿çšã
iv-always-prune-cand-set-bound
ã»ããå ã®åè£ã®æ°ããã®å€ããå°ãªãå Žåã¯ãåžžã«æ¬¡ã®ããšãè©Šã¿ãŠãã ããã
æ°ããivãè¿œå ãããšãã«ãã»ããããäžèŠãªivãåé€ããŸãã
scev-max-expr-size
ã¹ã«ã©ãŒé²åã¢ãã©ã€ã¶ãŒã§äœ¿çšãããåŒã®ãµã€ãºã«å¶éãããŸãã 倧ãã
åŒã¯ã¢ãã©ã€ã¶ãŒãé ãããŸãã
scev-max-expr-è€éã
ã¹ã«ã©ãŒé²åã¢ãã©ã€ã¶ãŒã®åŒã®è€éãã«çžãããŸãã
è€éãªåŒã¯ã¢ãã©ã€ã¶ãŒãé ãããŸãã
ãªã¡ã¬-æ倧-å€æ°
ãªã¡ã¬å¶çŽã·ã¹ãã ã®å€æ°ã®æ倧æ°ã ããã©ã«ãå€
128ã§ãã
ãªã¡ã¬-max-geqs
ãªã¡ã¬å¶çŽã·ã¹ãã ã«ãããäžçåŒã®æ倧æ°ã ããã©ã«ã
å€ã¯256ã§ãã
ãªã¡ã¬-max-eqs
ãªã¡ã¬å¶çŽã·ã¹ãã ã«ãããçåŒã®æ倧æ°ã ããã©ã«ãå€
128ã§ãã
ãªã¡ã¬ããã¯ã¹ã¯ã€ã«ãã«ãŒã
Omegaãœã«ããŒãæ¿å ¥ã§ããã¯ã€ã«ãã«ãŒãå€æ°ã®æ倧æ°ã
ããã©ã«ãå€ã¯18ã§ãã
ãªã¡ã¬ããã·ã¥ããŒãã«ãµã€ãº
ãªã¡ã¬ãœã«ããŒã®ããã·ã¥ããŒãã«ã®ãµã€ãºã ããã©ã«ãå€ã¯550ã§ãã
ãªã¡ã¬ããã¯ã¹ããŒ
ãªã¡ã¬ãœã«ããŒã䜿çšããããŒã®æ倧æ°ã ããã©ã«ãå€ã¯500ã§ãã
ãªã¡ã¬æé€åé·å¶çŽ
1ã«èšå®ããå Žåã¯ãé«äŸ¡ãªæ¹æ³ã䜿çšããŠãåé·ãªå¶çŽããã¹ãŠæé€ããŸãã The
ããã©ã«ãå€ã¯0ã§ãã
vect-max-version-for-alignment-checks
ã«ãŒããå®è¡ãããšãã«å®è¡ã§ããå®è¡æãã§ãã¯ã®æ倧æ°
ãã¯ã¿ãŒåããŒã«ã§ã®ã¢ã©ã€ã¡ã³ãã®ããŒãžã§ã³ç®¡çã
vect-max-version-for-alias-checks
ã«ãŒããå®è¡ãããšãã«å®è¡ã§ããå®è¡æãã§ãã¯ã®æ倧æ°
ãã¯ã¿ãŒåããŒã«ã§ã®ãšã€ãªã¢ã¹ã®ããŒãžã§ã³ç®¡çã
vect-max-pealing-for-alignment
ãã¯ã¿ãŒåæ©èœã®ã¢ã¯ã»ã¹èª¿æŽã匷åããããã®ã«ãŒãããŒã«ã®æ倧æ°ã 䟡å€
-1ã¯ãå¶éãªãããæå³ããŸãã
远跡ããæ倧å埩åæ°
åæã®ããã®ãã«ãŒããã©ãŒã¹ã¢ã«ãŽãªãºã ã®ã«ãŒãã®æ倧å埩åæ°
ã«ãŒãã®å埩åæ°ã®è©äŸ¡ãè©Šã¿ãŸãã
ããã bb ã«ãŠã³ã ws ããŒãã«
åºæ¬ãããã¯ãããã¡ã€ã«ã«ãŠã³ãã¯ããããäžãããããã®ã«å¯äžããå Žåããããã§ãããšèŠãªãããŸã
ãããã¡ã€ã«ãããå®è¡å šäœã®permillageïŒã€ãŸã0 ... 1000ïŒã
ããã bb é »åºŠåæ°
åºæ¬ãããã¯ã®å®è¡ã®ãšã³ããªãããã¯é »åºŠã®äžéšãéžæããŸã
åºæ¬ãããã¯ãäžããããå Žåã®æ©èœã¯ãããããšèŠãªãå¿ èŠããããŸãã
æ倧äºæž¬å埩åæ°
éçã«äºæž¬ããã«ãŒãå埩ã®æ倧æ°ã ããã¯ã§äŸ¿å©ã§ã
é¢æ°ã«æ¢ç¥ã®å¢çãæã€åäžã®ã«ãŒããšå¥ã®ã«ãŒããå«ãŸããŠããå Žå
æªç¥ã®éçãæã€ã æ¢ç¥ã®å埩åæ°ã¯æ£ããäºæž¬ãããŸããã
æªç¥ã®å埩åæ°ã¯å¹³åããŠçŽ10åã§ããããã¯ã«ãŒãã
å¢çã®ãªããã®ã¯ãä»ã®ãã®ã«æ¯ã¹ãŠäººçºçã«å·ããèŠããŸãã
çµã¿èŸŒã¿-æåŸ -確ç
åŒãæå®ãããå€ãæã€ç¢ºçãå¶åŸ¡ããŸãã ãã
ãã©ã¡ãŒã¿ã¯ãå ¥åãšããŠããŒã»ã³ããŒãžïŒã€ãŸãã0 ... 100ïŒãåããŸãã ããã©ã«ãã®ç¢ºç
90ã®ã¯çµéšçã«åŸãããŸãã
調æŽãããå€
ã®åºæ¬ãããã¯ã®å®è¡ã®æå€§é »åºŠã®äžéšãéžæããŸã
åºæ¬ãããã¯ãæŽåãããæ©èœã
æŽåã«ãŒãå埩
å°ãªããšãéžæãããå埩åæ°ãç¹°ãè¿ãããšãæåŸ ãããã«ãŒããæŽåãããŸãã
ãã¬ãŒãµãŒ-åçã«ãã¬ããž
ãã¬ãŒãµãŒ-åçã«ãã¬ããžãã£ãŒãããã¯
ãã®å€ã¯ãæå®ãããããŒã»ã³ããŒãžã®ã¹ãŒããŒãããã¯ã®åœ¢æãå¶éããããã«äœ¿çšãããŸãã
å®è¡ãããåœä»€ãã«ããŒãããŸãã ããã«ãããäžèŠãªã³ãŒããµã€ãºã®æ¡åŒµãå¶éãããŸãã
ãã® ãã¬ãŒãµãŒ-åçã«ãã¬ããžãã£ãŒããã㯠ãããã£ãŒã«ã®ãã£ãŒãããã¯ã
å©çšå¯èœã å®éã®ãããã¡ã€ã« (éçã«æšå®ããããããã¡ã€ã«ãšã¯å¯Ÿç §çã«) ã¯ã
ãã©ã³ã¹ãæªãããããå€ããã倧ããªå€ã«ããããšãã§ããŸãã
ãã¬ãŒãµãŒ-æ倧-ã³ãŒã-æé·
ã³ãŒãã®å¢å ãæå®ã®å²åã«éããããããŒã«ã®éè€ãåæ¢ããŸãã ããã¯
éè€ã®ã»ãšãã©ã¯åŸã§ã¯ãã¹ã§æé€ããããããããªã人工çãªå¶é
ãžã£ã³ããããããå¿ èŠãªã³ãŒãã®å¢å ãããã¯ããã«é«ãå€ã«èšå®ãããå ŽåããããŸãã
ãã¬ãŒãµãŒ-æå°-åå²æ¯
ãã¹ããšããžã®é確çããããããå°ããå Žåã¯ãéæé·ãåæ¢ããŸã
ãããå€ïŒããŒã»ã³ãïŒã
ãã¬ãŒãµãŒ-æå°-åå²æ¯
tracer-min-branch-ratio-ãã£ãŒãããã¯
æè¯ã®ãšããžã®ç¢ºçããã®ãããå€ãããäœãå Žåã¯ãåæ¹æé·ãåæ¢ããŸãã
åæ§ã« ãã¬ãŒãµãŒ-åçã«ãã¬ããž XNUMXã€ã®å€ãååšããŸããXNUMXã€ã¯ã³ã³ãã€ã«çšã§ãã
ãããã¡ã€ã«ãã£ãŒãããã¯çšãšãªãã®ã³ã³ãã€ã«çšã ã³ã³ãã€ã«ã®å€
ãããã¡ã€ã«ã®ãã£ãŒãããã¯ãäœæããã«ã¯ãããä¿å®çïŒããé«ãïŒã«ããå¿ èŠããããŸã
ãã¬ãŒãµãŒãå¹æçã
æ倧 CSE ãã¹é·
CSEãèæ ®ãããã¹äžã®åºæ¬ãããã¯ã®æ倧æ°ã ããã©ã«ãã¯10ã§ãã
max-cse-insn
ãã©ãã·ã¥ããåã«CSEãåŠçããåœä»€ã®æ倧æ°ã ããã©ã«ãã¯
1000.
ggc-min-expand
GCCã¯ãã¬ããŒãžã³ã¬ã¯ã¿ã䜿çšããŠç¬èªã®ã¡ã¢ãªå²ãåœãŠã管çããŸãã ãã®ãã©ã¡ãŒã¿
ã¬ããŒãžã³ã¬ã¯ã¿ãŒã®ããŒãã®æå°ããŒã»ã³ããŒãžãæå®ããŸã
ã³ã¬ã¯ã·ã§ã³éã§æ¡åŒµã§ããŸãã ããã調æŽãããšãã³ã³ãã€ã«é床ãåäžããå¯èœæ§ããããŸãã
ã³ãŒãçæã«ã¯åœ±é¿ããŸããã
ããã©ã«ãã¯30ïŒ + 70ïŒ *ïŒRAM / 1GBïŒã§ãRAM> = 100GBã®å Žåã®äžéã¯1ïŒ ã§ãã
ãgetrlimitãã䜿çšå¯èœãªå ŽåããRAMãã®æŠå¿µã¯å®éã®RAMã®æå°å€ã§ããã
ãRLIMIT_DATAããŸãã¯ãRLIMIT_ASãã GCCãç¹å®ã®RAMãèšç®ã§ããªãå Žå
ãã©ãããã©ãŒã ã§ã¯ã30ïŒ ã®äžéã䜿çšãããŸãã ãã®ãã©ã¡ãŒã¿ã®èšå®ãš ggc-min-
ããŒããµã€ãº ãŒãã«ãããšãããããæ©äŒã«å®å šãªã³ã¬ã¯ã·ã§ã³ãçºçããŸãã ããã¯
éåžžã«é ãã§ããããããã°ã«åœ¹ç«ã€å ŽåããããŸãã
ggc-æå°ããŒããµã€ãº
ã¬ããŒãžã³ã¬ã¯ã¿ãŒãåéãéå§ããåã®ããŒãã®æå°ãµã€ãº
ãã¿ã æåã®ã³ã¬ã¯ã·ã§ã³ã¯ãããŒãã次ã®ããã«æ¡åŒµãããåŸã«çºçããŸã ggc-min-expand%
è¶ã㊠ggc-æå°ããŒããµã€ãºã ç¹°ãè¿ããŸãããããã調æŽãããšãã³ã³ãã€ã«é床ãåäžããå¯èœæ§ããããŸãã
ã³ãŒãçæã«ã¯åœ±é¿ããŸããã
ããã©ã«ãã¯ãRAM / 8ãRLIMIT_RSSããŸãã¯ç¢ºå®ã«ããããšããå¶éã®å°ããæ¹ã§ãã
RLIMIT_DATAãŸãã¯RLIMIT_ASãè¶ ããããšã¯ãããŸããããäžéã¯4096ã§ãã
ïŒ131072ã¡ã¬ãã€ãïŒããã³128ïŒXNUMXã¡ã¬ãã€ãïŒã®äžéã GCCãã§ããªãå Žå
ç¹å®ã®ãã©ãããã©ãŒã ã§RAMãèšç®ããã«ã¯ãäžéã䜿çšãããŸãã ãããèšå®ãã
ãã©ã¡ãŒã¿ãéåžžã«å€§ãããšãã¬ããŒãžã³ã¬ã¯ã·ã§ã³ãå¹æçã«ç¡å¹ã«ãªããŸãã ãããèšå®ãã
ãã©ã¡ãŒã¿ãš ggc-min-expand ãŒãã«ãããšããã¹ãŠã®ã³ã¬ã¯ã·ã§ã³ãçºçããŸã
æ©äŒã
ããã¯ã¹ãªããŒãæ€çŽ¢ã€ã³SNS
åœä»€ã®ãªããŒãã®æ倧æ°ã¯ãåçã®ãã®ãåŸæ¹ã«æ¯ãè¿ãå¿ èŠããããŸã
ç»é²ã å€ã倧ãããããšãããç©æ¥µçãªæé©åãè¡ããã
ã³ã³ãã€ã«æéãé·ããªããããã©ãŒãã³ã¹ããããã«åäžããŸãã ããã©ã«ã
å€ã¯100ã§ãã
max-cselib-memory-locations
cselibãèæ ®ãã¹ãã¡ã¢ãªäœçœ®ã®æ倧æ°ã
å€ã倧ãããããšãããç©æ¥µçãªæé©åãè¡ãããã³ã³ãã€ã«æéãé·ããªããŸãã
ãããããããã«ããã©ãŒãã³ã¹ãåäžããŸãã ããã©ã«ãå€ã¯500ã§ãã
䞊ã¹æ¿ããããã¯è€è£œ
䞊ã¹æ¿ããããã¯éè€ãã£ãŒãããã¯
ç¡æ¡ä»¶ã§äœ¿çšãããã©ããã決å®ããããã«ãåºæ¬ãããã¯äžŠã¹æ¿ããã¹ã§äœ¿çšãããŸã
å®å ã§ã³ãŒããåå²ãŸãã¯è€è£œããŸãã ã³ãŒããéè€ããŠããå Žå
æšå®ãµã€ãºã¯ããã®å€ã«æšå®ãµã€ãºãæããå€ãããå°ãã
ããã°ã©ã ã®ãããã¹ãããã§ç¡æ¡ä»¶ã«ãžã£ã³ãããŸãã
ã㮠䞊ã¹æ¿ããããã¯éè€ãã£ãŒããã㯠ãããã£ãŒã«ã®ãã£ãŒãããã¯ã
å©çšå¯èœã ãããé«ãå€ã«èšå®ãããå ŽåããããŸãã 䞊ã¹æ¿ããããã¯è€è£œ ãã
ãããã¹ãããã«é¢ããæ å ±ã¯ããæ£ç¢ºã§ãã
max-sched-ready-insn
ã¹ã±ãžã¥ãŒã©ãŒãçºè¡ããæºåãã§ããŠããåœä»€ã®æ倧æ°ã¯
æåã®ã¹ã±ãžã¥ãŒãªã³ã°ãã¹äžã®ä»»æã®æç¹ã§æ€èšããŠãã ããã å€ãå¢ãã
ãã培åºçãªæ€çŽ¢ãæå³ããããããã³ã³ãã€ã«æéãé·ããªããŸã
ã¡ãªããã¯ã»ãšãã©ãããŸããã ããã©ã«ãå€ã¯100ã§ãã
æ倧ã¹ã±ãžã¥ãŒã«é åãããã¯æ°
ãããã¯éã§èæ ®ãããé åå ã®ãããã¯ã®æ倧æ°
ã¹ã±ãžã¥ãŒãªã³ã°ã ããã©ã«ãå€ã¯10ã§ãã
æ倧ãã€ãã©ã€ã³é åãããã¯æ°
ã§ãã€ãã©ã€ã³åãæ€èšããé åå ã®ãããã¯ã®æ倧æ°
éžæçã¹ã±ãžã¥ãŒã©ã ããã©ã«ãå€ã¯15ã§ãã
æ倧ã¹ã±ãžã¥ãŒã«é å-insn
ãããã¯éã§èæ ®ãããé åå ã®insnã®æ倧æ°
ã¹ã±ãžã¥ãŒãªã³ã°ã ããã©ã«ãå€ã¯100ã§ãã
æ倧ãã€ãã©ã€ã³é å-insn
ãã€ãã©ã€ã³ã®å¯Ÿè±¡ãšãªãå°åã®insnã®æ倧æ°
éžæçã¹ã±ãžã¥ãŒã©ã ããã©ã«ãå€ã¯200ã§ãã
æå°ã¹ããã¯ç¢ºç
ãããã¯éã§ãœãŒã¹ãããã¯ã«å°éããæå°ç¢ºçïŒããŒã»ã³ãïŒ
ææ©çã¹ã±ãžã¥ãŒãªã³ã°ã ããã©ã«ãå€ã¯40ã§ãã
max-sched-extend-regions-iters
é åãæ¡åŒµããããã®CFGã®æ倧å埩åæ°ã å€0ïŒ
ããã©ã«ãïŒãªãŒãžã§ã³æ¡åŒµãç¡å¹ã«ããŸãã
æ倧ã¹ã±ãžã¥ãŒã«-INSN-競åé 延
ææ©çãªåãã®å¯Ÿè±¡ãšãªãinsnã®æ倧競åé 延ã
ããã©ã«ãå€ã¯3ã§ãã
ã¹ã±ãžã¥ãŒã«ã¹ããã¯ãããã«ãããªã
ææ©çæåã®æå°ç¢ºçïŒããŒã»ã³ãïŒããããã£ãŠææ©ç
insnsãäºå®ãããŠããŸãã ããã©ã«ãå€ã¯40ã§ãã
sched-spec-state-edge-prob-cutoff
ã¹ã±ãžã¥ãŒã©ãç¶æ ãä¿åããããã«ãšããžãæã€å¿ èŠã®ããæå°ç¢ºç
ããã暪åã£ãŠã ããã©ã«ãå€ã¯10ã§ãã
sched-mem-true-dep-cost
åãã¡ã¢ãªã察象ãšããã¹ãã¢ãšããŒãéã®æå°è·é¢ïŒCPUãµã€ã¯ã«åäœïŒ
å Žæã ããã©ã«ãå€ã¯1ã§ãã
selsched-max-å èªã¿
éžæçã¹ã±ãžã¥ãŒãªã³ã°ã®å èªã¿ãŠã£ã³ããŠã®æ倧ãµã€ãºã æ·±ã¿ã§ã
å©çšå¯èœãªæ瀺ã®æ€çŽ¢ã®ã ããã©ã«ãå€ã¯50ã§ãã
selsched-max-sched-times
éžæäžã«åœä»€ãã¹ã±ãžã¥ãŒã«ãããæ倧åæ°
ã¹ã±ãžã¥ãŒãªã³ã°ã ããã¯ãå埩åæ°ã®å¶éã§ãã
åœä»€ã¯ãã€ãã©ã€ã³åãããå ŽåããããŸãã ããã©ã«ãå€ã¯2ã§ãã
selsched-max-insns-to-rename
æºåãªã¹ãã§èæ ®ãããæè¯ã®åœä»€ã®æ倧æ°
éžæã¹ã±ãžã¥ãŒã©ã§ååãå€æŽããŸãã ããã©ã«ãå€ã¯2ã§ãã
sms-å-sc
ã¹ã€ã³ã°ã¢ãžã¥ãã¹ã±ãžã¥ãŒã©ãçæããã¹ããŒãžã«ãŠã³ãã®æå°å€ã ã¶
ããã©ã«ãå€ã¯2ã§ãã
æ倧æåŸã®å€-rtl
åŒã«èšé²ã§ããRTLã®æ°ãšããŠæž¬å®ãããæ倧ãµã€ãº
ãã®ã¬ãžã¹ã¿ã®æåŸã®æ¢ç¥ã®å€ãšããŠã®ç䌌ã¬ãžã¹ã¿ã®ã³ã³ãã€ãã§ã The
ããã©ã«ãã¯10000ã§ãã
æŽæ°å ±æå¶é
å°ããªæŽæ°å®æ°ã¯å ±æããŒã¿æ§é ã䜿çšã§ãããããã³ã³ãã€ã©ã®
ã¡ã¢ãªäœ¿çšéãšãã®é床ã®åäžã ããã«ãããå ±æã®æ倧å€ãèšå®ãããŸã
æŽæ°å®æ°ã ããã©ã«ãå€ã¯256ã§ãã
ssp-ãããã¡ãµã€ãº
ã¹ã¿ãã¯ã¹ããã·ã³ã°ä¿è·ãåãããããã¡ïŒã€ãŸãã¢ã¬ã€ïŒã®æå°ãµã€ãº
ã〠-fstack-ä¿è· 䜿çšãããŠããã
Ubuntu10.10以åã®ãã®ããã©ã«ãã¯ã8ãã§ããã çŸåšã¯ã4ãã§ãã
ã¹ã¿ãã¯ãããã¯ã¿ãŒã«ãã£ãŠä¿è·ãããŠããé¢æ°ã®æ°ã
ã¹ã¿ãã¯å ±æã®æå°ãµã€ãº
ã¹ã¿ãã¯ã¹ãããå ±æã«åå ããŠããªãå Žåã®å€æ°ã®æå°ãµã€ãº
æé©åã ããã©ã«ãå€ã¯32ã§ãã
æ倧ãžã£ã³ãã¹ã¬ããéè€-stmts
ãããã¯ã§èš±å¯ãããã¹ããŒãã¡ã³ãã®æ倧æ°ã
ã¹ã¬ãããžã£ã³ãã
ãã£ãŒã«ãäŸåã®æ倧ãã£ãŒã«ãæ°
äžã«ãã£ãŒã«ãã»ã³ã·ãã£ããªæ¹æ³ã§åŠçãããæ§é å ã®ãã£ãŒã«ãã®æ倧æ°
ãã€ã³ã¿åæã ããã©ã«ãã¯ãŒãã§ã -O0 ãš -O1ãããã³100 -ãªã¹, -O2,
-O3.
ããªãã§ããã¬ã€ãã³ã·
ããªãã§ããåã«å®è¡ãããåœä»€ã®å¹³åæ°ãèŠç©ãã
çµäºããŸãã ããªãã§ãããããè·é¢ã¯ããã®å®æ°ã«æ¯äŸããŸãã
ãã®æ°ãå¢ãããšãããªãã§ãããããã¹ããªãŒã ãå°ãªããªãå¯èœæ§ããããŸãïŒãåç §ïŒã
åæããªãã§ãã).
åæããªãã§ãã
åæã«å®è¡ã§ããããªãã§ããã®æ倧æ°ã
l1-ãã£ãã·ã¥ã©ã€ã³ãµã€ãº
L1ãã£ãã·ã¥ã®ãã£ãã·ã¥ã©ã€ã³ã®ãµã€ãºïŒãã€ãåäœïŒã
l1-ãã£ãã·ã¥ãµã€ãº
L1ãã£ãã·ã¥ã®ãµã€ãºïŒãããã€ãåäœïŒã
l2-ãã£ãã·ã¥ãµã€ãº
L2ãã£ãã·ã¥ã®ãµã€ãºïŒãããã€ãåäœïŒã
æå°ã€ã³ã¹å¯Ÿããªãã§ããæ¯
åœä»€æ°ãšããªãã§ããæ°ã®æå°æ¯ç
ã«ãŒãã§ã®ããªãã§ãããæå¹ã«ããŸãã
ããªãã§ããæå° insn 察 mem æ¯
åœä»€æ°ãšã¡ã¢ãªæ°ã®æå°æ¯ç
ã«ãŒãã§ã®ããªãã§ãããæå¹ã«ããããã®åç §ã
䜿çšæ£èŠå
ã³ã³ãã€ã©ããæ£èŠãåã·ã¹ãã ã䜿çšããå¿ èŠããããã©ããã ããã©ã«ãã§ã¯ããã
åžžã«1ã§ããå¿ èŠããããŸããããã¯ãæ¯èŒã®ããã«ããå¹ççãªå éšã¡ã«ããºã ã䜿çšããŸãã
C++ããã³Objective-C++ã®ã¿ã€ãã ãã ããæ£èŠåã·ã¹ãã ã®ãã°ã
ã³ã³ãã€ã«ã倱æããå Žåã¯ããã®å€ã0ã«èšå®ããŠãæ£èŠåãç¡å¹ã«ããŸãã
ã¹ã€ããå€ææ倧åå²æ¯
ã¹ã€ããåæåå€æã¯ããã倧ããé åã®äœæãæåŠããŸã
ã¹ã€ããå€ææ倧åå²æ¯ ã¹ã€ããã®ãã©ã³ãæ°ã®åã
æ倧éšåã¢ã³ãã£ãã¯é·
ããªãŒããŒã·ã£ã«äžã«èšç®ãããããŒã·ã£ã«ã¢ã³ãã£ãã¯ã»ããã®æ倧é·
åé·æ§é€å»ã®æé©åïŒ-ftree-preïŒã§æé©åããå Žå -O3 以äžã
ããçš®ã®ãœãŒã¹ã³ãŒãã§ã¯ãéšååé·æ§ã®æé€ã匷åãããŠããŸã
æé©åãå®è¡ããããã¹ãã§äœ¿çšå¯èœãªãã¹ãŠã®ã¡ã¢ãªãæ¶è²»ãããå¯èœæ§ããããŸã
æ©æ¢°ã ãã®ãã©ã¡ãŒã¿ãŒã¯ãèšç®ãããã»ããã®é·ãã«å¶éãèšå®ããŸãã
æŽèµ°ãé²ããŸãã ãã®ãã©ã¡ãŒã¿ãŒã«å€0ãèšå®ãã
ç¡å¶éã®ã»ããé·ãèš±å¯ããŸãã
sccvn-æ倧-scc-ãµã€ãº
SCCVNåŠçäžã®åŒ·é£çµæåïŒSCCïŒã®æ倧ãµã€ãºã ããã
ãã®å¶éã«éããå Žåãé¢æ°å šäœã®SCCVNåŠçã¯å®è¡ãããã
ããã«å¿ããæé©åã¯ç¡å¹ã«ãªããŸãã ããã©ã«ãã®æ倧SCCãµã€ãºã¯
10000.
sccvn-max-alias-queries-per-access
åé·æ§ãæ¢ããšãã«å®è¡ããalias-oracleã¯ãšãªã®æ倧æ°
ããŒããšã¹ãã¢çšã ãã®å¶éã«éããå Žåãæ€çŽ¢ã¯äžæ¢ãããããŒããŸãã¯
ã¹ãã¢ã¯åé·ãšã¯èŠãªãããŸããã ã¯ãšãªã®æ°ã¯ã¢ã«ãŽãªãºã ã«ãããã®ã§ã
ããŒãããé¢æ°ãšã³ããªãŸã§ã®ãã¹ãŠã®ãã¹ã®ã¹ãã¢ã®æ°ã«å¶éãããŸãã
ã¯ãšãªã®ããã©ã«ãã®æ倧æ°ã¯1000ã§ãã
ira æ倧ã«ãŒãæ°
IRAã¯ãããã©ã«ãã§å°åã¬ãžã¹ã¿å²ãåœãŠã䜿çšããŸãã é¢æ°ã«ããã«å«ãŸããŠããå Žå
ãã®ãã©ã¡ãŒã¿ã§æå®ãããæ°ãããå€ãã®å Žåãæå®ãããæ°ã®ã«ãŒãã®ã¿
æãé »ç¹ã«å®è¡ãããã«ãŒãã¯ãå°åã¬ãžã¹ã¿å²ãåœãŠçšã®é åã圢æããŸãã
ãã©ã¡ãŒã¿ã®ããã©ã«ãå€ã¯100ã§ãã
ira-max-競åããŒãã«ãµã€ãº
IRAã¯é«åºŠãªã¢ã«ãŽãªãºã ã䜿çšããŠç«¶åããŒãã«ãå§çž®ããŸããã
ããŒãã«ã¯ã巚倧ãªæ©èœã®ããã«äŸç¶ãšããŠéå°ãªéã®ã¡ã¢ãªãå¿ èŠãšããå¯èœæ§ããããŸãã ã®å Žå
é¢æ°ã®ç«¶åããŒãã«ã¯ãããã«ãã£ãŠæå®ãããMBåäœã®ãµã€ãºãè¶ ããå¯èœæ§ããããŸã
ãã©ã¡ãŒã¿ã®å Žåãã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã¯ä»£ããã«ãããéããããåçŽã§ãããäœããã®ã䜿çšããŸã-
ç䌌ã¬ãžã¹ã¿ç«¶åããŒãã«ãäœæããå¿ èŠã®ãªãé«å質ã®ã¢ã«ãŽãªãºã ã
ãã©ã¡ãŒã¿ã®ããã©ã«ãå€ã¯2000ã§ãã
ira-loop-reserved-regs
IRAã䜿çšããŠã決å®ã®ããã®ã«ãŒãå ã®ããæ£ç¢ºãªã¬ãžã¹ã¿ãŒå§åãè©äŸ¡ã§ããŸãã
ã«ãŒãäžå€æ¡ä»¶ã移åããã«ã¯ïŒãåç §ïŒ -O3ïŒã äºçŽãããŠãã䜿çšå¯èœãªã¬ãžã¹ã¿ã®æ°
ä»ã®ããã€ãã®ç®çã¯ããã®ãã©ã¡ãŒã¿ãŒã«ãã£ãŠäžããããŸãã ã®ããã©ã«ãå€
ãã©ã¡ãŒã¿ã¯2ã§ããããã¯ãéåžžå¿ èŠãªã¬ãžã¹ã¿ã®æå°æ°ã§ãã
æ瀺ã ãã®å€ã¯ãå€ãã®å®éšããæãããããããŸãã
ã«ãŒãäžå€ã®æ倧BBSã€ã³ã«ãŒã
ã«ãŒãäžå€ã¢ãŒã·ã§ã³ã¯ãã³ã³ãã€ã«æéãšã³ã³ãã€ã«æéã®äž¡æ¹ã§éåžžã«ã³ã¹ãããããå¯èœæ§ããããŸã
éåžžã«å€§ããªã«ãŒãã䌎ããå¿ èŠãªã³ã³ãã€ã«æã¡ã¢ãªã®éã ããå€ãã®ã«ãŒã
ãã®ãã©ã¡ãŒã¿ãããåºæ¬çãªãããã¯ã«ã¯ãã«ãŒãäžå€ã®ã¢ãŒã·ã§ã³æé©åã¯ãããŸãã
ãããã«å®è¡ãããŸãã ãã©ã¡ãŒã¿ã®ããã©ã«ãå€ã¯1000ã§ãã -O1 ãããŠã10000
for -O2 以äžã
datadeps ã®ã«ãŒãæ倧ããŒã¿åç §
éåžžã«å€§ããªã«ãŒãã®å ŽåãããŒã¿ã®äŸåé¢ä¿ãæ§ç¯ããã«ã¯ã³ã¹ããããããŸãã ãã®ãã©ã¡ãŒã¿
ããŒã¿ãšèŠãªãããã«ãŒãå ã®ããŒã¿åç §ã®æ°ãå¶éããŸã
äŸåé¢ä¿åæã ãããã®å€§ããªã«ãŒãã¯ãã䜿çšããæé©åã§ã¯åŠçãããŸãã
ã«ãŒãããŒã¿ã®äŸåé¢ä¿ã ããã©ã«ãå€ã¯1000ã§ãã
æ倧vartrackãµã€ãº
å¯å€ãã©ããã³ã°ããŒã¿ãããŒäžã«äœ¿çšããããã·ã¥ããŒãã«ã¹ãããã®æ倧æ°ãèšå®ããŸã
ä»»æã®æ©èœã®åæã ã§ã®å¯å€ãã©ããã³ã°ã§ãã®å¶éãè¶ ããå Žå
å²ãåœãŠãæå¹ã«ãªã£ãŠããå Žåããã®é¢æ°ã®åæã¯ãå²ãåœãŠãªãã§åè©Šè¡ãããŸãã
é¢æ°ãããã¹ãŠã®ãããã°ã€ã³ãåé€ããŸãã ãªããŠãå¶éãè¶ ããå Žå
ãããã°insnsãå€æ°è¿œè·¡åæã¯é¢æ°ã«å¯ŸããŠå®å šã«ç¡å¹ã«ãªã£ãŠããŸãã
ãã©ã¡ãŒã¿ããŒãã«èšå®ãããšãç¡å¶éã«ãªããŸãã
max-vartrack-expr- Depth
å€æ°åããããããããšãããšãã®ååž°ã¬ãã«ã®æ倧æ°ãèšå®ããŸãã
åŒãè©äŸ¡ããããã«äžæããããã°ããŸãã ããã«ãããã³ã³ãã€ã«æéãããã«ççž®ãããŸã
å®å šãªãããã°æ å ±ã ãããäœãèšå®ãããããšã次ã®ãããªå€ã®åŒã«ãªããŸãã
å©çšå¯èœã§ããããããã°æ å ±ã§è¡šãããšãã§ãã䜿çšãããªããªãå¯èœæ§ããããŸãã
ãããé«ãèšå®ãããšãã³ã³ãã€ã©ãããè€éãªãããã°ãèŠã€ããããšãã§ããå ŽåããããŸã
åŒã§ãããã³ã³ãã€ã«æéãšã¡ã¢ãªäœ¿çšéãå¢ããå¯èœæ§ããããŸãã ããã©ã«ãã¯12ã§ãã
min-nondebug-insn-uid
éãããã°insnsã«ã¯ããã®ãã©ã¡ãŒã¿ãŒã§å§ãŸãuidã䜿çšããŸãã 以äžã®ç¯å²
ãã©ã¡ãŒã¿ã¯ãã«ãã£ãŠäœæããããããã°insnså°çšã«äºçŽãããŠããŸã
-fvar-远跡-å²ãåœãŠããã ããdebug insnsã¯äžèšã®ïŒéè€ããªãïŒuidãååŸããå ŽåããããŸã
äºçŽç¯å²ã䜿ãæãããå Žåã
ipa-sra-ptr-æé·å å
IPA-SRAã¯ãã¢ã°ãªã²ãŒããžã®ãã€ã³ã¿ãŒãXNUMXã€ä»¥äžã®æ°ãããã©ã¡ãŒã¿ãŒã®ã¿ã«çœ®ãæããŸã
环ç©ãµã€ãºã以äžã®å Žå ipa-sra-ptr-æé·å å å
å ã®ãã€ã³ã¿ãã©ã¡ãŒã¿ã®ãµã€ãºã
tm-max-éèšãµã€ãº
ãã©ã³ã¶ã¯ã·ã§ã³ã§ã¹ã¬ããããŒã«ã«å€æ°ã®ã³ããŒãäœæããå Žåããã®ãã©ã¡ãŒã¿ãŒ
å€æ°ããã®ã³ã°ãšãšãã«ä¿åããããŸã§ã®ãµã€ãºããã€ãåäœã§æå®ããŸã
ã³ãŒãã·ãŒã±ã³ã¹ãã¢ã®ä¿å/埩å ãšã¯å¯Ÿç §çã«æ©èœããŸãã ãã®ãªãã·ã§ã³ã®ã¿
䜿çšæã«é©çšãããŸã -fgnu-tm.
ã°ã©ãã¡ã€ã-max-nb-scop-params
ã°ã©ãã¡ã€ãã«ãŒãå€æã§ã®ææ°å¹æãåé¿ããããã«ã
éçå¶åŸ¡ããŒãïŒSCoPïŒã®ãã©ã¡ãŒã¿ãŒã«ã¯å¶éããããŸãã ããã©ã«ãå€ã¯10ã§ã
ãã©ã¡ãŒã¿ãŒã ã³ã³ãã€ã«æã«å€ãäžæã§å®çŸ©ãããŠããå€æ°
SCoPã®å€åŽã¯ãSCoPã®ãã©ã¡ãŒã¿ãŒã§ãã
é¢æ°ããšã®graphite-max-bbs
SCoPã®æ€åºã«ãããææ°é¢æ°çãªåœ±é¿ãåé¿ããããã«ãé¢æ°ã®ãµã€ãº
ã°ã©ãã¡ã€ãã«ãã£ãŠåæããããã®ã«ã¯éçããããŸãã ããã©ã«ãå€ã¯100åºæ¬ãããã¯ã§ãã
ã«ãŒã ããã㯠ã¿ã€ã« ãµã€ãº
ã«ãŒãããããã³ã°ãŸãã¯ã¹ããªãããã€ãã³ã°å€æã -floop-ããã㯠or
-floop-strip-mineãã«ãŒããã¹ãå ã®åã«ãŒããæå®ãããæ°ã ãã¹ããªãããã€ãã³ã°ããŸã
å埩ã ã¹ããªããã®é·ãã¯ã ã«ãŒã ããã㯠ã¿ã€ã« ãµã€ãº
ãã©ã¡ãŒã¿ã ããã©ã«ãå€ã¯51åã®å埩ã§ãã
ipa-cp-å€ãªã¹ãã®ãµã€ãº
IPA-CPã¯ãé¢æ°ã«æž¡ããããã¹ãŠã®å¯èœãªå€ãšã¿ã€ãã远跡ããããšããŸã
ããããäŒæããä»®æ³å解é€ãå®è¡ããããã®ãã©ã¡ãŒã¿ã ipa-cp-å€-
ãªã¹ããµã€ãº XNUMXã€ã®ãã©ãŒãã«ããšã«æ ŒçŽããå€ãšã¿ã€ãã®æ倧æ°ã§ã
é¢æ°ã®ãã©ã¡ãŒã¿ã
ipa-cp-eval-ãããå€
IPA-CPã¯ãã¯ããŒã³äœæã®åçæ§ãã¥ãŒãªã¹ãã£ãã¯ã®ç¬èªã®ã¹ã³ã¢ãèšç®ããå®è¡ããŸã
ã¹ã³ã¢ããè¶ ããã¯ããŒã³äœæã®æ©äŒ ipa-cp-eval-ãããå€.
ipa-max-agg-items
IPA-CPã¯ãæž¡ãããå€æ°ã®ã¹ã«ã©ãŒå€ãäŒæããããšãã§ããŸãã
éèšã ipa-max-agg-items XNUMXã€ãããã®ãã®ãããªå€ã®æ倧æ°ãå¶åŸ¡ããŸã
ãã©ã¡ãŒã¿ã«äžèŽããæåã®ããã€ã¹ã®ãªã¢ãŒãã³ã³ãããŒã« URL ãè¿ããŸãã
ipa-cp-ã«ãŒããã³ã-ããŒãã¹
IPA-CPããã¯ããŒã³åè£ã
æ¢ç¥ã®ã«ãŒãã®å埩ãããã¯ããŒãã¹ãè¿œå ããŸã ipa-cp-ã«ãŒããã³ã-ããŒãã¹ ãžã®ããŒãã¹
åè£è ã®åçæ§ã¹ã³ã¢ã
ipa-cp-array-index-hint-bonus
IPA-CPããã¯ããŒã³åè£ãã¢ã¬ã€ã®ã€ã³ããã¯ã¹ãäœæãããšå€æããå Žå
æ¢ç¥ã®ã¢ã¯ã»ã¹ãããã¯ã®ããŒãã¹ãè¿œå ããŸã ipa-cp-array-index-hint-bonus ãžã®ããŒãã¹
åè£è ã®åçæ§ã¹ã³ã¢ã
lto ããŒãã£ã·ã§ã³
WHOPRã®ã³ã³ãã€ã«äžã«çæãããããŒãã£ã·ã§ã³ã®å¿ èŠãªæ°ãæå®ããŸãã The
ããŒãã£ã·ã§ã³ã®æ°ã¯ãã³ã³ãã€ã«ã«äœ¿çšãããCPUã®æ°ãè¶ ããå¿ èŠããããŸãã The
ããã©ã«ãå€ã¯32ã§ãã
lto-minããŒãã£ã·ã§ã³
WHOPRã®æå°ããŒãã£ã·ã§ã³ã®ãµã€ãºïŒæšå®åœä»€ïŒã ããã¯é²æ¢ããŸã
éåžžã«å°ããªããã°ã©ã ãããŸãã«ãå€ãã®ããŒãã£ã·ã§ã³ã«åå²ããè²»çšã
cxx-max-namespaces-for-diagnostic-help
C++ã®ååæ€çŽ¢æã«ææ¡ãåç §ããããã®åå空éã®æ倧æ°
èå¥åã«å€±æããŸãã ããã©ã«ãã¯1000ã§ãã
ã·ã³ã¯-åšæ³¢æ°-ãããå€
ã¿ãŒã²ãããããã¯ã®æ倧çžå¯Ÿå®è¡é »åºŠïŒããŒã»ã³ãïŒ
ã¹ããŒãã¡ã³ãã®å ã®ãããã¯ãšæ¯èŒããŠãã¹ããŒãã¡ã³ãã®ã·ã³ã¯ãå¯èœã«ããŸã
声æã æ°å€ã倧ããã»ã©ãã¹ããŒãã¡ã³ãã®æ²äžãããç©æ¥µçã«ãªããŸãã The
ããã©ã«ãå€ã¯75ã§ããå°ããªæ£ã®èª¿æŽã次ã®ã¹ããŒãã¡ã³ãã«é©çšãããŸãã
ã¡ã¢ãªãªãã©ã³ãã¯ããã«åçæ§ãé«ããããã·ã³ã¯ããŸãã
ã·ã³ã¯ãŸã§ã®æ倧ã¹ãã¢æ°
æ²ããããšãã§ããæ¡ä»¶ä»ãã¹ãã¢ã®ãã¢ã®æ倧æ°ã 次ã®å Žåã¯0ã«èšå®ããŸã
ããããã®ãã¯ãã«åïŒ-ftree-ãã¯ãã«åïŒãŸãã¯if-conversionïŒ-ftree-ã«ãŒã-if-convert)
ç¡å¹ã«ãªã£ãŠããŸãã ããã©ã«ãã¯2ã§ãã
èš±å¯ããŒãããŒã¿ã¬ãŒã¹
ãªããã£ãã€ã¶ãŒãããŒãæã«æ°ããããŒã¿ç«¶åãå°å ¥ã§ããããã«ããŸãã èš±å¯ããã«ã¯ 1 ã«èšå®ããŸãã
ãã以å€ã®å Žå㯠0 ã§ãã
-fmemory-ã¢ãã«= ãªãã·ã§ã³ãéžæããŸãã
ã¹ã㢠ããŒã¿ ã¬ãŒã¹ãèš±å¯ããŸãã
ãªããã£ãã€ã¶ãã¹ãã¢ã«æ°ããããŒã¿ç«¶åãå°å ¥ã§ããããã«ããŸãã èš±å¯ããã«ã¯1ã«èšå®ããŸãã
ãã以å€ã®å Žå㯠0 ã§ãã
-fmemory-ã¢ãã«= ãªãã·ã§ã³ãéžæããŸãã
ããã¯ããŒãããŒã¿ã¬ãŒã¹ãèš±å¯ãã
ãªããã£ãã€ã¶ãŒãããã¯ãããããŒã¿ã®ããŒãã§æ°ããããŒã¿ç«¶åãå°å ¥ã§ããããã«ããŸãã 1 ïœ ã«èšå®
allowããã以å€ã®å Žå㯠0ã
ã -fmemory-ã¢ãã«= ãªãã·ã§ã³ãéžæããŸãã
ããã¯ã¹ãã¢ããŒã¿ã¬ãŒã¹ã®èš±å¯
ãªããã£ãã€ã¶ãŒãããã¯ãããããŒã¿ ã¹ãã¢ã«æ°ããããŒã¿ç«¶åãå°å ¥ã§ããããã«ããŸãã 1 ïœ ã«èšå®
allowããã以å€ã®å Žå㯠0ã
ã -fmemory-ã¢ãã«= ãªãã·ã§ã³ãéžæããŸãã
ã±ãŒã¹å€-ãããå€
ãžã£ã³ãããŒãã«ã䜿çšããã®ã«æé©ãªç°ãªãå€ã®æå°æ°
æ¡ä»¶ä»ããã©ã³ãã®ããªãŒã®ä»£ããã«ã å€ã0ã®å Žåãããã©ã«ãã䜿çšããŸã
ãã®æ©æ¢°ã ããã©ã«ãã¯0ã§ãã
ããªãŒåçµåå¹
åé¢é£ä»ããããããªãŒã§äžŠè¡ããŠå®è¡ãããåœä»€ã®æ倧æ°ãèšå®ããŸãã
ãã®ãã©ã¡ãŒã¿ã¯ãããã©ã«ãã§äœ¿çšãããã¿ãŒã²ããäŸåã®ãã¥ãŒãªã¹ãã£ãã¯ããªãŒããŒã©ã€ãããŸãã
ãŒãå€ã
ã¹ã±ãžã¥ãŒã«å§åã¢ã«ãŽãªãºã
ã®XNUMXã€ã®å©çšå¯èœãªå®è£ ããéžæããŸã -fsched-å§åã ã¢ã«ãŽãªãºã 1
ã¯å ã®å®è£ ã§ããã
å泚æãããŠããŸãã ã¢ã«ãŽãªãºã 2ã¯ã
ã¢ã«ãŽãªãºã 1ã«ãã£ãŠæ¡çšãããæ¯èŒçä¿å®çãªã¢ãããŒããšãããªãç©æ¥µçãªã¢ãããŒã
ããã©ã«ãã®ã¹ã±ãžã¥ãŒã©ãŒãæ¡çšããã¢ãããŒãã ããã¯ãã倧ããäŸåããŠããŸã
éåžžã®ã¬ãžã¹ã¿ãã¡ã€ã«ãšæ£ç¢ºãªã¬ãžã¹ã¿å§åã¯ã©ã¹ã èŠã ãã€ãã¡-sched.c
詳现ã«ã€ããŠã¯ãGCCãœãŒã¹ãåç §ããŠãã ããã
ããã©ã«ãã®éžæã¯ã¿ãŒã²ããã«ãã£ãŠç°ãªããŸãã
max-slsr-cand-scan
ã·ãŒã¯æã«èæ ®ãããæ¢åã®åè£ã®æ倧æ°ãèšå®ããŸã
æ°ããçŽç·åŒ·åºŠåæžåè£ã®åºç€ã
asanã°ããŒãã«
ã°ããŒãã«ãªããžã§ã¯ãã®ãããã¡ãªãŒããŒãããŒæ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯
䜿çšããŠããå Žåã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -fsanitize = address ãªãã·ã§ã³ã ã°ããŒãã«ãç¡å¹ã«ããã«ã¯
ãªããžã§ã¯ãä¿è·ã®äœ¿çš --ãã©ã¡ãŒã¿ asan-globals = 0.
asan-ã¹ã¿ãã¯
ã¹ã¿ãã¯ãªããžã§ã¯ãã®ãããã¡ãªãŒããŒãããŒæ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯
䜿çšæã«ããã©ã«ãã§æå¹-fsanitize = addressã ã¹ã¿ãã¯ä¿è·ã®äœ¿çšãç¡å¹ã«ããã«ã¯
--ãã©ã¡ãŒã¿ asan-stack = 0 ãªãã·ã§ã³ãéžæããŸãã
asan-instrument-reads
ã¡ã¢ãªèªã¿åãã®ãããã¡ãªãŒããŒãããŒæ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯
䜿çšæã«ããã©ã«ãã§æå¹ -fsanitize = addressã ã¡ã¢ãªèªã¿åããç¡å¹ã«ããã«ã¯
ä¿è·ã®äœ¿çš --ãã©ã¡ãŒã¿ asan-instrument-reads = 0.
asan-楜åš-æžã蟌ã¿
ã¡ã¢ãªæžã蟌ã¿ã®ãããã¡ãªãŒããŒãããŒæ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯
䜿çšæã«ããã©ã«ãã§æå¹ -fsanitize = addressã ã¡ã¢ãªæžã蟌ã¿ãç¡å¹ã«ããã«ã¯
ä¿è·ã®äœ¿çš --ãã©ã¡ãŒã¿ asan-instrument-writes = 0 ãªãã·ã§ã³ãéžæããŸãã
ã¢ãµã³ã¡ãã³ããªã³
çµã¿èŸŒã¿é¢æ°ã®æ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯ã«ãã£ãŠå¯èœã«ãªããŸã
䜿çšæã®ããã©ã«ã -fsanitize = addressã çµã¿èŸŒã¿é¢æ°ã®ä¿è·ãç¡å¹ã«ããã«ã¯
ã€ãããŸã --ãã©ã¡ãŒã¿ asan-memintrin = 0.
è¿ååŸã®äœ¿çš
è¿ååŸäœ¿çšã®æ€åºãæå¹ã«ããŸãã ãã®çš®ã®ä¿è·ã¯ã«ãã£ãŠå¯èœã«ãªããŸã
䜿çšæã®ããã©ã«ã -fsanitize = address ãªãã·ã§ã³ã è¿ååŸã®äœ¿çšãç¡å¹ã«ããã«ã¯
æ€åºçšé --ãã©ã¡ãŒã¿ asan-use-after-return = 0.
asan-instrumentation-with-call-threshold
ã€ã³ã¹ãã«ã¡ã³ããããŠããé¢æ°ã®ã¡ã¢ãªã¢ã¯ã»ã¹æ°ã以äžã®å Žå
ãã®æ°ã¯ãã€ã³ã©ã€ã³ãã§ãã¯ã®ä»£ããã«ã³ãŒã«ããã¯ã䜿çšããŸãã ã€ã³ã©ã€ã³ã³ãŒããç¡å¹ã«ããäŸ
ã€ãããŸã --ãã©ã¡ãŒã¿ asan-instrumentation-with-call-threshold = 0.
ãªãã·ã§ã³ å¶åŸ¡ ã ããªããã»ããµ
ãããã®ãªãã·ã§ã³ã¯ãå®éã®åã«åCãœãŒã¹ãã¡ã€ã«ã§å®è¡ãããCããªããã»ããµãå¶åŸ¡ããŸã
ã³ã³ãã€ã«ã
ããªãã䜿çšããŠããå Žå -E ãªãã·ã§ã³ã®å ŽåãååŠç以å€ã¯äœãè¡ãããŸããã ãããã®ãªãã·ã§ã³ã®ããã€ã
ãšäžç·ã«ã®ã¿æå³ããªã -E ããªããã»ããµã®åºåã
å®éã®ã³ã³ãã€ã«ã«ã¯é©ããŠããŸããã
-Wpããªãã·ã§ã³
ããªãã䜿çšããããšãã§ããŸã -Wpããªãã·ã§ã³ ã³ã³ãã€ã©ãã©ã€ãããã€ãã¹ããŠæž¡ã ãªãã·ã§ã³ çŽæ¥ã¹ã«ãŒ
ããªããã»ããµã«ã ããã ãªãã·ã§ã³ ã«ã³ããå«ãŸããã§è€æ°ã®ãªãã·ã§ã³ã«åå²ãããŸã
ã«ã³ãã ãã ããå€ãã®ãªãã·ã§ã³ã¯ãã«ãã£ãŠå€æŽã翻蚳ããŸãã¯è§£éãããŸãã
ããªããã»ããµã«æž¡ãããåã®ã³ã³ãã€ã©ãã©ã€ããããã³ -Wp 匷å¶çã«ãã€ãã¹ãã
ãã®ãã§ãŒãºã ããªããã»ããµã®çŽæ¥ã€ã³ã¿ãŒãã§ã€ã¹ã¯ææžåãããŠãããã
å€æŽããã®ã§ãå¯èœãªéã䜿çšãé¿ããå¿ èŠããããŸã -Wp ãã©ã€ããŒã«åŠçãããŸã
代ããã«ãªãã·ã§ã³ã
-Xããªããã»ããµ ãªãã·ã§ã³
åæ Œ ãªãã·ã§ã³ ããªããã»ããµã®ãªãã·ã§ã³ãšããŠã ããã䜿çšããŠã·ã¹ãã ãäŸçµŠããããšãã§ããŸã-
GCCãèªèããªãç¹å®ã®ããªããã»ããµãªãã·ã§ã³ã
åŒæ°ãåããªãã·ã§ã³ãæž¡ãããå Žåã¯ã次ã䜿çšããå¿ èŠããããŸã -Xããªããã»ããµ
XNUMXåããªãã·ã§ã³çšã«XNUMXåãåŒæ°çšã«XNUMXåã
-çµ±åãããŠããªã-cpp
ã³ã³ãã€ã«åã«ãå¥ã®ãã¹ãšããŠååŠçãå®è¡ããŸãã ããã©ã«ãã§ã¯ãGCCã¯
å ¥åããŒã¯ã³åãšè§£æã®çµ±åãããéšåãšããŠã®ååŠçã ãã®ãªãã·ã§ã³ã®å Žå
æäŸãããŠããå Žåãé©åãªèšèªã®ããã³ããšã³ãïŒcc1, cc1ãã©ã¹ãŸã㯠cc1obj CãC ++ã®å Žåã
ããã³Objective-CïŒã¯ã代ããã«XNUMXååŒã³åºãããŸããXNUMXåã¯ååŠçã®ã¿ã§ãã
ååŠçãããå ¥åã®å®éã®ã³ã³ãã€ã«çšã«XNUMXåã ãã®ãªãã·ã§ã³ã¯äŸ¿å©ãããããŸãã
ãšäžç·ã« -B or -ã©ãã㌠代æ¿ããªããã»ããµãæå®ãããªãã·ã§ã³ãŸãã¯
éåžžã®ååŠçãšã®éã«ããã°ã©ã ãœãŒã¹ã®è¿œå åŠçãå®è¡ããŸã
ã³ã³ãã€ã«ã
-D å
äºåå®çŸ© å å®çŸ©1ã®ãã¯ããšããŠã
-D å=å®çŸ©
ã®å 容 å®çŸ© ããŒã¯ã³åããã
翻蚳ãã§ãŒãºXNUMX #å®çŸ©ãã æ什ã ç¹ã«ãå®çŸ©ã¯æ¬¡ã®ããã«ãªããŸã
åã蟌ãŸããæ¹è¡æåã«ãã£ãŠåãæšãŠãããŸãã
ã·ã§ã«ãŸãã¯ã·ã§ã«ã®ãããªããã°ã©ã ããããªããã»ããµãåŒã³åºãå Žåã¯ãå¿ èŠã«ãªãããšããããŸã
ã·ã§ã«ã®åŒçšæ§æã䜿çšããŠãã¹ããŒã¹ãªã©ã®æåãä¿è·ããŸãã
ã·ã§ã«æ§æã§ã®æå³ã
ã³ãã³ãã©ã€ã³ã§é¢æ°ã®ãããªãã¯ããå®çŸ©ããå Žåã¯ããã®åŒæ°ãèšè¿°ããŸã
çå·ïŒååšããå ŽåïŒã®åã«æ¬åŒ§ãä»ããŠãªã¹ãããŸãã æ¬åŒ§ã¯
ã»ãšãã©ã®ã·ã§ã«ã«ãšã£ãŠæå³ãããã®ã§ããªãã·ã§ã³ãåŒçšããå¿ èŠããããŸãã ãš sh ãš CSH,
-NS'å(åŒæ°..ã)=å®çŸ©' äœåã
-D ãš -U ãªãã·ã§ã³ã¯ãã³ãã³ãã©ã€ã³ã§æå®ãããé åºã§åŠçãããŸãã å šãŠ
-ã€ãã¯ãã¹ file ãš -å«ãã file ãªãã·ã§ã³ã¯çµå±åŠçãããŸã -D ãš -U ãªãã·ã§ã³ã
-U å
以åã®å®çŸ©ããã£ã³ã»ã«ããŸã åãçµã¿èŸŒã¿ãŸãã¯ä»å±ã®ãããã -D ãªãã·ã§ã³ãéžæããŸãã
-æªå®çŸ©
ã·ã¹ãã åºæãŸãã¯GCCåºæã®ãã¯ããäºåå®çŸ©ããªãã§ãã ããã äºåå®çŸ©ãããæšæº
ãã¯ãã¯å®çŸ©ããããŸãŸã§ãã
-I DIR
ãã£ã¬ã¯ããªãè¿œå ããŸã DIR ããããŒãã¡ã€ã«ãæ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ãã«ç§»åããŸãã
ã«ãã£ãŠåä»ãããããã£ã¬ã¯ã㪠-I æšæºã·ã¹ãã ã«ãã£ã¬ã¯ããªãå«ãŸããåã«æ€çŽ¢ãããŸãã
ãã£ã¬ã¯ããªã®å Žå DIR æšæºã®ã·ã¹ãã ã€ã³ã¯ã«ãŒããã£ã¬ã¯ããªã§ããå Žåããã®ãªãã·ã§ã³ã¯ç¡èŠãããŸãã
ã·ã¹ãã ãã£ã¬ã¯ããªã®ããã©ã«ãã®æ€çŽ¢é åºãšç¹å¥ãªåŠçã確èªããŠãã ãã
ã·ã¹ãã ããããŒã®æ°ã¯ç¡å¹ã«ãªããŸããã ããã DIR ã=ãã§å§ãŸããã=ãã¯
sysrootãã¬ãã£ãã¯ã¹ã«çœ®ãæããããŸããã èŠã --sysroot ãš -isysroot.
-o file
åºåãã«æžã蟌ã fileã ããã¯æå®ããã®ãšåãã§ã file XNUMXçªç®ã®éãªãã·ã§ã³ãšããŠ
ãžã®è°è« cpp. gccã® XNUMXçªç®ã®éãªãã·ã§ã³åŒæ°ã®è§£éãç°ãªããŸãã
ã ããããªãã¯äœ¿çšããå¿ èŠããããŸã -o åºåãã¡ã€ã«ãæå®ããŸãã
-å£
éåžžã®ã³ãŒãã«å¿ èŠãªãã¹ãŠã®ãªãã·ã§ã³ã®èŠåããªã³ã«ããŸãã çŸåšãã
is -ã³ã¡ã³ã, -çæå, -Wmultichar æŽæ°ã®ææ Œã«é¢ããèŠåãåå ã§
ã#ifãåŒã®ç¬Šå·ã®å€æŽã ããªããã»ããµã®èŠåã®å€ãã«æ³šæããŠãã ãã
ããã©ã«ãã§ãªã³ã«ãªã£ãŠãããããããå¶åŸ¡ãããªãã·ã§ã³ã¯ãããŸããã
-ã³ã¡ã³ã
-ã³ã¡ã³ã
ã³ã¡ã³ãéå§ã·ãŒã±ã³ã¹ãçºçãããã³ã«èŠåãã /* ã«è¡šç€ºãããŸã /* ã³ã¡ã³ãããŸãã¯ãã€ã§ã
ããã¯ã¹ã©ãã·ã¥-æ¹è¡ã¯ã«è¡šç€ºãããŸã // ã³ã¡ã³ãã ïŒã©ã¡ãã®åœ¢åŒãåãå¹æããããŸããïŒ
-çæå
ã³ã¡ã³ãå ã®ã»ãšãã©ã®ããªã°ã©ãã¯ãããã°ã©ã ã®æå³ã«åœ±é¿ãäžããããšã¯ã§ããŸããã ãã ãã
ãšã¹ã±ãŒããããæ¹è¡ã圢æããããªã°ã©ãïŒ?? / è¡ã®çµããã«ïŒã§ããŸããã«ãã£ãŠ
ã³ã¡ã³ãã®éå§äœçœ®ãŸãã¯çµäºäœçœ®ãå€æŽããŸãã ãããã£ãŠã圢æãããäžéé³åã®ã¿
ãšã¹ã±ãŒããããæ¹è¡ã¯ãã³ã¡ã³ãå ã«èŠåãçæããŸãã
ãã®ãªãã·ã§ã³ã¯ã -å£ã å Žå -å£ ãæå®ãããŠããªãå Žåããã®ãªãã·ã§ã³ã¯åŒãç¶ãæå¹ã§ã
ããªãŒã°ã©ããæå¹ã«ãªã£ãŠããªãéãã èŠåãªãã§ããªã°ã©ãå€æãååŸããã«ã¯ã
ä»ã® -å£ èŠåãäœ¿çš -äžéé³å -å£ -Wno-ãã©ã€ã°ã©ã.
-äŒçµ±çãª
åŸæ¥ã®CãšISOCã§ã¯åäœãç°ãªãç¹å®ã®æ§é ã«ã€ããŠèŠåããŸãã
åŸæ¥ã®Cã«çžåœãããã®ããªããåé¡ã®ããISOCæ§é ã«ã€ããŠèŠåãã
é¿ããã¹ãæ§æã
- ãŠã³ãã
ãã¯ãã§ã¯ãªãèå¥åã #ãã ãã£ã¬ã¯ãã£ãã¯ã
ã®å€ å®çŸ©æžã¿ã®ã ãã®ãããªèå¥åã¯ãŒãã«çœ®ãæããããŸãã
-Wunused-ãã¯ã
ã¡ã€ã³ãã¡ã€ã«ã§å®çŸ©ãããŠããæªäœ¿çšã®ãã¯ãã«ã€ããŠèŠåããŸãã ãã¯ã㯠äžå€ ããããã
å°ãªããšãXNUMXåã¯æ¡åŒµãŸãã¯ååšã®ãã¹ããè¡ããŸããã ããªããã»ããµã¯ã次ã®å Žåã«ãèŠåããŸãã
ãã¯ãã¯ãåå®çŸ©ãŸãã¯æªå®çŸ©ã®æç¹ã§ã¯äœ¿çšãããŠããŸããã
çµã¿èŸŒã¿ãã¯ããã³ãã³ãã©ã€ã³ã§å®çŸ©ããããã¯ããããã³includeã§å®çŸ©ããããã¯ã
ãã¡ã€ã«ã«ã€ããŠã¯èŠåãããŸããã
ã泚æ: ãã¯ããå®éã«äœ¿çšãããŠããããã¹ããããããæ¡ä»¶ãããã¯ã§ã®ã¿äœ¿çšãããŠããå Žåã
CPPã¯ãããæªäœ¿çšãšããŠå ±åããŸãã ãã®ãããªå Žåã®èŠåãåé¿ããã«ã¯ãæ¹åããå¯èœæ§ããããŸã
ããšãã°ãæåã«ã¹ãããããããã¯ãã«ç§»åããããšã«ããããã¯ãã®å®çŸ©ã®ç¯å²
ãããã¯ã ãŸãã¯ã次ã®ãããªãããŒã®äœ¿çšæ³ãæäŸããããšãã§ããŸãã
#ifå®çŸ©ãããthe_macro_causing_the_warning
#endif
-ãŠã§ã³ãã£ã-ã©ãã«
ãã€ã§ãèŠåãã ïŒãã®ä» ãŸã㯠#endif ããã¹ããç¶ããŸãã ããã¯éåžžã
ãã©ãŒã ã®ã³ãŒã
#if FOO
...
#else FOO
...
#endif FOO
XNUMXçªç®ãšXNUMXçªç®ã®ãFOOãã¯ã³ã¡ã³ãã«å«ããå¿ èŠããããŸãããå€ãã®å Žåãå€ãããã°ã©ã ã«ã¯å«ãŸããŠããŸããã
ãã®èŠåã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
-ãšã©ãŒ
ãã¹ãŠã®èŠåãããŒããšã©ãŒã«ããŸãã èŠåãããªã¬ãŒãããœãŒã¹ã³ãŒãã¯æ¬¡ã®ããã«ãªããŸã
æåŠãããŸããã
-Wsystem-ããããŒ
ã·ã¹ãã ããããŒã®ã³ãŒãã«å¯ŸããŠèŠåãçºè¡ããŸãã ãããã¯éåžžãèŠã€ããã®ã«åœ¹ç«ã¡ãŸãã
ãããã£ãŠãç¬èªã®ã³ãŒãã®ãã°ã¯æå¶ãããŸãã ããªããã·ã¹ãã ã«è²¬ä»»ãããå Žå
ã©ã€ãã©ãªãããªãã¯ããããèŠãããããããŸããã
-w GNU CPPãããã©ã«ãã§çºè¡ããèŠåãå«ãããã¹ãŠã®èŠåãæå¶ããŸãã
-è¡åŠè
Cæšæºã«ãªã¹ããããŠãããã¹ãŠã®å¿ é 蚺æãçºè¡ããŸãã ãããã®ããã€ãã¯æ®ã£ãŠããŸã
ç¡å®³ãªã³ãŒãã§é »ç¹ã«ããªã¬ãŒããããããããã©ã«ãã§ã¢ãŠãã«ãªããŸãã
-è¡åŠçãšã©ãŒ
ãã¹ãŠã®å¿ é 蚺æãçºè¡ãããã¹ãŠã®å¿ é 蚺æããšã©ãŒã«ããŸãã
ããã«ã¯ãGCCãçºè¡ããã«çºè¡ããå¿ é ã®èšºæãå«ãŸããŸã -è¡åŠè ãããããšããŠæ±ããŸã
èŠåã
-M ååŠçã®çµæãåºåãã代ããã«ã次ã®ãããªã«ãŒã«ãåºåããŸãã make
ã¡ã€ã³ãœãŒã¹ãã¡ã€ã«ã®äŸåé¢ä¿ã説æããŸãã ããªããã»ããµã¯XNUMXã€ãåºåããŸã
make ãã®ãœãŒã¹ãã¡ã€ã«ã®ãªããžã§ã¯ããã¡ã€ã«åãã³ãã³ãããã³ååãå«ãã«ãŒã«
ããã®ãã®ãå«ããå«ãŸããŠãããã¹ãŠã®ãã¡ã€ã«ã® -å«ãã or -ã€ãã¯ãã¹ command
ã©ã€ã³ãªãã·ã§ã³ã
æ瀺çã«æå®ãããŠããªãéãïŒ -MT or -MQïŒããªããžã§ã¯ããã¡ã€ã«åã¯ã§æ§æãããŸã
æ¥å°ŸèŸããªããžã§ã¯ããã¡ã€ã«ã®æ¥å°ŸèŸããã³ä»»æã®æ¥å°ŸèŸã«çœ®ãæãããããœãŒã¹ãã¡ã€ã«ã®åå
äž»èŠãªãã£ã¬ã¯ããªéšåãåé€ãããŸããã å«ãŸããŠãããã¡ã€ã«ãå€ãå Žåãã«ãŒã«ã¯æ¬¡ã®ãšããã§ãã
ã䜿çšããŠããã€ãã®è¡ã«åå² \-æ¹è¡ã ã«ãŒã«ã«ã¯ã³ãã³ãããããŸããã
ãã®ãªãã·ã§ã³ã¯ã次ã®ãããªããªããã»ããµã®ãããã°åºåãæå¶ããŸããã -dMã é¿ããããã«
ãã®ãããªãããã°åºåãäŸåé¢ä¿ã«ãŒã«ãšæ··åããã«ã¯ãæ瀺çã«æå®ããå¿ èŠããããŸã
äŸåé¢ä¿ã®åºåãã¡ã€ã« -MFããŸãã¯æ¬¡ã®ãããªç°å¢å€æ°ã䜿çšããŸã
DEPENDENCIES_OUTPUTã ãããã°åºåã¯ãåŒãç¶ãéåžžã®åºåã¹ããªãŒã ã«éä¿¡ãããŸãã
ããŒãã«ã
éé -M ãã©ã€ããŒã«æ瀺ãã -Eãããã³æé»çãªèŠåãæå¶ããŸã -w.
-ãã ããã -M ãã ããã·ã¹ãã ããããŒãã£ã¬ã¯ããªã«ããããããŒãã¡ã€ã«ã«ã€ããŠã¯èšåããªãã§ãã ããã
ãŸãããã®ãããªããããŒããçŽæ¥çãŸãã¯éæ¥çã«ã€ã³ã¯ã«ãŒããããããããŒãã¡ã€ã«ããããŸããã
ããã¯ãå±±æ¬åŒ§ãŸãã¯äºéåŒçšç¬Šã®éžæã #include
ãã£ã¬ã¯ãã£ãèªäœã¯ããã®ããããŒãã«è¡šç€ºããããã©ããã決å®ããŸãã -ãã
äŸåé¢ä¿ã®åºåã ããã¯ãGCCããŒãžã§ã³3.0ããã³
æ©ã
-MF file
ãšäžç·ã«äœ¿çšããå Žå -M or -ãããäŸåé¢ä¿ãæžã蟌ããã¡ã€ã«ãæå®ããŸãã ãããã®å Žå -MF
ã¹ã€ããã«ã¯ãããªããã»ããµãéä¿¡ããã®ãšåãå Žæã«ã«ãŒã«ãéä¿¡ããããã«æå®ãããŠããŸã
ååŠçãããåºåã
ãã©ã€ããŒãªãã·ã§ã³ãšäœµçšããå Žå -MD or -MMD, -MF ããã©ã«ãã®äŸåé¢ä¿ãäžæžãããŸã
åºåãã¡ã€ã«ã
-MG 次ã®ãããªãªãã·ã§ã³ãšçµã¿åãã㊠-M äŸåé¢ä¿ã®çæãèŠæ±ãã -MG ãšä»®å®ãã
æ¬ èœããŠããããããŒãã¡ã€ã«ã¯çæããããã¡ã€ã«ã§ãããããããäŸåé¢ä¿ãªã¹ãã«è¿œå ããŸãã
ãšã©ãŒãçºçããŸãã äŸåé¢ä¿ã®ãã¡ã€ã«åã¯ã#includeãããçŽæ¥ååŸãããŸã
ãã¹ãä»å ããã«ãã£ã¬ã¯ãã£ãã -MG ãŸããååŠçãããåºåãæå¶ããŸãã
ããããŒãã¡ã€ã«ããªããšãããã¯åœ¹ã«ç«ããªããªããŸãã
ãã®æ©èœã¯ãmakefileã®èªåæŽæ°ã§äœ¿çšãããŸãã
-MP ãã®ãªãã·ã§ã³ã¯ãCPPã«ãäŸåé¢ä¿ä»¥å€ã®äŸåé¢ä¿ããšã«åœã®ã¿ãŒã²ãããè¿œå ããããã«æ瀺ããŸãã
ã¡ã€ã³ãã¡ã€ã«ããããããäœã«ãäŸåããªãããã«ããŸãã ãããã®ãããŒã«ãŒã«ã¯ãšã©ãŒãåé¿ããŸã
make ãæŽæ°ããã«ããããŒãã¡ã€ã«ãåé€ãããšã ã¡ãŒã¯ãã¡ã€ã« åãããã
ããã¯å žåçãªåºåã§ãïŒ
test.oïŒtest.c test.h
test.hïŒ
-MT ã¿ãŒã²ãã
äŸåé¢ä¿ã®çæã«ãã£ãŠçºè¡ãããã«ãŒã«ã®ã¿ãŒã²ãããå€æŽããŸãã ããã©ã«ãã§ã¯ãCPPã¯
ã¡ã€ã³å ¥åãã¡ã€ã«ã®ååããã£ã¬ã¯ããªã³ã³ããŒãã³ããšãã¡ã€ã«ãµãã£ãã¯ã¹ãåé€ããŸã
ãªã© .cãããã³ãã©ãããã©ãŒã ã®éåžžã®ãªããžã§ã¯ããµãã£ãã¯ã¹ãè¿œå ããŸãã çµæãç®æšã§ãã
An -MT ãªãã·ã§ã³ã¯ãã¿ãŒã²ãããæå®ããæååãšãŸã£ããåãã«ãªãããã«èšå®ããŸãã ãæã¿ãªãã°
è€æ°ã®ã¿ãŒã²ããã®å Žåãããããåäžã®åŒæ°ãšããŠæå®ã§ããŸãã -MTããŸãã¯è€æ°ã䜿çšãã
-MT ãªãã·ã§ã³ã
ããšãã°ã -MT '$ïŒobjpfxïŒfoo.o' äžãããããããªã
$ïŒobjpfxïŒfoo.oïŒfoo.c
-MQ ã¿ãŒã²ãã
ãšåã -MTããã ããMakeã«ç¹å¥ãªæåãåŒçšããŸãã
-MQ '$ïŒobjpfxïŒfoo.o' äžãã
$$ïŒobjpfxïŒfoo.oïŒfoo.c
ããã©ã«ãã®ã¿ãŒã²ããã¯ãã§äžãããããã®ããã«èªåçã«åŒçšãããŸã -MQ.
-MD -MD ã«çžåœããŸã -M -MF fileã ãã以å€ã§ -E æ瀺ãããŠããŸããã ãã©ã€ã
決å®ãã file ãã©ããã«åºã¥ã㊠-o ãªãã·ã§ã³ãäžããããŸãã ããã§ããå Žåããã©ã€ããŒã¯
åŒæ°ã§ãããæ¥å°ŸèŸã¯ .dããã以å€ã®å Žåã¯ãå ¥åãã¡ã€ã«ã®ååãåããŸãã
ãã£ã¬ã¯ããªã³ã³ããŒãã³ããšãµãã£ãã¯ã¹ãåé€ãã .d ãµãã£ãã¯ã¹ã
If -MD ãšãšãã«äœ¿çšãããŸã -Eã ã©ãã -o ã¹ã€ããã¯ã
äŸåé¢ä¿ã®åºåãã¡ã€ã«ã§ããã䜿çšããªãå Žå -Eããããã -o æå®ããããšã¯ç解ãããŸã
ã¿ãŒã²ãããªããžã§ã¯ããã¡ã€ã«ã
Since -E æ瀺ãããŠããŸããã -MD äŸåé¢ä¿åºåãã¡ã€ã«ã次ã®ããã«çæããããã«äœ¿çšã§ããŸã
ã³ã³ãã€ã«ããã»ã¹ã®å¯äœçšã
-MMD
ããã -MD ãã ããã·ã¹ãã ããããŒãã¡ã€ã«ã§ã¯ãªãããŠãŒã¶ãŒããããŒãã¡ã€ã«ã®ã¿ã«èšåããŸãã
-fpch-deps
ããªã³ã³ãã€ã«æžã¿ããããŒã䜿çšããå Žåããã®ãã©ã°ã«ããââãäŸåé¢ä¿åºåãã©ã°ã次ã®ããã«ãªããŸãã
ãŸããããªã³ã³ãã€ã«æžã¿ããããŒã®äŸåé¢ä¿ãããã¡ã€ã«ãäžèŠ§è¡šç€ºããŸãã æå®ãããŠããªãå Žåã®ã¿
ããªã³ã³ãã€ã«æžã¿ããããŒãäžèŠ§è¡šç€ºãããäœæã«äœ¿çšããããã¡ã€ã«ã¯äžèŠ§è¡šç€ºãããŸããã
ããªã³ã³ãã€ã«æžã¿ããããŒã䜿çšããå Žåããããã®ãã¡ã€ã«ã¯åç §ãããªãããã§ãã
-fpch-ååŠç
ãã®ãªãã·ã§ã³ã䜿çšãããšãããªã³ã³ãã€ã«æžã¿ããããŒãäžç·ã«äœ¿çšã§ããŸã -Eã ã¹ãã·ã£ã«ãæ¿å ¥ããŸã
"#pragma"ã "ïŒpragma GCC pch_preprocess"ãã¡ã€ã«å"" å ŽæãããŒã¯ããããã«åºåã§
ããªã³ã³ãã€ã«æžã¿ããããŒãèŠã€ãã£ãå Žæãšãã® ãã¡ã€ã«åã æ -fååŠçæžã¿ ã§ãã
䜿çšãããšãGCCã¯ãã®ã#pragmaããèªèããŠPCHãããŒãããŸãã
çµæã®ååŠçãããåºåã¯ã®ã¿ã§ããããããã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªãã«ãªã£ãŠããŸã
GCCãžã®å ¥åãšããŠéåžžã«é©ããŠããŸãã ã«ãã£ãŠãªã³ã«ãªããŸã -äžæä¿å.
ãã®ã#pragmaããç¬èªã®ã³ãŒãã§èšè¿°ããªãã§ãã ããããã ãã
PCHãã¡ã€ã«ãå¥ã®å Žæã«ããå Žåã¯ãã¡ã€ã«åã ãã¡ã€ã«åã¯æ¬¡ã®ããã«ãªããŸã
絶察ãŸãã¯GCCã®çŸåšã®ãã£ã¬ã¯ããªã«çžå¯Ÿçã§ããå¯èœæ§ããããŸãã
-x c
-x C ++
-x Objective-c
-x ã¢ã»ã³ãã©-with-cpp
ãœãŒã¹èšèªïŒCãC ++ãObjective-CããŸãã¯ã¢ã»ã³ããªïŒãæå®ããŸãã ããã¯äœã®é¢ä¿ããããŸãã
æšæºãžã®é©åãŸãã¯æ¡åŒµã ããã¯åã«ã©ã®åºæ¬æ§æãéžæããããéžæããã ãã§ã
äºæ³ã ãããã®ãªãã·ã§ã³ã®ããããæå®ããªãå Žåãcppã¯ããèšèªãæšæž¬ããŸã
ãœãŒã¹ãã¡ã€ã«ã®æ¡åŒµåïŒ .c, .ccã«, .mãŸã㯠.Sã ã®ãã®ä»ã®äžè¬çãªæ¡åŒµæ©èœ
C ++ãšã¢ã»ã³ããªãèªèãããŸãã cppãæ¡åŒµåãèªèããªãå Žåã¯ã
ãã¡ã€ã«ãCãšããŠæ±ããŸãã ããã¯æãäžè¬çãªã¢ãŒãã§ãã
ã泚æ: 以åã®ããŒãžã§ã³ã®cpp㯠-èšèª äž¡æ¹ãéžæãããªãã·ã§ã³
èšèªãšèŠæ Œã®é©åã¬ãã«ã ãã®ãªãã·ã§ã³ã¯åé€ãããŸããã
ããã¯ãšç«¶åããŸã -l ãªãã·ã§ã³ãéžæããŸãã
-std =æšæº
-ã¢ã³ã·
ã³ãŒããæºæ ããæšæºãæå®ããŸãã çŸåšãCPPã¯Cã«ã€ããŠç¥ã£ãŠããŸã
ããã³C ++æšæºã ãã®ä»ã¯å°æ¥è¿œå ãããå¯èœæ§ããããŸãã
æšæº 次ã®ããããã§ããå¯èœæ§ããããŸãã
ãc90ã
ãc89ã
ãiso9899ïŒ1990ã
1990幎ããã®ISOCæšæºã c90 ãã®ããŒãžã§ã³ã®éåžžã®çç¥åœ¢ã§ã
æšæºã
ãã® -ã¢ã³ã· ãªãã·ã§ã³ã¯ãšåçã§ã -std = c90.
ãiso9899ïŒ199409ã
1990幎ã«ä¿®æ£ããã1994CèŠæ Œã
ãiso9899ïŒ1999ã
ãc99ã
ãiso9899ïŒ199xã
ãc9xã
1999幎XNUMXæã«å ¬éãããæ¹èšISOCæšæºãå ¬éåã¯ã
C9XãšããŠç¥ãããŠããŸããã
ãiso9899ïŒ2011ã
ãc11ã
ãc1xã
2011幎XNUMXæã«å ¬éãããæ¹èšISOCæšæºãå ¬éåã¯ã
C1XãšããŠç¥ãããŠããŸããã
ãgnu90ã
ãgnu89ã
1990CæšæºãšGNUæ¡åŒµã ãããããã©ã«ãã§ãã
ãgnu99ã
ãgnu9xã
1999CæšæºãšGNUæ¡åŒµã
ãgnu11ã
ãgnu1xã
2011CæšæºãšGNUæ¡åŒµã
ãc ++ 98ã
1998幎ã®ISOC ++æšæºãšä¿®æ£ã
ãgnu ++ 98ã
ãšåã -std = c ++ 98 ãã©ã¹GNUæ¡åŒµã ããã¯C ++ã³ãŒãã®ããã©ã«ãã§ãã
-I- ã€ã³ã¯ã«ãŒããã¹ãåå²ããŸãã ã§æå®ããããã£ã¬ã¯ã㪠-I åã®ãªãã·ã§ã³ -I- ã
ã#includeãã§ãªã¯ãšã¹ããããããããŒã®ã¿ãæ€çŽ¢ãã¡ã€ã«""; ãããã¯æ€çŽ¢ãããŸãã
"ïŒå«ããã¡ã€ã«> "ã è¿œå ã®ãã£ã¬ã¯ããªãã§æå®ãããŠããå Žå -I åŸã®ãªãã·ã§ã³
-I-ããããã®ãã£ã¬ã¯ããªã¯ãã¹ãŠæ€çŽ¢ãããŸã #include ãã£ã¬ã¯ãã£ã
å ããŠã -I- çŸåšã®ãã¡ã€ã«ãã£ã¬ã¯ããªã®ãã£ã¬ã¯ããªã®äœ¿çšãçŠæ¢ããŸãã
ã#includeãã®æåã®æ€çŽ¢ãã£ã¬ã¯ããªãã¡ã€ã«""ã ãã®ãªãã·ã§ã³ã¯éæšå¥šã«ãªããŸããã
-ãã¹ããã£ã³ã¯
æšæºã®ã·ã¹ãã ãã£ã¬ã¯ããªã§ããããŒãã¡ã€ã«ãæ€çŽ¢ããªãã§ãã ããã ãã£ã¬ã¯ããªã®ã¿
ããªããæå®ãã -I ãªãã·ã§ã³ïŒããã³çŸåšã®ãã¡ã€ã«ã®ãã£ã¬ã¯ããªïŒå Žåã¯ïŒ
é©åãªïŒãæ€çŽ¢ãããŸãã
-nostdinc ++
C ++åºæã®æšæºãã£ã¬ã¯ããªã§ããããŒãã¡ã€ã«ãæ€çŽ¢ããªãã§ãã ããããã ããããã§ãæ€çŽ¢ããŠãã ããã
ä»ã®æšæºãã£ã¬ã¯ããªãæ€çŽ¢ããŸãã ïŒãã®ãªãã·ã§ã³ã¯ãC ++ããã«ããããšãã«äœ¿çšãããŸã
å³æžé€šãïŒ
-å«ãã file
ããã»ã¹ file ã#include "file"ããäžæ¬¡è³æã®æåã®è¡ãšããŠè¡šç€ºããããã®ããã«
ãã¡ã€ã«ã ãã ããæåã«æ€çŽ¢ããããã£ã¬ã¯ã㪠file ããªããã»ããµã®åäœã§ã
ãã£ã¬ã¯ããªã«ãžã§ããéå§ããŸãã ãååŸããå¿ èŠãããè of ã¡ã€ã³ãœãŒã¹ãã¡ã€ã«ãå«ããã£ã¬ã¯ããªã èŠã€ãããªãå Žå
ããã§ã¯ããïŒinclude "..."ãæ€çŽ¢ãã§ãŒã³ã®æ®ãã®éšåã§æ¬¡ã®ããã«æ€çŽ¢ãããŸãã
ããŒãã«ã
è€æ°ã®å Žå -å«ãã ãªãã·ã§ã³ãäžãããããã¡ã€ã«ã¯ãããã®é åºã§å«ãŸããŸã
ã³ãã³ãã©ã€ã³ã«è¡šç€ºãããŸãã
-ã€ãã¯ãã¹ file
ãŸãã«ãã®ããã« -å«ãããã¹ãã£ã³ã«ãã£ãŠçæãããåºåãé€ã file ã¹ããŒãããŸã
ãã¡ããžã ãããå®çŸ©ãããã¯ãã¯å®çŸ©ããããŸãŸã§ãã ããã«ããããã¹ãŠã®ãã¯ããååŸã§ããŸã
宣èšãåŠçããã«ããããŒããã
ã«ãã£ãŠæå®ããããã¹ãŠã®ãã¡ã€ã« -ã€ãã¯ãã¹ ã«ãã£ãŠæå®ããããã¹ãŠã®ãã¡ã€ã«ã®åã«åŠçãããŸã -å«ãã.
-idirafter DIR
æ€çŽ¢ DIR ããããŒãã¡ã€ã«ã®å Žåã§ãããå®è¡ããŠãã ãã After ã§æå®ããããã¹ãŠã®ãã£ã¬ã¯ã㪠-I ãš
æšæºã®ã·ã¹ãã ãã£ã¬ã¯ããªã䜿ãæããããŸããã DIR ã·ã¹ãã ã€ã³ã¯ã«ãŒããšããŠæ±ãããŸã
ãã£ã¬ã¯ããªã ããã DIR ã=ãã§å§ãŸããã=ãã¯sysrootã«çœ®ãæããããŸã
ãã¬ãã£ãã¯ã¹; èŠã --sysroot ãš -isysroot.
-iprefix æ¥é èŸ
æå® æ¥é èŸ åŸç¶ã®ãã¬ãã£ãã¯ã¹ãšã㊠-iwithprefix ãªãã·ã§ã³ã ãã¬ãã£ãã¯ã¹ã®å Žå
ãã£ã¬ã¯ããªãè¡šããŸããæåŸã®ãã¡ã€ã«ãå«ããå¿ èŠããããŸã /.
-iwithprefix DIR
-iwithprefixbefore DIR
è¿œå DIR 以åã«æå®ããããã¬ãã£ãã¯ã¹ã« -iprefixãçµæãè¿œå ããŸã
ã€ã³ã¯ã«ãŒãæ€çŽ¢ãã¹ãžã®ãã£ã¬ã¯ããªã -iwithprefixbefore åãå Žæã«çœ®ããŸã -I
NS; -iwithprefix ã©ãã«çœ®ãã -idirafter ã
-isysroot DIR
ãã®ãªãã·ã§ã³ã¯ã --sysroot ãªãã·ã§ã³ã§ãããããããŒãã¡ã€ã«ã«ã®ã¿é©çšãããŸãïŒãã ã
ããŒãŠã£ã³ã¿ãŒã²ãããããããŒãã¡ã€ã«ãšã©ã€ãã©ãªã®äž¡æ¹ã«é©çšãããŸãïŒã ãåç §ããŠãã ãã
--sysroot 詳现ã«ã€ããŠã¯ããªãã·ã§ã³ãåç §ããŠãã ããã
-imultilib DIR
ã DIR ã¿ãŒã²ããåºæã®C ++ããããŒãå«ããã£ã¬ã¯ããªã®ãµããã£ã¬ã¯ããªãšããŠã
-isystem DIR
æ€çŽ¢ DIR ããããŒãã¡ã€ã«ã®å Žåãã«ãã£ãŠæå®ããããã¹ãŠã®ãã£ã¬ã¯ããªã®åŸ -I ããããåã«
æšæºã®ã·ã¹ãã ãã£ã¬ã¯ããªã åãã«ãªãããã«ãã·ã¹ãã ãã£ã¬ã¯ããªãšããŠããŒã¯ããŸã
æšæºã®ã·ã¹ãã ãã£ã¬ã¯ããªã«é©çšãããç¹å¥ãªåŠçã ããã DIR å§ãŸããŸã
ã=ãã䜿çšãããšãã=ãã¯sysrootãã¬ãã£ãã¯ã¹ã«çœ®ãæããããŸãã èŠã --sysroot ãš
-isysroot.
-iquote DIR
æ€çŽ¢ DIR ã#includeãã§ãªã¯ãšã¹ããããããããŒãã¡ã€ã«ã®ã¿ãã¡ã€ã«""; ã§ã¯ãªã
ã#includeããæ€çŽ¢ãã¡ã€ã«> "ãã«ãã£ãŠæå®ããããã¹ãŠã®ãã£ã¬ã¯ããªã®å -I ãšåã«
æšæºã®ã·ã¹ãã ãã£ã¬ã¯ããªã ããã DIR ã=ãã§å§ãŸããã=ãã¯ã«çœ®ãæããããŸã
sysrootãã¬ãã£ãã¯ã¹ã èŠã --sysroot ãš -isysroot.
-fdirectives-ã®ã¿
ååŠçãããšãã¯ããã£ã¬ã¯ãã£ããåŠçããŸããããã¯ãã¯å±éããŸããã
ãªãã·ã§ã³ã®åäœã¯ã -E ãš -fååŠçæžã¿ ãªãã·ã§ã³ã
é£çµ¡å -EãååŠçã¯ã#defineããªã©ã®ãã£ã¬ã¯ãã£ãã®åŠçã«å¶éãããŠããŸãã
ã#ifdefãããïŒerrorãã ãã¯ãå±éã
ããªã°ã©ãå€æã¯å®è¡ãããŸããã å ã㊠-dD ãªãã·ã§ã³ã¯æé»çã«
æå¹ã«ãªããŸããã
é£çµ¡å -fååŠçæžã¿ãã³ãã³ãã©ã€ã³ãšã»ãšãã©ã®çµã¿èŸŒã¿ãã¯ãã®äºåå®çŸ©ã¯
ç¡å¹ã ã³ã³ããã¹ãã«äŸåããã__LINE__ããªã©ã®ãã¯ããåŠçãããŸã
éåžžã¯ã ããã«ããã以åã«ã-Eãã§ååŠçããããã¡ã€ã«ã®ã³ã³ãã€ã«ãå¯èœã«ãªããŸãã
-fdirectives-onlyãã
äž¡æ¹ãš -E ãš -fååŠçæžã¿ãã®ã«ãŒã« -fååŠçæžã¿ åªå ããŸãã ãã®
以åã«ã-Eãã§ååŠçããããã¡ã€ã«ã®å®å šãªååŠçãæå¹ã«ããŸã
-fdirectives-onlyãã
-fdollars-in-identifiers
åæ $ èå¥åã§ã
-æ¡åŒµèå¥å
èå¥åã«ãŠãããŒãµã«æååãåãå ¥ããŸãã ãã®ãªãã·ã§ã³ã¯å®éšçãªãã®ã§ãã ã§
GCCã®å°æ¥ã®ããŒãžã§ã³ã§ã¯ãC99ããã³C ++ã§ããã©ã«ãã§æå¹ã«ãªããŸãã
-fno-canonical-system-headers
ååŠçãããšãã¯ãæ£èŠåããŠã·ã¹ãã ããããŒãã¹ãçãããªãã§ãã ããã
-fååŠçæžã¿
å ¥åãã¡ã€ã«ããã§ã«ååŠçãããŠããããšãããªããã»ããµãŒã«ç€ºããŸãã ãã®
ãã¯ãå±éãããªã°ã©ãå€æããšã¹ã±ãŒããããæ¹è¡ã¹ãã©ã€ã·ã³ã°ãªã©ãæå¶ããŸãã
ã»ãšãã©ã®ãã£ã¬ã¯ãã£ãã®åŠçã ããªããã»ããµã¯åŒãç¶ãèªèããŠåé€ããŸã
ã³ã¡ã³ããååŠçããããã¡ã€ã«ãæž¡ãããšãã§ããããã« -C ãªãã§ã³ã³ãã€ã©ã«
åé¡ã ãã®ã¢ãŒãã§ã¯ãçµ±åãããããªããã»ããµã¯ããŒã¯ãã€ã¶ãŒã«ãããŸããã
ããã³ããšã³ãçšã
-fååŠçæžã¿ å ¥åãã¡ã€ã«ã«æ¡åŒµåã®XNUMXã€ãããå Žåãæé»çã§ã .i, .ii or .mi.
ãããã¯ãGCCãã«ãã£ãŠäœæãããååŠçæžã¿ãã¡ã€ã«ã«äœ¿çšããæ¡åŒµæ©èœã§ãã -äžæä¿å.
-ftabstop =å¹
ã¿ãã¹ãããéã®è·é¢ãèšå®ããŸãã ããã¯ãããªããã»ããµãæ£ããåãå ±åããã®ã«åœ¹ç«ã¡ãŸã
ã¿ããè¡ã«è¡šç€ºãããŠããå Žåã§ããèŠåãŸãã¯ãšã©ãŒã®çªå·ã å€ãå°ããå Žå
1ãã倧ããã100ãã倧ããå Žåããã®ãªãã·ã§ã³ã¯ç¡èŠãããŸãã ããã©ã«ãã¯8ã§ãã
-fdebug-cpp
ãã®ãªãã·ã§ã³ã¯ãGCCã®ãããã°ã«ã®ã¿åœ¹ç«ã¡ãŸãã ãšäžç·ã«äœ¿çšããå Žå -Eããããã°ããã³ãããŸã
ãã±ãŒã·ã§ã³ãããã«é¢ããæ å ±ã åºåå ã®ãã¹ãŠã®ããŒã¯ã³ã®åã«ã
ãã®å Žæãå±ãããããã ããŒã¯ã³ã®å Žæãä¿æããŠãããããã®ãã³ã
ã ããïŒ
{"P"ïŒF ; "F"ïŒF ; "L"ïŒ ;"NS"ïŒ ;"NS"ïŒ ;"NS"ïŒ ; "E"ïŒ ã "loc"ïŒ }
ãªãã§äœ¿çšããå Žå -Eããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-ftrack-ãã¯ãå±é[=ã¬ãã«]
ãã¯ãå±éå šäœã§ããŒã¯ã³ã®å Žæã远跡ããŸãã ããã«ãããã³ã³ãã€ã©ã¯
ã§ã³ã³ãã€ã«ãšã©ãŒãçºçãããšãã®çŸåšã®ãã¯ãæ¡åŒµã¹ã¿ãã¯ã«é¢ãã蚺æ
ãã¯ãå±éã ãã®ãªãã·ã§ã³ã䜿çšãããšãããªããã»ããµãšã³ã³ãã€ã©ãæ¶è²»ããŸã
ããå€ãã®ã¡ã¢ãªã NS ã¬ãã« ãã©ã¡ãŒã¿ã䜿çšããŠãããŒã¯ã³ã®ç²ŸåºŠã®ã¬ãã«ãéžæã§ããŸã
ãããã£ãŠãäœçœ®è¿œè·¡ã«ãããå¿ èŠã«å¿ããŠã¡ã¢ãªæ¶è²»éãåæžãããŸãã äŸ¡å€ 0 of
ã¬ãã« ãããã®ããã«ãã®ãªãã·ã§ã³ãç¡å¹ã«ããŸã -ftrack-ãã¯ãå±é ã«ååšããŠãã
ã³ãã³ãã©ã€ã³ã äŸ¡å€ 1 ã®ããã«å£åã¢ãŒãã§ããŒã¯ã³ã®å Žæã远跡ããŸã
æå°éã®ã¡ã¢ãªãªãŒããŒãããã ãã®ã¢ãŒãã§ã¯ãæ¡åŒµã®çµæãšããŠçãããã¹ãŠã®ããŒã¯ã³
é¢æ°ã®ãããªãã¯ãã®åŒæ°ã¯åãå Žæã«ãããŸãã äŸ¡å€ 2 ããŒã¯ã³ã远跡ãã
å®å šã«å Žæã ãã®å€ã¯ãæãã¡ã¢ãªãæ¶è²»ããŸãã ãã®ãªãã·ã§ã³ãäžãããããšã
åŒæ°ãªããããã©ã«ãã®ãã©ã¡ãŒã¿å€ã¯ 2.
-ftrack-macro-expansion = 2ãããã©ã«ãã§ã¢ã¯ãã£ãã«ãªã£ãŠããããšã«æ³šæããŠãã ããã
-fexec-charset =æåã»ãã
æååããã³æåå®æ°ã«äœ¿çšãããå®è¡æåã»ãããèšå®ããŸãã ããã©ã«ã
UTF-8ã§ãã æåã»ãã ã·ã¹ãã ã®ãiconvãã©ã€ãã©ãªã§ãµããŒããããŠããä»»æã®ãšã³ã³ãŒãã£ã³ã°ã«ããããšãã§ããŸã
ã«ãŒãã³ã
-fwide-exec-charset =æåã»ãã
ã¯ã€ãæååããã³æåå®æ°ã«äœ¿çšãããã¯ã€ãå®è¡æåã»ãããèšå®ããŸãã
ããã©ã«ãã¯ããwchar_tãã®å¹ ã«å¯Ÿå¿ããUTF-32ãŸãã¯UTF-16ã§ãã NS
ã -fexec-æåã»ãã, æåã»ãã ã·ã¹ãã ã®ãiconvãã§ãµããŒããããŠããä»»æã®ãšã³ã³ãŒãã£ã³ã°ã«ããããšãã§ããŸã
ã©ã€ãã©ãªã«ãŒãã³; ãã ããé©åããªããšã³ã³ãŒãã£ã³ã°ã§ã¯åé¡ãçºçããŸã
æ£ç¢ºã«ã¯ãwchar_tãã«ãããŸãã
-finput-charset =æåã»ãã
å ¥åã®æåã»ããããã®å€æã«äœ¿çšãããå ¥åæåã»ãããèšå®ããŸã
GCCã§äœ¿çšããããœãŒã¹æåã»ãããžã®ãã¡ã€ã«ã ãã±ãŒã«ã§æå®ãããŠããªãå ŽåããŸãã¯GCC
ãã±ãŒã«ãããã®æ å ±ãååŸããããšã¯ã§ããŸãããããã©ã«ãã¯UTF-8ã§ãã ããã¯å¯èœæ§ããããŸã
ãã±ãŒã«ãŸãã¯ãã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã®ããããã«ãã£ãŠäžæžããããŸãã çŸåšãã³ãã³ã
競åãããå Žåã¯ãlineãªãã·ã§ã³ãåªå ãããŸãã æåã»ãã ä»»æã®ãšã³ã³ãŒãã£ã³ã°ã«ããããšãã§ããŸã
ã·ã¹ãã ã®ãiconvãã©ã€ãã©ãªã«ãŒãã³ã§ãµããŒããããŠããŸãã
-fworkingãã£ã¬ã¯ããª
ããªããã»ããµåºåã§ã©ã€ã³ããŒã«ãŒã®çæãæå¹ã«ããŠãã³ã³ãã€ã©ãèš±å¯ããŸã
ååŠçæã«çŸåšã®äœæ¥ãã£ã¬ã¯ããªãç¥ã£ãŠããã ãã®ãªãã·ã§ã³ã
æå¹ã«ãããšãããªããã»ããµã¯æåã®ã©ã€ã³ããŒã«ãŒã®åŸã«XNUMXçªç®ã®ã©ã€ã³ããŒã«ãŒãåºåããŸã
çŸåšã®äœæ¥ãã£ã¬ã¯ããªã®åŸã«XNUMXã€ã®ã¹ã©ãã·ã¥ãç¶ããŸãã GCCã¯ããã䜿çšããŸã
ååŠçãããå ¥åã«ååšããå Žåããã£ã¬ã¯ããªã¯æ¬¡ã®ããã«çºè¡ãããŸãã
äžéšã®ãããã°æ å ±åœ¢åŒã®çŸåšã®äœæ¥ãã£ã¬ã¯ããªã ãã®ãªãã·ã§ã³ã¯
ãããã°æ å ±ãæå¹ã«ãªã£ãŠããå Žåã¯æé»çã«æå¹ã«ãªããŸãããããã¯æ¬¡ã®æ¹æ³ã§çŠæ¢ã§ããŸãã
åŠå®ãããåœ¢åŒ -fno-äœæ¥ãã£ã¬ã¯ããªã ãã -P ã³ãã³ãã«ãã©ã°ããããŸã
lineã®å ŽåããïŒlineããã£ã¬ã¯ãã£ãã¯ãŸã£ããçºè¡ãããªãããããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-fno-show-column
蚺æã§åçªå·ãå°å·ããªãã§ãã ããã ããã¯ã蚺æã
次ã®ãããªåçªå·ãç解ããªãããã°ã©ã ã«ãã£ãŠã¹ãã£ã³ãããŠãã
ããžã£ã°ã.
-A è¿°èª=åç
è¿°èªã§ã¢ãµãŒã·ã§ã³ãäœæããŸã è¿°èª ãããŠçãã åçã ãã®ãã©ãŒã ã¯
å€ã圢åŒãããåªå -A è¿°èª(åç)ãããã¯ãŸã ãµããŒããããŠããã®ã§ã
ã·ã§ã«ã®ç¹æ®æåã¯äœ¿çšããŸããã
-A -è¿°èª=åç
è¿°éšã䜿çšããŠã¢ãµãŒã·ã§ã³ããã£ã³ã»ã«ããŸã è¿°èª ãããŠçãã åç.
-dCHARS
æå 次ã®XNUMXã€ä»¥äžã®æåã®ã·ãŒã±ã³ã¹ã§ããã次ã®æåã§ãã£ãŠã¯ãªããŸããã
ã¹ããŒã¹ãåã«ä»ããŸãã ä»ã®æåã¯ãã³ã³ãã€ã©ãŒã«ãã£ãŠé©åã«è§£éãããŸãã
GCCã®å°æ¥ã®ããŒãžã§ã³çšã«äºçŽãããŠãããããé»ã£ãŠç¡èŠãããŸãã æå®ããå Žå
åäœã競åããæåã®å Žåãçµæã¯æªå®çŸ©ã§ãã
M éåžžã®åºåã®ä»£ããã«ã次ã®ãªã¹ããçæããŸã #å®çŸ©ãã ãã¹ãŠã®ãã£ã¬ã¯ãã£ã
ããªããã»ããµã®å®è¡äžã«å®çŸ©ããããã¯ãïŒäºåå®çŸ©ããããã®ãå«ãïŒ
ãã¯ãã ããã«ãããã®ããŒãžã§ã³ã§äºåå®çŸ©ãããŠãããã®ãèŠã€ããæ¹æ³ãåŸãããŸãã
ããªããã»ããµã ãã¡ã€ã«ããªããšä»®å®ããŸã ãµãŒãã ã³ãã³ã
foo.hã«è§ŠããŸãã cpp -dM foo.h
äºåå®çŸ©ããããã¹ãŠã®ãã¯ãã衚瀺ãããŸãã
ããªãã䜿çšããŠããå Žå -dM ãªã㧠-E ãªãã·ã§ã³ã -dM ã®å矩èªãšããŠè§£éãããŸã
-fdump-rtl-mach.
D ããã M XNUMXã€ã®ç¹ãé€ããŠïŒããã¯ããŸã äºåå®çŸ©ããããã¯ããå«ãã
outputs äž¡èšèªã§ ã #å®çŸ©ãã ãã£ã¬ã¯ãã£ããšååŠçã®çµæã äž¡æ¹ã®çš®é¡
åºåã®ã¯æšæºåºåãã¡ã€ã«ã«éãããŸãã
N ããã Dããã ãããã¯ãåã®ã¿ãåºåããå±éã¯åºåããŸããã
I åºå #include ååŠçã®çµæã«å ããŠãã£ã¬ã¯ãã£ãã
U ããã D ãã ããå±éããããã¯ãããŸãã¯å®çŸ©ããã¹ãããããã¯ãã®ã¿
ããªããã»ããµãã£ã¬ã¯ãã£ãã§ã¯ãåºåãããŸãã åºåã¯äœ¿çšãããŸã§é 延ããŸããŸãã¯
ãã¯ãã®ãã¹ã; ãš #undef ãã¹ãããããã¯ãã®ãã£ã¬ã¯ãã£ããåºåãããŸãã
åœæã¯æªå®çŸ©ã
-P ããªããã»ããµããã®åºåã§ã®ã©ã€ã³ããŒã«ãŒã®çæãçŠæ¢ããŸãã ããã¯
Cã³ãŒãã§ã¯ãªããã®ã§ããªããã»ããµãå®è¡ãããšãã«åœ¹ç«ã¡ãéä¿¡ãããŸã
ã©ã€ã³ããŒã«ãŒã«ãã£ãŠæ··ä¹±ããå¯èœæ§ã®ããããã°ã©ã ã«ã
-C ã³ã¡ã³ããç Žæ£ããªãã§ãã ããã ãã¹ãŠã®ã³ã¡ã³ãã¯ãåºåãã¡ã€ã«ã«æž¡ãããŸãã
ãã£ã¬ã¯ãã£ããšãšãã«åé€ããããåŠçããããã£ã¬ã¯ãã£ãå ã®ã³ã¡ã³ãã®å Žåã
䜿çšãããšãã¯å¯äœçšã«åããå¿ èŠããããŸã -C; ããã¯ããªããã»ããµã«
ã³ã¡ã³ãã¯ããèªäœãããŒã¯ã³ãšããŠæ±ããŸãã ããšãã°ãã«è¡šç€ºãããã³ã¡ã³ã
ãã£ã¬ã¯ãã£ãã©ã€ã³ãšãªããã®ã®éå§ã¯ããã®ã©ã€ã³ãã«å€ããå¹æããããŸã
éåžžã®ãœãŒã¹è¡ãè¡ã®æåã®ããŒã¯ã³ã¯ãã¯ã #.
-CC ãã¯ãå±éäžãå«ããã³ã¡ã³ããç Žæ£ããªãã§ãã ããã ãã㯠-Cé€ããŸã
ãã¯ãã«å«ãŸããã³ã¡ã³ãã¯ãåºåãã¡ã€ã«ã«ãæž¡ãããŸãã
ãã¯ããå±éãããŸãã
ã®å¯äœçšã«å ã㊠-C ãªãã·ã§ã³ã -CC ãªãã·ã§ã³ã¯ãã¹ãŠã®C ++ã¹ã¿ã€ã«ãåŒãèµ·ãããŸã
Cã¹ã¿ã€ã«ã®ã³ã¡ã³ãã«å€æããããã¯ãå ã®ã³ã¡ã³ãã ããã¯åŸã§é²ãããã§ã
ãœãŒã¹è¡ã®æ®ãã®éšåã誀ã£ãŠã³ã¡ã³ãã¢ãŠãããããšã«ãããã®ãã¯ãã®äœ¿çšã
ãã® -CC ãªãã·ã§ã³ã¯éåžžãlintã³ã¡ã³ãããµããŒãããããã«äœ¿çšãããŸãã
-åŸæ¥ã®-cpp
ISO Cã§ã¯ãªããæãªããã®Cããªããã»ããµã®åäœãæš¡å£ããŠã¿ãŠãã ãã
ããªããã»ããµã
-äžéé³å
ããªãŒã°ã©ãã·ãŒã±ã³ã¹ãåŠçããŸãã ãããã¯XNUMXæåã®ã·ãŒã±ã³ã¹ã§ããããã¹ãŠ
??ãåäžæåãè¡šãããã«ISOCã«ãã£ãŠå®çŸ©ãããŠããŸãã äŸãã°ã ?? / ã¹ã¿ã³ã
for \ã®ã§ã '?? / n' æ¹è¡ã®æåå®æ°ã§ãã ããã©ã«ãã§ã¯ãGCCã¯ç¡èŠããŸã
ããªãŒã°ã©ãã§ãããæšæºæºæ ã¢ãŒãã§ã¯å€æãããŸãã ãåç §ããŠãã ãã -æšæº ãš -ã¢ã³ã·
ãªãã·ã§ã³ã
XNUMXã€ã®äžéé³åãšãã®ä»£æ¿ã¯
äžéé³åïŒ??ïŒ??ïŒ?? <??> ?? = ?? / ?? ' ??ïŒ ??-
眮æïŒ[] {}ïŒ\ ^ | ã
-ãªããã
éåžžã«çããã¡ã€ã«ã®ã¿ãèš±å¯ãããã¡ã€ã«ã·ã¹ãã ãåé¿ããããã®ç¹å¥ãªã³ãŒããæå¹ã«ãã
MS-DOSãªã©ã®ååã
- å©ããŠ
--ã¿ãŒã²ãããã«ã
äœãååŠçãã代ããã«ããã¹ãŠã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã説æããããã¹ããå°å·ããŸãã
-v åé·ã¢ãŒãã å®è¡éå§æã«GNUCPPã®ããŒãžã§ã³çªå·ãåºåãã
ã€ã³ã¯ã«ãŒããã¹ã®æçµåœ¢åŒãå ±åããŸãã
-H ä»ã®éåžžã®ã¢ã¯ãã£ããã£ã«å ããŠã䜿çšãããåããããŒãã¡ã€ã«ã®ååãåºåããŸãã å
ååã¯ã€ã³ãã³ããããŠã #include ã¹ã¿ãã¯ã§ãã ããªã³ã³ãã€ã«æžã¿ããããŒ
ç¡å¹ã§ããããšãå€æããå Žåã§ãããã¡ã€ã«ãå°å·ãããŸãã ç¡å¹ãªããªã³ã³ãã€ã«æžã¿
ããããŒãã¡ã€ã«ã¯ ...NS ãšæå¹ãªãã® ïŒ... .
-ããŒãžã§ã³
- ããŒãžã§ã³
GNUCPPã®ããŒãžã§ã³çªå·ãå°å·ããŸãã ããã·ã¥XNUMXã€ã§ãéåžžã©ããååŠçã«é²ã¿ãŸãã
XNUMXã€ã®ããã·ã¥ã§ãããã«çµäºããŸãã
éé ãªãã·ã§ã³ ããž ã ã¢ã»ã³ãã©
ãªãã·ã§ã³ãã¢ã»ã³ãã©ã«æž¡ãããšãã§ããŸãã
-ãããªãã·ã§ã³
åæ Œ ãªãã·ã§ã³ ã¢ã»ã³ãã©ã®ãªãã·ã§ã³ãšããŠã ããã ãªãã·ã§ã³ ã«ã³ããå«ãŸããåå²ãããŸã
ã«ã³ãã§è€æ°ã®ãªãã·ã§ã³ã«ã
-Xã¢ã»ã³ãã©ãŒ ãªãã·ã§ã³
åæ Œ ãªãã·ã§ã³ ã¢ã»ã³ãã©ã®ãªãã·ã§ã³ãšããŠã ããã䜿çšããŠãã·ã¹ãã åºæã®äŸçµŠãè¡ãããšãã§ããŸã
GCCãèªèããªãã¢ã»ã³ãã©ãªãã·ã§ã³ã
åŒæ°ãåããªãã·ã§ã³ãæž¡ãããå Žåã¯ã次ã䜿çšããå¿ èŠããããŸã -Xã¢ã»ã³ãã©ãŒ äºåºŠ
ãªãã·ã§ã³çšã«XNUMXåãåŒæ°çšã«XNUMXåã
ãªãã·ã§ã³ for é£çµ
ãããã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ããªããžã§ã¯ããã¡ã€ã«ãå®è¡å¯èœãã¡ã€ã«ã«ãªã³ã¯ãããšãã«æ©èœããŸã
åºåãã¡ã€ã«ã ã³ã³ãã€ã©ããªã³ã¯ã¹ããããå®è¡ããŠããªãå Žåããããã¯ç¡æå³ã§ãã
ãªããžã§ã¯ããã¡ã€ã«å
ç¹å¥ã«èªèããããµãã£ãã¯ã¹ã§çµãããªããã¡ã€ã«åã¯ã
ãªããžã§ã¯ããã¡ã€ã«ãŸãã¯ã©ã€ãã©ãªã ïŒãªããžã§ã¯ããã¡ã€ã«ã¯ããªã³ã«ãŒã«ãã£ãŠã©ã€ãã©ãªãšåºå¥ãããŸã
ãã¡ã€ã«ã®å 容ã«å¿ããŠãïŒãªã³ã¯ãè¡ãããå Žåããããã®ãªããžã§ã¯ããã¡ã€ã«ã¯æ¬¡ã®ããã«äœ¿çšãããŸãã
ãªã³ã«ãžã®å ¥åã
-c
-S
-E ãããã®ãªãã·ã§ã³ã®ããããã䜿çšãããŠããå Žåããªã³ã«ãŒã¯å®è¡ãããããªããžã§ã¯ããã¡ã€ã«å
åŒæ°ãšããŠäœ¿çšããªãã§ãã ããã
-lã©ã€ãã©ãª
-l ã©ã€ãã©ãª
ãšããååã®ã©ã€ãã©ãªãæ€çŽ¢ããŸã ã©ã€ãã©ãª ãªã³ã¯ãããšãã ïŒXNUMXçªç®ã®éžæè¢
åå¥ã®åŒæ°ãšããŠã®ã©ã€ãã©ãªã¯ãPOSIXæºæ ã®ã¿ãç®çãšããŠããããå§ãããŸãããïŒ
ã³ãã³ãã®ã©ãã«ãã®ãªãã·ã§ã³ãæžããã«ãã£ãŠéããçããŸãã ãªã³ã«ãŒæ€çŽ¢
ã©ã€ãã©ãªãšãªããžã§ã¯ããã¡ã€ã«ãæå®ãããé åºã§åŠçããŸãã ãããã£ãŠã ãµãŒã
-lz ããŒãªãŒ ã©ã€ãã©ãªãæ€çŽ¢ z ãã¡ã€ã«åŸ ãµãŒã ããããåã« ããŒãªãŒã å Žå ããŒãªãŒ ãæããŸã
ã®æ©èœ zããããã®é¢æ°ã¯ããŒããããªãå ŽåããããŸãã
ãªã³ã«ã¯ããã£ã¬ã¯ããªã®æšæºãªã¹ãã§ã©ã€ãã©ãªãæ€çŽ¢ããŸããããã¯å®éã«ã¯
ååã®ä»ãããã¡ã€ã« ã©ã€ãã©ãª.aã ãªã³ã«ã¯ããã®ãã¡ã€ã«ãæå®ãããŠãããã®ããã«äœ¿çšããŸã
æ£ç¢ºã«ã¯ååã§ã
æ€çŽ¢ããããã£ã¬ã¯ããªã«ã¯ãããã€ãã®æšæºã·ã¹ãã ãã£ã¬ã¯ããªã«å ããŠã
ã§æå®ãã -L.
éåžžããã®æ¹æ³ã§èŠã€ãã£ããã¡ã€ã«ã¯ã©ã€ãã©ãªãã¡ã€ã«ã§ã---ã¡ã³ããŒã
ãªããžã§ã¯ããã¡ã€ã«ã ãªã³ã«ã¯ãã¢ãŒã«ã€ããã¡ã€ã«ãã¹ãã£ã³ããŠã¡ã³ããŒãæ¢ãããšã«ãããã¢ãŒã«ã€ããã¡ã€ã«ãåŠçããŸã
ãããŸã§ã«åç §ãããŠãããå®çŸ©ãããŠããªãã·ã³ãã«ãå®çŸ©ããŸãã ãããã
èŠã€ãã£ããã¡ã€ã«ã¯éåžžã®ãªããžã§ã¯ããã¡ã€ã«ã§ãããéåžžã®æ¹æ³ã§ãªã³ã¯ãããŠããŸãã The
䜿çšã®éãã®ã¿ -l ãªãã·ã§ã³ãšãã¡ã€ã«åã®æå®ã¯ããã§ã -l
ãµã©ãŠã³ã ã©ã€ãã©ãª ã ãªã ãš .a ããã€ãã®ãã£ã¬ã¯ããªãæ€çŽ¢ããŸãã
-lobjc
ããªãã¯ãã®ç¹å¥ãªå Žåãå¿ èŠã§ã -l Objective-CãŸãã¯ããªã³ã¯ããããã®ãªãã·ã§ã³
ç®ç-C++ããã°ã©ã ã
-nostartfiles
ãªã³ã¯ãããšãã¯ãæšæºã®ã·ã¹ãã ã¹ã¿ãŒãã¢ãããã¡ã€ã«ã䜿çšããªãã§ãã ããã æšæºã·ã¹ãã
ã©ã€ãã©ãªã¯é垞䜿çšãããŸããã -nostdlib or -nodefaultlibs 䜿çšãããŠããã
-nodefaultlibs
ãªã³ã¯ãããšãã¯ãæšæºã®ã·ã¹ãã ã©ã€ãã©ãªã䜿çšããªãã§ãã ããã æå®ããã©ã€ãã©ãªã®ã¿
ãªã³ã«ã«æž¡ãããã·ã¹ãã ã©ã€ãã©ãªã®ãªã³ã¯ãæå®ãããªãã·ã§ã³ãªã©
ã-static-libgccããŸãã¯ã-shared-libgccããªã©ã¯ç¡èŠãããŸãã æšæºã®èµ·åãã¡ã€ã«ã¯æ¬¡ã®ãšããã§ãã
ãªãéããéåžžã©ãã䜿çšãããŸãã -nostartfiles 䜿çšãããŠããã
ã³ã³ãã€ã©ã¯ããmemcmpãããmemsetãããmemcpyããããã³ãmemmoveããžã®åŒã³åºããçæããå ŽåããããŸãã ãããã¯
ãšã³ããªã¯éåžžãlibcã®ãšã³ããªã«ãã£ãŠè§£æ±ºãããŸãã ãããã®ãšã³ããªãã€ã³ãã¯
ãã®ãªãã·ã§ã³ãæå®ãããŠããå Žåãä»ã®ã¡ã«ããºã ãä»ããŠæäŸãããŸãã
-nostdlib
ãªã³ã¯ãããšãã¯ãæšæºã®ã·ã¹ãã ã¹ã¿ãŒãã¢ãããã¡ã€ã«ãŸãã¯ã©ã€ãã©ãªã䜿çšããªãã§ãã ããã ã¹ã¿ãŒãã¢ãããªã
ãã¡ã€ã«ãšæå®ããã©ã€ãã©ãªã®ã¿ããªã³ã«ãšãªãã·ã§ã³ã«æž¡ãããŸã
ã-static-libgccããªã©ã®ã·ã¹ãã ã©ã€ãã©ãªã®ãªã³ã±ãŒãžãæå®ãããã
ã-shared-libgccãã¯ç¡èŠãããŸãã
ã³ã³ãã€ã©ã¯ããmemcmpãããmemsetãããmemcpyããããã³ãmemmoveããžã®åŒã³åºããçæããå ŽåããããŸãã ãããã¯
ãšã³ããªã¯éåžžãlibcã®ãšã³ããªã«ãã£ãŠè§£æ±ºãããŸãã ãããã®ãšã³ããªãã€ã³ãã¯
ãã®ãªãã·ã§ã³ãæå®ãããŠããå Žåãä»ã®ã¡ã«ããºã ãä»ããŠæäŸãããŸãã
ã«ãã£ãŠãã€ãã¹ãããæšæºã©ã€ãã©ãªã®XNUMX〠-nostdlib ãš -nodefaultlibs is libgcc.a
ç¹å®ã®æ¬ ç¹ãå æããããã«GCCã䜿çšããå éšãµãã«ãŒãã³ã®ã©ã€ãã©ãª
ãã·ã³ããŸãã¯ããã€ãã®èšèªã®ç¹å¥ãªããŒãºã
ã»ãšãã©ã®å Žåã libgcc.a ä»ã®æšæºã©ã€ãã©ãªãé¿ãããå Žåã§ãã
èšãæããã°ãããªããæå®ãããšã -nostdlib or -nodefaultlibs ããªãã¯éåžžãã¹ãã§ã
æå®ãã -lgcc åãããã«ã ããã«ããããžã®æªè§£æ±ºã®åç §ããªãããšãä¿èšŒãããŸã
å éšGCCã©ã€ãã©ãªãµãã«ãŒãã³ã ïŒãã®ãããªå éšãµãã«ãŒãã³ã®äŸã¯æ¬¡ã®ãšããã§ãã
__äž»èŠãC++ ã³ã³ã¹ãã©ã¯ã¿ãŒã確å®ã«åŒã³åºãããããã«ããããã«äœ¿çšãããŸãã)
-ãã€
ããããµããŒãããã¿ãŒã²ããäžã§äœçœ®ã«äŸåããªãå®è¡å¯èœãã¡ã€ã«ãçæããŸãã äºæž¬å¯èœ
çµæãšããŠãã³ã³ãã€ã«ã«äœ¿çšãããã®ãšåããªãã·ã§ã³ã®ã»ãããæå®ããå¿ èŠããããŸãïŒ-fpie,
-fPIEããŸãã¯ã¢ãã«ãµããªãã·ã§ã³ïŒãã®ãªã³ã«ãŒãªãã·ã§ã³ãæå®ããå Žåã
-rdynamic
æãæž¡ã -ãšã¯ã¹ããŒã-åç ELFãªã³ã«ãŒã«ãããããµããŒãããã¿ãŒã²ããäžã§ã ãã
䜿çšæžã¿ã®ã·ã³ãã«ã ãã§ãªãããã¹ãŠã®ã·ã³ãã«ãåçã·ã³ãã«ã«è¿œå ããããã«ãªã³ã«ã«æ瀺ããŸã
ããŒãã«ã ãã®ãªãã·ã§ã³ã¯ããdlopenãã®äžéšã®äœ¿çšãŸãã¯ååŸãå¯èœã«ããããã«å¿ èŠã§ãã
ããã°ã©ã å ããã®ããã¯ãã¬ãŒã¹ã
-s å®è¡å¯èœãã¡ã€ã«ãããã¹ãŠã®ã·ã³ãã«ããŒãã«ãšåé 眮æ å ±ãåé€ããŸãã
-éç
ãã€ãããã¯ãªã³ã¯ããµããŒãããã·ã¹ãã ã§ã¯ãããã«ããå ±æãªã³ã¯ãšã®ãªã³ã¯ã劚ããããŸã
ã©ã€ãã©ãªã ä»ã®ã·ã¹ãã ã§ã¯ããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-å ±æ
å ±æãªããžã§ã¯ããäœæããŸãããã®ãªããžã§ã¯ããä»ã®ãªããžã§ã¯ããšãªã³ã¯ããŠã
å®è¡å¯èœã ãã¹ãŠã®ã·ã¹ãã ããã®ãªãã·ã§ã³ããµããŒãããŠããããã§ã¯ãããŸããã äºæž¬å¯èœãªçµæãââåŸãã«ã¯ã
ã³ã³ãã€ã«ã«äœ¿çšãããã®ãšåããªãã·ã§ã³ã®ã»ãããæå®ããŸãïŒ-fpic, -fPICããŸãã¯ã¢ãã«
ãµããªãã·ã§ã³ïŒãã®ãªã³ã«ãŒãªãã·ã§ã³ãæå®ããå Žåã[1]
-å ±æ-libgcc
-éç-libgcc
ãæäŸããã·ã¹ãã äž libgcc å ±æã©ã€ãã©ãªãšããŠããããã®ãªãã·ã§ã³ã¯
ãããããå ±æããŒãžã§ã³ãŸãã¯éçããŒãžã§ã³ã®ããããã ã®å ±æããŒãžã§ã³ããªãå Žå libgcc ãŸãã
ã³ã³ãã€ã©ãŒã®æ§ææã«ãã«ããããå Žåããããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
ã¢ããªã±ãŒã·ã§ã³ãå ±æã䜿çšããå¿ èŠãããããã€ãã®ç¶æ³ããããŸã libgcc
éçããŒãžã§ã³ã®ä»£ããã«ã ãããã®äžã§æãäžè¬çãªã®ã¯ãã¢ããªã±ãŒã·ã§ã³ã
ç°ãªãå ±æã©ã€ãã©ãªéã§äŸå€ãã¹ããŒããŠãã£ããããããšèããŠããŸãã ãã®å Žåã
åã©ã€ãã©ãªãšã¢ããªã±ãŒã·ã§ã³èªäœã¯ãå ±æã䜿çšããå¿ èŠããããŸã libgcc.
ãããã£ãŠãG++ããã³GCJãã©ã€ããŒã¯èªåçã«è¿œå ããŸã -å ±æ-libgcc ããªããæ§ç¯ãããšãã¯ãã€ã§ã
C ++ããã³Javaããã°ã©ã ã¯éåžžãå ±æã©ã€ãã©ãªãŸãã¯ã¡ã€ã³ã®å®è¡å¯èœãã¡ã€ã«ã䜿çšããããã
äŸå€ãªã®ã§ãããã¯æ£ããããšã§ãã
代ããã«ãGCCãã©ã€ããŒã䜿çšããŠå ±æã©ã€ãã©ãªãŒãäœæãããšãããããå ±æã©ã€ãã©ãªãŒã§ããããšãããããŸãã
åžžã«å ±æãšãªã³ã¯ãããŠããããã§ã¯ãããŸãã libgccã GCCãæ€åºããå Žåããã®æ§æã§
æéããªãã·ã§ã³ããµããŒãããŠããªãéGNUãªã³ã«ãŒãŸãã¯GNUãªã³ã«ãŒãããããš
--ãã-ãã¬ãŒã -hdrãããã¯ã®å ±æããŒãžã§ã³ããªã³ã¯ããŸã libgcc å ±æã©ã€ãã©ãªã«
ããã©ã«ãã ãã以å€ã®å Žåã¯ããªã³ã«ãŒãå©çšããŠãªã³ã¯ãæé©åããŸã
ã®å ±æããŒãžã§ã³ã§ libgccãlibgccã®éçããŒãžã§ã³ãšã®ãªã³ã¯
ããã©ã«ãã ããã«ãããäŸå€ããã®ãããªå ±æã©ã€ãã©ãªãä»ããŠäŒæããããšãã§ããŸãã
ã©ã€ãã©ãªã®ããŒãæã«åé 眮ã³ã¹ããçºçããŸãã
ãã ããã©ã€ãã©ãªãŸãã¯ã¡ã€ã³ã®å®è¡å¯èœãã¡ã€ã«ãäŸå€ãã¹ããŒãŸãã¯ãã£ããããããšã«ãªã£ãŠããå Žåã¯ã
ã§äœ¿çšãããèšèªã«å¿ããŠãG++ãŸãã¯GCJãã©ã€ããŒã䜿çšããŠãªã³ã¯ããå¿ èŠããããŸã
ããã°ã©ã ããŸãã¯ãªãã·ã§ã³ã䜿çšã㊠-å ±æ-libgccãå ±æãšãªã³ã¯ãããããã«
libgcc.
-éç-libasan
æ -fsanitize = address ãªãã·ã§ã³ã¯ãããã°ã©ã ãGCCãã©ã€ããŒããªã³ã¯ããããã«äœ¿çšãããŸã
èªåçã«ãªã³ã¯ããŸã ãªããµã³ã å Žå ãªããµã³ å ±æã©ã€ãã©ãªãšããŠå©çšå¯èœã§ããã
ã -éç ãªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããã¯å ±æããŒãžã§ã³ã«å¯ŸããŠãªã³ã¯ããŸã ãªããµã³.
ãã® -éç-libasan ãªãã·ã§ã³ã¯ãGCCãã©ã€ããŒã«ãªã³ã¯ãæ瀺ããŸã ãªããµã³ éçã«ããªã
å¿ ç¶çã«ä»ã®ã©ã€ãã©ãªãéçã«ãªã³ã¯ããŸãã
-static-libtsan
æ -fsanitize = thread ãªãã·ã§ã³ã¯ãããã°ã©ã ãGCCãã©ã€ããŒããªã³ã¯ããããã«äœ¿çšãããŸã
èªåçã«ãªã³ã¯ããŸã ãªããã¡ã³ã å Žå ãªããã¡ã³ å ±æã©ã€ãã©ãªãšããŠå©çšå¯èœã§ããã
ã -éç ãªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããã¯å ±æããŒãžã§ã³ã«å¯ŸããŠãªã³ã¯ããŸã ãªããã¡ã³.
ãã® -static-libtsan ãªãã·ã§ã³ã¯ãGCCãã©ã€ããŒã«ãªã³ã¯ãæ瀺ããŸã ãªããã¡ã³ éçã«ããªã
å¿ ç¶çã«ä»ã®ã©ã€ãã©ãªãéçã«ãªã³ã¯ããŸãã
-éç-liblsan
æ -fsanitize = Leak ãªãã·ã§ã³ã¯ãããã°ã©ã ãGCCãã©ã€ããŒããªã³ã¯ããããã«äœ¿çšãããŸã
èªåçã«ãªã³ã¯ããŸã ãªããµã³ã å Žå ãªããµã³ å ±æã©ã€ãã©ãªãšããŠå©çšå¯èœã§ããã
ã -éç ãªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããã¯å ±æããŒãžã§ã³ã«å¯ŸããŠãªã³ã¯ããŸã ãªããµã³.
ãã® -éç-liblsan ãªãã·ã§ã³ã¯ãGCCãã©ã€ããŒã«ãªã³ã¯ãæ瀺ããŸã ãªããµã³ éçã«ããªã
å¿ ç¶çã«ä»ã®ã©ã€ãã©ãªãéçã«ãªã³ã¯ããŸãã
-éç-libubsan
æ -fsanitize = undefined ãªãã·ã§ã³ã¯ãããã°ã©ã ãGCCãã©ã€ããŒããªã³ã¯ããããã«äœ¿çšãããŸã
èªåçã«ãªã³ã¯ããŸã ãªããµã³ã å Žå ãªããµã³ å ±æã©ã€ãã©ãªãšããŠå©çšå¯èœã§ãã
ãš -éç ãªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããã¯å ±æããŒãžã§ã³ã«å¯ŸããŠãªã³ã¯ããŸã
ãªããµã³ãéžæããŸãã -éç-libubsan ãªãã·ã§ã³ã¯ãGCCãã©ã€ããŒã«ãªã³ã¯ãæ瀺ããŸã ãªããµã³
éçã«ãå¿ ãããä»ã®ã©ã€ãã©ãªãéçã«ãªã³ã¯ããå¿ èŠã¯ãããŸããã
-static-libstdc ++
æ g ++ ããã°ã©ã ã¯C++ããã°ã©ã ããªã³ã¯ããããã«äœ¿çšãããéåžžã¯èªåçã«ãªã³ã¯ããŸã
ã«å¯Ÿã㊠libstdc ++ã å Žå libstdc ++ å ±æã©ã€ãã©ãªãšããŠå©çšå¯èœã§ããã -éç
ãªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããã¯å ±æããŒãžã§ã³ã«å¯ŸããŠãªã³ã¯ããŸã libstdc ++ã ããã¯
éåžžã¯åé¡ãããŸããã ãã ããã®ããŒãžã§ã³ãããªãŒãºãããšäŸ¿å©ãªå ŽåããããŸã libstdc ++
å®å šã«éçãªãªã³ã¯ã«å°éããããšãªããããã°ã©ã ã«ãã£ãŠäœ¿çšãããŸãã The
-static-libstdc ++ ãªãã·ã§ã³ã¯ g ++ ãªã³ã¯ãããã©ã€ã㌠libstdc ++ éçã«ããªã
å¿ ç¶çã«ä»ã®ã©ã€ãã©ãªãéçã«ãªã³ã¯ããŸãã
-ã·ã³ããªãã¯
å ±æãªããžã§ã¯ããæ§ç¯ãããšãã«ãåç §ãã°ããŒãã«ã·ã³ãã«ã«ãã€ã³ãããŸãã äœãã«ã€ããŠèŠåãã
æªè§£æ±ºã®åç §ïŒãªã³ã¯ãšãã£ã¿ãªãã·ã§ã³ã§äžæžããããªãéãïŒ -Xãªã³ã«ãŒ -z
-Xãªã³ã«ãŒ å®çŸ©ïŒã ãã®ãªãã·ã§ã³ããµããŒãããŠããã·ã¹ãã ã¯ãããããã§ãã
-T ã¹ã¯ãªãã
ã ã¹ã¯ãªãã ãªã³ã«ãŒã¹ã¯ãªãããšããŠã ãã®ãªãã·ã§ã³ã¯ãã䜿çšããã»ãšãã©ã®ã·ã¹ãã ã§ãµããŒããããŠããŸã
GNUãªã³ã«ãŒã ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãªããã¢ããŒãã¿ãŒã²ãããªã©ãäžéšã®ã¿ãŒã²ããã§ã¯ã
ã -T æªå®çŸ©ã®ã·ã³ãã«ãžã®åç §ãåé¿ããããã«ããªã³ã¯æã«ãªãã·ã§ã³ãå¿ èŠã«ãªãå ŽåããããŸãã
-Xãªã³ã«ãŒ ãªãã·ã§ã³
åæ Œ ãªãã·ã§ã³ ãªã³ã«ã®ãªãã·ã§ã³ãšããŠã ããã䜿çšããŠãã·ã¹ãã åºæã®äŸçµŠãè¡ãããšãã§ããŸã
GCCãèªèããªããªã³ã«ãŒãªãã·ã§ã³ã
å¥ã®åŒæ°ãåããªãã·ã§ã³ãæž¡ãããå Žåã¯ã次ã䜿çšããå¿ èŠããããŸã -Xãªã³ã«ãŒ
XNUMXåããªãã·ã§ã³çšã«XNUMXåãåŒæ°çšã«XNUMXåã ããšãã°ãåæ Œããã«ã¯ -䞻匵ãã
å®çŸ©ãããªãã¯æžãå¿ èŠããããŸã -Xãªã³ã«ãŒ -䞻匵ãã -Xãªã³ã«ãŒ å®çŸ©ã ããã¯åäœããŸãã
æžã蟌ã -Xãªã³ã«ãŒ "-䞻匵ãã å®çŸ©ããããã¯æååå šäœã
åäžã®åŒæ°ãããã¯ããªã³ã«ãŒãæåŸ ãããã®ã§ã¯ãããŸããã
GNUãªã³ã«ã䜿çšããå Žåãéåžžããªã³ã«ã«åŒæ°ãæž¡ãæ¹ã䟿å©ã§ãã
ã䜿çšãããªãã·ã§ã³ ãªãã·ã§ã³=å€ åå¥ã®åŒæ°ãšããŠãããæ§æã ããšãã°ãããªãã¯
æå®ã§ããŸã -Xãªã³ã«ãŒ -Map = output.map ã§ã¯ãªã -Xãªã³ã«ãŒ -å°å³ -Xãªã³ã«ãŒ åºå.ããã.
ä»ã®ãªã³ã«ã¯ãã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã§ãã®æ§æããµããŒãããŠããªãå ŽåããããŸãã
-Wlããªãã·ã§ã³
åæ Œ ãªãã·ã§ã³ ãªã³ã«ã®ãªãã·ã§ã³ãšããŠã ããã ãªãã·ã§ã³ ã«ã³ããå«ãŸããã«åå²ãããŸã
ã«ã³ãã§ã®è€æ°ã®ãªãã·ã§ã³ã ãã®æ§æã䜿çšããŠãåŒæ°ãã«æž¡ãããšãã§ããŸã
ãªãã·ã§ã³ã äŸãã°ã -Wlã-Mapãoutput.map ãã¹ -å°å³ åºå.ããã ãªã³ã«ãŒã«ã ãã€
GNUãªã³ã«ãŒã䜿çšãããšãåãå¹æãåŸãããšãã§ããŸã -Wlã-Map = output.map.
泚ïŒUbuntu 8.10以éã®ããŒãžã§ã³ã§ã¯ãLDFLAGSã®ãªãã·ã§ã³ -Wlã-zãrelro 䜿çšãããŠããã
ç¡å¹ã«ããã«ã¯ã -Wlã-zãnorelro.
-u ã·ã³ãã«
ã·ã³ãã«ã®ãµãããã ã·ã³ãã« ã¯æªå®çŸ©ã§ãããã©ã€ãã©ãªã¢ãžã¥ãŒã«ã®ãªã³ã¯ã匷å¶çã«å®çŸ©ããŸã
ããã 䜿çšã§ããŸã -u ã®èªã¿èŸŒã¿ã匷å¶ããããã«ç°ãªãã·ã³ãã«ã§è€æ°å
è¿œå ã®ã©ã€ãã©ãªã¢ãžã¥ãŒã«ã
ãªãã·ã§ã³ for ãã£ã¬ã¯ã㪠æ€çŽ¢
ãããã®ãªãã·ã§ã³ã¯ãããããŒãã¡ã€ã«ãã©ã€ãã©ãªãããã³ããŒããæ€çŽ¢ããããã®ãã£ã¬ã¯ããªãæå®ããŸã
ã³ã³ãã€ã©ã®ïŒ
-IDIR
ãã£ã¬ã¯ããªãè¿œå ããŸã DIR ããããŒãæ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ãã®å é ã«
ãã¡ã€ã«ã ããã䜿çšããŠãã·ã¹ãã ããããŒãã¡ã€ã«ãäžæžãããç¬èªã®ãã¡ã€ã«ã«çœ®ãæããããšãã§ããŸã
ãããã®ãã£ã¬ã¯ããªã¯ã·ã¹ãã ããããŒãã¡ã€ã«ã®åã«æ€çŽ¢ããããããããŒãžã§ã³
ãã£ã¬ã¯ããªã ãã ãããã®ãªãã·ã§ã³ã䜿çšããŠã次ãå«ããã£ã¬ã¯ããªãè¿œå ããªãã§ãã ããã
ãã³ããŒæäŸã®ã·ã¹ãã ããããŒãã¡ã€ã«ïŒäœ¿çš -isystem ãã®ããã«ïŒã è€æ°äœ¿çšããå Žå
-I ãªãã·ã§ã³ã®å Žåããã£ã¬ã¯ããªã¯å·Šããå³ã®é åºã§ã¹ãã£ã³ãããŸãã æšæºã·ã¹ãã
ãã£ã¬ã¯ããªã¯åŸã«ç¶ããŸãã
æšæºã·ã¹ãã ã«ãã£ã¬ã¯ããªãå«ãŸããŠããå ŽåããŸãã¯ã§æå®ããããã£ã¬ã¯ã㪠-isystemã§ããã
ã§æå®ãããŸã -I -I ãªãã·ã§ã³ã¯ç¡èŠãããŸãã ãã£ã¬ã¯ããªã¯åŒãç¶ãæ€çŽ¢ãããŸãã
ã·ã¹ãã ã€ã³ã¯ã«ãŒããã§ãŒã³ã®éåžžã®äœçœ®ã«ããã·ã¹ãã ãã£ã¬ã¯ããªãšããŠã ããã¯
ãã°ã®ããã·ã¹ãã ããããŒãä¿®æ£ããããã®GCCã®æé ãš
ãinclude_nextããã£ã¬ã¯ãã£ãã誀ã£ãŠå€æŽãããããšã¯ãããŸããã æ¬åœã«å€æŽããå¿ èŠãããå Žå
ã·ã¹ãã ãã£ã¬ã¯ããªã®æ€çŽ¢é åºã¯ã -ãã¹ããã£ã³ã¯ ããã³ -isystem ãªãã·ã§ã³ã
-iplugindir =DIR
æž¡ããããã©ã°ã€ã³ãæ€çŽ¢ãããã£ã¬ã¯ããªãèšå®ããŸã -fplugin =å
-fplugin =path/åãããã ãã®ãªãã·ã§ã³ã¯ããŠãŒã¶ãŒã䜿çšããããã®ãã®ã§ã¯ãªãã
ãã©ã€ããŒã«ãã£ãŠæž¡ãããŸãã
-iquoteDIR
ãã£ã¬ã¯ããªãè¿œå ããŸã DIR ããããŒãæ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ãã®å é ã«
ã®å Žåã®ã¿ã®ãã¡ã€ã« #include "file"; ãããã¯æ€çŽ¢ãããŸãã #include <file>,
ããã§ãªããã°ã¡ããã© -I.
-LDIR
ãã£ã¬ã¯ããªãè¿œå DIR æ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ããž -l.
-Bæ¥é èŸ
ãã®ãªãã·ã§ã³ã¯ãå®è¡å¯èœãã¡ã€ã«ãã©ã€ãã©ãªãã€ã³ã¯ã«ãŒããã¡ã€ã«ãããã³
ã³ã³ãã€ã©èªäœã®ããŒã¿ãã¡ã€ã«ã
ã³ã³ãã€ã©ãã©ã€ãããã°ã©ã ã¯ãXNUMXã€ä»¥äžã®ãµãããã°ã©ã ãå®è¡ããŸã cpp, cc1, as ãš ld.
ãã£ãŠã¿ãŸã æ¥é èŸ å®è¡ããããšããåããã°ã©ã ã®ãã¬ãã£ãã¯ã¹ãšããŠããããšãªãã®äž¡æ¹ã§
æ©æ¢°/ããŒãžã§ã³/.
å®è¡ãããµãããã°ã©ã ããšã«ãã³ã³ãã€ã©ãã©ã€ãã¯æåã« -B ãã¬ãã£ãã¯ã¹ïŒããå ŽåïŒã
ãã®ååãèŠã€ãããªãå ŽåããŸã㯠-B æå®ãããŠããªãå Žåããã©ã€ããŒã¯XNUMXã€ã®æšæºãè©Šè¡ããŸã
ãã¬ãã£ãã¯ã¹ã / usr / lib / gcc / ãš / usr / local / lib / gcc /ã ãããã®ã©ã¡ããçµæãåŸãããªãå Žå
èŠã€ãã£ããã¡ã€ã«åãå€æŽãããŠããªãããã°ã©ã åã¯ãã䜿çšããŠæ€çŽ¢ãããŸã
ã§æå®ããããã£ã¬ã¯ã㪠ãã¹ ç°å¢å€æ°ã
ã³ã³ãã€ã©ã¯ã -B ãã£ã¬ã¯ããªãåç §ãã
å¿ èŠã«å¿ããŠããã¹ã®æ«å°Ÿã«ãã£ã¬ã¯ããªåºåãæåãè¿œå ããŸãã
-B ãã£ã¬ã¯ããªåãå¹æçã«æå®ãããã¬ãã£ãã¯ã¹ã¯ã
ãªã³ã«ãŒã¯ãã³ã³ãã€ã©ãŒããããã®ãªãã·ã§ã³ã次ã®ããã«å€æããããã§ãã -L ãªã³ã«ã®ãªãã·ã§ã³ã
ã³ã³ãã€ã©ãå€æãããããããªããã»ããµã«ãã¡ã€ã«ãå«ããå Žåã«ãé©çšãããŸãã
ãããã®ãªãã·ã§ã³ã -isystem ããªããã»ããµã®ãªãã·ã§ã³ã ãã®å Žåãã³ã³ãã€ã©ã¯
è¿œå ããŸã include ãã¬ãã£ãã¯ã¹ã«ã
ã©ã³ã¿ã€ã ãµããŒããã¡ã€ã« libgcc.a ã䜿çšããŠæ€çŽ¢ããããšãã§ããŸã -B ãã¬ãã£ãã¯ã¹ã
å¿ èŠã§ãã ããã«èŠã€ãããªãå Žåã¯ãäžèšã®XNUMXã€ã®æšæºãã¬ãã£ãã¯ã¹ãè©Šããã
ãã¹ãŠã§ãããŸãã ãããã®æ¹æ³ã§ãã¡ã€ã«ãèŠã€ãããªãå Žåããã¡ã€ã«ã¯ãªã³ã¯ããé€å€ãããŸãã
ã®ãããªãã¬ãã£ãã¯ã¹ãæå®ããå¥ã®æ¹æ³ -B ãã¬ãã£ãã¯ã¹ã¯ç°å¢ã䜿çšããããšã§ã
å€æ° GCC_EXEC_PREFIX.
ç¹å¥ãªæšã¿ãšããŠã -B is [dir /] stageN /ããã§ã N ã¯æ°åã§ã
0ãã9ã®ç¯å²ã§ã次ã®ããã«çœ®ãæããããŸã [dir /] includeã ããã¯èµ·åãæ¯æŽããããã§ã-
ã³ã³ãã€ã©ãã¹ãã©ããããŸãã
-specs =file
ããã»ã¹ file ã³ã³ãã€ã©ãæšæºãèªã¿èŸŒãã åŸ ã¹ãã㯠ãã¡ã€ã«ããªãŒããŒã©ã€ããããã
ããã©ã«ã㯠gccã® ãã©ã€ããŒããã°ã©ã ã¯ãæž¡ãã¹ã€ããã決å®ãããšãã«äœ¿çšããŸã
ããž cc1, cc1ãã©ã¹, as, ldããªã©ãè€æ° -specs =file ã§æå®ã§ããŸã
ã³ãã³ãã©ã€ã³ã§ãå·Šããå³ã«é çªã«åŠçãããŸãã
--sysroot =DIR
ã DIR ããããŒãšã©ã€ãã©ãªã®è«çã«ãŒããã£ã¬ã¯ããªãšããŠã ããšãã°ã
ã³ã³ãã€ã©ã¯éåžžãã§ããããŒãæ€çŽ¢ããŸã / usr / include ããã³ã®ã©ã€ãã©ãª / usr / libããã
代ããã«æ€çŽ¢ dir / usr / include ãš dir / usr / lib.
ãã®ãªãã·ã§ã³ãš -isysroot ãªãã·ã§ã³ã次㫠--sysroot ãªãã·ã§ã³
ã©ã€ãã©ãªã«é©çšãããŸããã -isysroot ãªãã·ã§ã³ã¯ããããŒãã¡ã€ã«ã«é©çšãããŸãã
GNUãªã³ã«ïŒããŒãžã§ã³2.16以éïŒã¯ããã«å¿ èŠãªãµããŒããæã£ãŠããŸã
ãªãã·ã§ã³ã ãªã³ã«ããã®ãªãã·ã§ã³ããµããŒãããŠããªãå Žåãã®ããããŒãã¡ã€ã«ã®åŽé¢
--sysroot ãŸã æ©èœããŸãããã©ã€ãã©ãªã®åŽé¢ã¯æ©èœããŸããã
--no-sysroot-ãµãã£ãã¯ã¹
äžéšã®ã¿ãŒã²ããã§ã¯ãã§æå®ãããã«ãŒããã£ã¬ã¯ããªã«ãµãã£ãã¯ã¹ãè¿œå ãããŸã --sysroot,
䜿çšãããä»ã®ãªãã·ã§ã³ã«å¿ããŠãããšãã°ããããŒã
dir /ãµãã£ãã¯ã¹/usr/ include dir / usr / includeã ãã®ãªãã·ã§ã³ã¯è¿œå ãç¡å¹ã«ããŸã
ãã®ãããªæ¥å°ŸèŸã®ã
-I- ãã®ãªãã·ã§ã³ã¯éæšå¥šã«ãªããŸããã 䜿ã£ãŠãã ãã -iquote 代ããã« -I 以åã®ãã£ã¬ã¯ããª
ã -I- ãåé€ããŸã -I-. æå®ãããã£ã¬ã¯ã㪠-I åã®ãªãã·ã§ã³
-I- ãªãã·ã§ã³ã¯æ¬¡ã®å Žåã®ã¿æ€çŽ¢ãããŸã #include "file"; ãããã¯æ€çŽ¢ãããŸãã
for #include <file>.
è¿œå ã®ãã£ã¬ã¯ããªãã§æå®ãããŠããå Žå -I åŸã®ãªãã·ã§ã³ -I-ããããã®
ãã£ã¬ã¯ããªã¯ãã¹ãŠæ€çŽ¢ãããŸã #include ãã£ã¬ã¯ãã£ãã (é垞㯠ã -I ãã£ã¬ã¯ããª
ãã®ããã«äœ¿ãããŸããïŒ
å ããŠã -I- ãªãã·ã§ã³ã¯ãçŸåšã®ãã£ã¬ã¯ããªã®äœ¿çšãçŠæ¢ããŸãïŒ
çŸåšã®å ¥åãã¡ã€ã«ã®ãœãŒã¹) ãæåã®æ€çŽ¢ãã£ã¬ã¯ããªãšã㊠#include "file".
ãã®å¹æãç¡å¹ã«ããæ¹æ³ã¯ãããŸãã -I- -ç§ã æ€çŽ¢ãæå®ã§ããŸã
ã³ã³ãã€ã©ãŒãåŒã³åºããããšãã«çŸåšã®ãã£ã¬ã¯ããªãŒã ããã¯æ£ç¢ºã«ã¯
ããªããã»ããµãããã©ã«ãã§è¡ãããšãšåãã§ãããå€ãã®å Žåãååã§ãã
-I- ããããŒãã¡ã€ã«ã®æšæºã·ã¹ãã ãã£ã¬ã¯ããªã®äœ¿çšãçŠæ¢ããŸããã
ãã®ããã«ã -I- ãš -ãã¹ããã£ã³ã¯ ç¬ç«ããŠããŸãã
æå® ã¿ãŒã²ãã ãšã¹ãã¬ããœãã·ã³ ãš ã³ã³ãã€ã©
GCCãå®è¡ããéåžžã®æ¹æ³ã¯ããšåŒã°ããå®è¡å¯èœãã¡ã€ã«ãå®è¡ããããšã§ãã gccã®ãŸã㯠æ©æ¢°-gcc ã¯ãã¹ãããšã
ã³ã³ãã€ã«ããŸã㯠æ©æ¢°-gcc-ããŒãžã§ã³ ã€ã³ã¹ããŒã«ãããããŒãžã§ã³ä»¥å€ã®ããŒãžã§ã³ãå®è¡ããã«ã¯
æçµã
Hardware Models ãš æ§æ
åã¿ãŒã²ãããã·ã³ã¿ã€ãã«ã¯ã以äžããå§ãŸãç¬èªã®ç¹å¥ãªãªãã·ã§ã³ãèšå®ã§ããŸãã -mãéžæãã
ããŸããŸãªããŒããŠã§ã¢ã¢ãã«ãŸãã¯æ§æé---ããšãã°ã68010ãš68020ããããŒãã£ã³ã°
ã³ããã»ããµãŒãŸãã¯ãªãã ã€ã³ã¹ããŒã«ãããåäžããŒãžã§ã³ã®ã³ã³ãã€ã©ãŒã¯ãä»»æã®ã¢ãã«çšã«ã³ã³ãã€ã«ã§ããŸã
ãŸãã¯æ§æãæå®ããããªãã·ã§ã³ã«å¿ããŠã
ã³ã³ãã€ã©ã®äžéšã®æ§æã¯ãéåžžã¯æ¬¡ã®ãããªè¿œå ã®ç¹å¥ãªãªãã·ã§ã³ããµããŒãããŸãã
åããã©ãããã©ãŒã äžã®ä»ã®ã³ã³ãã€ã©ãšã®äºææ§ã
AAArch64 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãAArch64å®è£ çšã«å®çŸ©ãããŠããŸãã
-mabi =å
æå®ãããããŒã¿ã¢ãã«ã®ã³ãŒããçæããŸãã 蚱容å€ã¯ ã€ã«ã32 SysVã®å Žå-
intãlong intãpointerã32ãããã§ããããŒã¿ã¢ãã«ã®ããã«ã lp64 SysVã®ãããª
intã32ãããã§ããããlongintãšpointerã64ãããã§ããããŒã¿ã¢ãã«ã
ããã©ã«ãã¯ãç¹å®ã®ã¿ãŒã²ããæ§æã«ãã£ãŠç°ãªããŸãã LP64ãš
ILP32ABIã¯ãªã³ã¯äºæã§ã¯ãããŸããã ããã°ã©ã å šäœãåããã®ã§ã³ã³ãã€ã«ããå¿ èŠããããŸã
ABIãããã³äºææ§ã®ããã©ã€ãã©ãªã®ã»ãããšãªã³ã¯ããŸãã
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã ããã¯ãGCCã
aarch64_be-*-* ã¿ãŒã²ããã
-mgeneral-regs-ã®ã¿
æ±çšã¬ãžã¹ã¿ã®ã¿ã䜿çšããã³ãŒããçæããŸãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã ããã¯ãGCCã
aarch64-*-* ãããã aarch64_be-*-* ã¿ãŒã²ããã
-mcmodel = tiny
å°ããªã³ãŒãã¢ãã«ã®ã³ãŒããçæããŸãã ããã°ã©ã ãšãã®éçã«å®çŸ©ãããã·ã³ãã«
äºãã«1GB以å ã§ããå¿ èŠããããŸãã ãã€ã³ã¿ã¯64ãããã§ãã ããã°ã©ã ã¯éçã«ããããšãã§ããŸã
ãŸãã¯åçã«ãªã³ã¯ãããŠããŸãã ãã®ã¢ãã«ã¯å®å šã«ã¯å®è£ ãããŠããããã»ãšãã©ã次ã®ããã«æ±ãããŸã
å°ãã.
-mcmodel = small
ã¹ã¢ãŒã«ã³ãŒãã¢ãã«ã®ã³ãŒããçæããŸãã ããã°ã©ã ãšãã®éçã«å®çŸ©ããã
ã·ã³ãã«ã¯äºãã«4GB以å ã«ããå¿ èŠããããŸãã ãã€ã³ã¿ã¯64ãããã§ãã ããã°ã©ã ã¯ããããšãã§ããŸã
éçãŸãã¯åçã«ãªã³ã¯ãããŠããŸãã ããã¯ããã©ã«ãã®ã³ãŒãã¢ãã«ã§ãã
-mcmodel = large
ã©ãŒãžã³ãŒãã¢ãã«ã®ã³ãŒããçæããŸãã ããã¯ãäœæãš
ã»ã¯ã·ã§ã³ã®ãµã€ãºã ãã€ã³ã¿ã¯64ãããã§ãã ããã°ã©ã ã¯éçã«ã®ã¿ãªã³ã¯ã§ããŸãã
-mstrict-align
ã¢ã©ã€ã³ãããŠããªãã¡ã¢ãªåç §ãã·ã¹ãã ã«ãã£ãŠåŠçããããšæ³å®ããªãã§ãã ããã
-momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
-mno-çç¥ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
ãªãŒãé¢æ°ã§ãã¬ãŒã ãã€ã³ã¿ãçç¥ãŸãã¯ä¿æããŸãã åè ã®åäœã¯
ããã©ã«ãã
-mtls-dialect = desc
TLSã®åçã¢ã¯ã»ã¹ã®ããã®ã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžã¡ã«ããºã ãšããŠTLSèšè¿°åã䜿çšãã
å€æ°ã ãããããã©ã«ãã§ãã
-mtls-dialect = Traditional
TLSã®åçã¢ã¯ã»ã¹ã®ããã®ã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžã¡ã«ããºã ãšããŠåŸæ¥ã®TLSã䜿çšãã
å€æ°ã
-mfix-cortex-a53-835769
-mno-fix-cortex-a53-835769
ARMCortex-A53ãšã©ãã¿çªå·835769ã®åé¿çãæå¹ãŸãã¯ç¡å¹ã«ããŸããããã¯
ã¡ã¢ãªåœä»€ãš 64 ãããã®éã« NOP åœä»€ãæ¿å ¥ããå¿ èŠããããŸãã
æŽæ°ç©ååœä»€ã
-mfix-cortex-a53-843419
-mno-fix-cortex-a53-843419
ARMCortex-A53ãšã©ãã¿çªå·843419ã®åé¿çãæå¹ãŸãã¯ç¡å¹ã«ããŸããããã¯
ãšã©ãã¿ã®åé¿çã¯ãªã³ã¯æã«è¡ãããããã¯å¯Ÿå¿ãããã©ã°ã®ã¿ãæž¡ããŸã
ãªã³ã«ãŒã«ã
-XNUMXæ=å
ã¿ãŒã²ããã¢ãŒããã¯ãã£ã®ååãæå®ããŸãããªãã·ã§ã³ã§ãXNUMXã€ä»¥äžã®æ¥å°ŸèŸãä»ããŸãã
æ©èœä¿®é£Ÿåã ãã®ãªãã·ã§ã³ã®åœ¢åŒã¯ -XNUMXæ=ã¢ãŒã{+[ããã]ç°¡æœãª}*ã ã©ã
ã®èš±å®¹å€ã®ã¿ ã¢ãŒã is armv8-aã ã®èš±å®¹å€ ç°¡æœãª ã
以äžã®ãµãã»ã¯ã·ã§ã³ã«èšèŒãããŠããŸãã
競åããæ©èœä¿®é£Ÿåãæå®ãããŠããå Žåã¯ãå³ç«¯ã®æ©èœã䜿çšãããŸãã
GCCã¯ãã®ååã䜿çšããŠãçææã«çºè¡ã§ããåœä»€ã®çš®é¡ã決å®ããŸã
ã¢ã»ã³ããªã³ãŒãã
å Žæ -è¡é² ã©ã¡ããæå®ããã«æå®ãããŠãã -ã ãã¥ãŒã³ or -mcpu ãŸããæå®ãããŠããã
ã³ãŒãã¯ãããŸããŸãªã¿ãŒã²ãã ããã»ããµã§é©åã«å®è¡ãããããã«èª¿æŽãããŸãã
ã¿ãŒã²ãã ã¢ãŒããã¯ãã£ã
-mtune =å
GCCãããã©ãŒãã³ã¹ã調æŽããã¿ãŒã²ããããã»ããµã®ååãæå®ããŸã
ã³ãŒãã ãã®ãªãã·ã§ã³ã®èš±å®¹å€ã¯æ¬¡ã®ãšããã§ãã ãžã§ããªãã¯, ç®è³ª-a53, ç®è³ª-a57.
ããã«ããã®ãªãã·ã§ã³ã¯ãGCCãã³ãŒãã®ããã©ãŒãã³ã¹ã調æŽããå¿ èŠãããããšãæå®ã§ããŸã
big.LITTLE ã·ã¹ãã çšã å¯äžã®èš±å®¹å€ã¯ ç®è³ª-a57.ç®è³ª-a53.
ã©ãã«ã -mtune =, -mcpu = or -XNUMXæ= ãæå®ãããŠããå Žåãã³ãŒãã¯æ¬¡ã®ããã«èª¿æŽãããŸã
ããŸããŸãªã¿ãŒã²ãã ããã»ããµã§åªããããã©ãŒãã³ã¹ãçºæ®ããŸãã
ãã®ãªãã·ã§ã³ã®æ«å°Ÿã«æ©èœä¿®é£Ÿåãä»ããããšã¯ã§ããŸããã
-mcpu =å
ã¿ãŒã²ããããã»ããµã®ååãæå®ããŸãããªãã·ã§ã³ã§ãXNUMXã€ä»¥äžã®æ©èœã®æ¥å°ŸèŸãä»ããŸãã
修食åã ãã®ãªãã·ã§ã³ã®åœ¢åŒã¯ -mcpu =CPU{+[ããã]ç°¡æœãª} *ã蚱容ãããå Žå
ã®å€ CPU å©çšå¯èœãªãã®ãšåãã§ã -ã ãã¥ãŒã³.
ã®èš±å®¹å€ ç°¡æœãª 以äžã®ãµãã»ã¯ã·ã§ã³ã«èšèŒãããŠããŸãã
競åããæ©èœä¿®é£Ÿåãæå®ãããŠããå Žåã¯ãå³ç«¯ã®æ©èœã䜿çšãããŸãã
GCCã¯ãã®ååã䜿çšããŠãçææã«çºè¡ã§ããåœä»€ã®çš®é¡ã決å®ããŸã
ã¢ã»ã³ããªã³ãŒãïŒ -è¡é²ïŒããã³å¯Ÿè±¡ãšãªãã¿ãŒã²ããããã»ããµã決å®ãã
ããã©ãŒãã³ã¹ã調æŽããïŒ -ã ãã¥ãŒã³ïŒã ãã®ãªãã·ã§ã³ã䜵çšããå Žå
-è¡é² or -ã ãã¥ãŒã³ããããã®ãªãã·ã§ã³ã¯ããã®é©åãªéšåãããåªå ãããŸã
ãªãã·ã§ã³ãéžæããŸãã
-è¡é² ãš -mcpu æ©èœä¿®é£Ÿå
ã§äœ¿çšãããæ©èœä¿®é£Ÿå -è¡é² ãš -mcpu 次ã®ããããã«ãªããŸãã
CRM CRCæ¡åŒµãæå¹ã«ããŸãã
ã¯ãªãã
Cryptoæ¡åŒµæ©èœãæå¹ã«ããŸãã ããã¯ãé«åºŠãªSIMDãæå¹ã«ãªã£ãŠããããšãæå³ããŸãã
fp æµ®åå°æ°ç¹åœä»€ãæå¹ã«ããŸãã
ã·ã ã
é«åºŠãªSIMDåœä»€ãæå¹ã«ããŸãã ããã¯ãæµ®åå°æ°ç¹åœä»€ã
æå¹ã ããã¯ããªãã·ã§ã³ã®çŸåšå¯èœãªãã¹ãŠã®å€ã®ããã©ã«ãã§ã -è¡é² ãš
-mcpu =.
ã¢ãããã ãšããã¡ã㌠ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯AdaptevaEpiphanyçšã«å®çŸ©ãããŠããŸãïŒ
-mhalf-reg ãã¡ã€ã«
ãr32ã...ãr63ãã®ç¯å²ã®ã¬ãžã¹ã¿ã¯å²ãåœãŠãªãã§ãã ããã ããã«ãããã³ãŒããå®è¡ã§ããŸã
ãããã®ã¬ãžã¹ã¿ããªãããŒããŠã§ã¢ããªã¢ã³ãã
-mprefer-short-insn-regs
çãåœä»€ã®çæãå¯èœã«ããã¬ãžã¹ã¿ãåªå çã«å²ãåœãŠãŸãã ããã¯ã§ããŸã
åœä»€æ°ãå¢ãããããå šäœçã«æžå°ãŸãã¯å¢å ããå¯èœæ§ããããŸã
ã³ãŒããµã€ãºã
-mbranch-cost =NUM
ãã©ã³ãã®ã³ã¹ããããããã«èšå®ããŸã NUM ãç°¡åãªãæ瀺ã ãã®è²»çšã¯
ãã¥ãŒãªã¹ãã£ãã¯ã§ããããªãªãŒã¹éã§äžè²«ããçµæãåŸããããšã¯éããŸããã
-mcmove
æ¡ä»¶ä»ã移åã®çæãæå¹ã«ããŸãã
-mnops =NUM
çºããŸã NUM ä»ã®ãã¹ãŠã®çæãããåœä»€ã®åã«NOPã
-mno-ãœãã-cmpsf
å粟床浮åå°æ°ç¹æ¯èŒã®å Žåã¯ããfsubãåœä»€ãçºè¡ããŠãã¹ãããŸã
ãã©ã°ã ããã¯ãœãããŠã§ã¢ã®æ¯èŒãããé«éã§ããã誀ã£ãçµæãåŸãããå¯èœæ§ããããŸã
NaNãååšããå ŽåããŸãã¯XNUMXã€ã®ç°ãªãå°æ°ã次ã®ããã«æ¯èŒãããå Žå
ãããã®å·®ã¯ãŒããšããŠèšç®ãããŸãã ããã©ã«ã㯠-msoft-cmpsfããã®çšé
äœéã§ãããIEEEæºæ ã®ãœãããŠã§ã¢æ¯èŒã
-mstack-offset =NUM
ã¹ã¿ãã¯ã®æäžäœãšã¹ã¿ãã¯ãã€ã³ã¿ã®éã®ãªãã»ãããèšå®ããŸãã äŸïŒå€8
ãsp+0 ... sp+7ãã®ç¯å²ã®XNUMXãã€ãããªãŒãé¢æ°ã§äœ¿çšã§ããããšãæå³ããŸã
ã¹ã¿ãã¯å²ãåœãŠãªãã 以å€ã®å€ 8 or 16 ãã¹ããããŠãããã
ä»äºã ãã®ãªãã·ã§ã³ã¯ABIãå€æŽããããšã«ã泚æããŠãã ããã ããã°ã©ã ãã³ã³ãã€ã«ãã
ã©ã€ãã©ãªãã³ã³ãã€ã«ããããã®ãšã¯ç°ãªãã¹ã¿ãã¯ãªãã»ããã¯ãéåžžã
ä»äºã ãã®ãªãã·ã§ã³ã¯ãå¥ã®ã¹ã¿ãã¯ãªãã»ãããã©ãããè©äŸ¡ããå Žåã«åœ¹ç«ã¡ãŸãã
ããè¯ãã³ãŒããåŸãããŸãããå®éã«ã¯å¥ã®ã¹ã¿ãã¯ãªãã»ããã䜿çšããŠãã«ãããŸã
åäœäžã®ããã°ã©ã ã§ã¯ãé©åãªããŒã«ãã§ãŒã³ãæ§æããããšããå§ãããŸã
--with-stack-offset =NUM ãªãã·ã§ã³ãéžæããŸãã
-mno-round-æãè¿ã
äžžãã¢ãŒããåãæšãŠã«èšå®ãããŠãããšã¹ã±ãžã¥ãŒã©ãŒã«æ³å®ãããŸãã The
ããã©ã«ã㯠-mround-æãè¿ã.
-mlong-calls
å±æ§ã§ç¹ã«æå®ãããŠããªãå Žåã¯ããã¹ãŠã®åŒã³åºãã
ãbã/ãblãåœä»€ã®ãªãã»ããç¯å²ããããã£ãŠé¢æ°ã¢ãã¬ã¹ãããŒãããŸã
ïŒãã以å€ã®å Žåã¯çŽæ¥ïŒåŒã³åºããå®è¡ããåã«ãã¬ãžã¹ã¿ãŒã«å ¥ããŸãã ãããããã©ã«ãã§ãã
-mshort-åŒã³åºã
å±æ§ã§ç¹ã«æå®ãããŠããªãå Žåã¯ããã¹ãŠã®çŽæ¥åŒã³åºããç¯å²å ã«ãããšæ³å®ããŸã
ãbã/ãblãåœä»€ã®å Žåã¯ããããã®åœä»€ãçŽæ¥åŒã³åºãã«äœ¿çšããŸãã The
ããã©ã«ã㯠-mlong-calls.
-msmall16
ã¢ãã¬ã¹ã¯16ãããã®ç¬Šå·ãªãå€ãšããŠããŒãã§ãããšä»®å®ããŸãã ããã¯é©çšãããŸãã
察象ãšãªãæ©èœã¢ãã¬ã¹ -mlong-calls ã»ãã³ãã£ã¯ã¹ã¯æå¹ã§ãã
-mfp-mode =ã¢ãŒã
æµ®åå°æ°ç¹ãŠãããã®äžè¬çãªã¢ãŒããèšå®ããŸãã ããã¯ãããŒãã£ã³ã°ã決å®ããŸã-
é¢æ°åŒã³åºãããã³æ»ãæã«æäŸããã³æåŸ ããããã€ã³ãã¢ãŒãã äœã
ãã®ã¢ãŒãã¯ãé¢æ°ã®éå§æã«äž»ã«å¿ èŠãªã¢ãŒããšäžèŽããŸãã
äžèŠãªã¢ãŒãåãæ¿ããåé¿ããããšã«ãããããã°ã©ã ãããå°ãããããéãããŸãã
ã¢ãŒã 次ã®ããããã®å€ã«èšå®ã§ããŸãã
çºä¿¡è
é¢æ°ãšã³ããªã®ã¢ãŒãã¯ãã¹ãŠæå¹ã§ãããé¢æ°ãæ©èœãããšãã«ä¿æãŸãã¯åŸ©å ãããŸã
ãè¿ããä»ã®é¢æ°ãåŒã³åºããšãã ãã®ã¢ãŒãã¯ã³ã³ãã€ã«ã«äŸ¿å©ã§ã
ã©ã€ãã©ãªãŸãã¯ä»ã®ã³ã³ãã€ã«ãŠãããã«çµã¿èŸŒã¿ããå ŽåããããŸã
ããŸããŸãªäžè¬çãªFPUã¢ãŒããåããããã°ã©ã ãããã³
åäžã®ãªããžã§ã¯ããã¡ã€ã«ã䜿çšããããšã¯ãè¿œå ã®ã¢ãŒãã®ãµã€ãºãšé床ã®ãªãŒããŒããããäžåããŸã
ããå€ãã®å Žåã«å¿ èŠãšãªããã®ãšæ¯èŒããŠãå¿ èŠãšãªãå¯èœæ§ã®ããåãæ¿ã
äžè¬çãªFPUã¢ãŒãã®ç¹å®ã®éžæã
åãè©°ãã
ããã¯ãåãæšãŠïŒã€ãŸãã©ãŠã³ãïŒã䌎ãæµ®åå°æ°ç¹èšç®ã«äœ¿çšãããã¢ãŒãã§ãã
ãŒãã«åãã£ãŠïŒäžžãã¢ãŒãã ããã«ã¯ãæµ®åå°æ°ç¹ãããžã®å€æãå«ãŸããŸã
æŽæ°ã
ã©ãŠã³ããã¢ã¬ã¹ã
ããã¯ãæãè¿ãå€ã«äžžããæµ®åå°æ°ç¹èšç®ã«äœ¿çšãããã¢ãŒãã§ãã
äžžãã¢ãŒãã§ããã
intå ããã¯ãFPUã§æŽæ°èšç®ãå®è¡ããããã«äœ¿çšãããã¢ãŒãã§ãïŒæŽæ°ãªã©ïŒã
ä¹ç®ããŸãã¯æŽæ°ã®ç©åæŒç®ã
ããã©ã«ã㯠-mfp-mode = caller
-mnosplit-lohi
-mno-postinc
-mno-postmodify
32ãããããŒãã®åå²ãããããç¡å¹ã«ããã³ãŒãçæã®èª¿æŽã
ãã¹ãã€ã³ã¯ãªã¡ã³ãã¢ãã¬ã¹ã®çæãããã³ãã¹ãã¢ãã£ãã¡ã€ã¢ãã¬ã¹ã®çæã The
ããã©ã«ã㯠msplit-lohi, æ ªåŒäŒç€Ÿãšã ãã¹ã, -mpost-å€æŽ.
-mnovect-double
åªå SIMDã¢ãŒããSImodeã«å€æŽããŸãã ããã©ã«ã㯠-mvect-ããã«ããã®çšé
åªå SIMDã¢ãŒããšããŠã®DImodeã
-max-vect-align =NUM
SIMDãã¯ãã«ã¢ãŒãã¿ã€ãã®æ倧é 眮ã NUM 4ãŸãã¯8ã®å ŽåããããŸããããã©ã«ãã¯
8.ããã¯ABIã®å€æŽã§ããããšã«æ³šæããŠãã ããããã ããå€ãã®ã©ã€ãã©ãªé¢æ°ã€ã³ã¿ãŒãã§ã€ã¹ã¯
ãµã€ãºããµã€ãºã«åœ±é¿ããå Žæã§SIMDãã¯ãã«ã¢ãŒãã䜿çšããªãå Žåã¯åœ±é¿ãåããŸãã
é¢é£ããã¿ã€ãã®é 眮ã
-msplit-vecmove-åæ
åå²ãã¯ãã«ã¯ããªããŒãããåã«XNUMXã¯ãŒã移åã«ç§»åããŸãã çè«çã«ã¯ããã¯
ããè¯ãã¬ãžã¹ã¿å²ãåœãŠã§ããããããŸã§ã®ãšãããéã®ããšãäžè¬çã«åœãŠã¯ãŸãããã§ãã
-m1reg-REG
å®æ°-1ãä¿æããã¬ãžã¹ã¿ãæå®ããŸããããã«ãããããŒããå°ããªè² ã«ãªããŸãã
å®æ°ãšç¹å®ã®ããããã¹ã¯ãé«éã«ãªããŸãã ã®èš±å®¹å€ REG ã r43 ãš r63,
ãã®ã¬ãžã¹ã¿ãåºå®ã¬ãžã¹ã¿ãšããŠäœ¿çšããããšãæå®ãã ãªããã€ãŸã
ã¬ãžã¹ã¿ãŒã¯ãã®ç®çã§äœ¿çšãããŸãã ããã©ã«ã㯠-m1reg-ãªã.
ARC ãªãã·ã§ã³
次ã®ãªãã·ã§ã³ã¯ãã³ãŒããã³ã³ãã€ã«ãããã¢ãŒããã¯ãã£ããªã¢ã³ããå¶åŸ¡ããŸãã
-ãã¬ã«ã·ãã¿ãŒ
ãã¬ã«ã·ãã¿ã§ãµããŒããããŠããåœä»€ãçæããŸãã ãããããã©ã«ãã§ãã
-mcpu = ARC601 æå¹ã§ãã
-mcpu =CPU
ã¢ãŒããã¯ãã£ã¿ã€ããã¬ãžã¹ã¿ã®äœ¿çšæ³ãããã³åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸãã CPU.
äžäœäºææ§ã®ããã«å©çšå¯èœãªã·ã§ãŒãã«ãããšã€ãªã¢ã¹ãªãã·ã§ã³ããããŸã
å¿«é©ã ãµããŒããããŠããå€ CPU ã
ARC600
ARC600çšã«ã³ã³ãã€ã«ããŸãã ãšã€ãªã¢ã¹ïŒ -mA6, -mARC600.
ARC601
ARC601çšã«ã³ã³ãã€ã«ããŸãã ãšã€ãªã¢ã¹ïŒ -mARC601.
ARC700
ARC700çšã«ã³ã³ãã€ã«ããŸãã ãšã€ãªã¢ã¹ïŒ -mA7, -mARC700ã ããã¯ãæ§ææã®ããã©ã«ãã§ã
ã --with-cpu = arc700.
-mdpfp
-mdpfp-ã³ã³ãã¯ã
FPXïŒã³ã³ãã¯ããªå®è£ ã«åãããŠèª¿æŽãããå粟床FPXåœä»€ãçæããŸãã
-mdpfp-é«é
FPXïŒé«éå®è£ çšã«èª¿æŽãããå粟床FPXåœä»€ãçæããŸãã
-mno-dpfp-lrsr
LRããã³SRåœä»€ãFPXæ¡åŒµè£å©ã¬ãžã¹ã¿ã䜿çšããªãããã«ããŸãã
-ã¡ã¢
æ¡åŒµç®è¡åœä»€ãçæããŸãã çŸåšããdivawãããaddsãããsubsãã
ããã³ãsat16ãããµããŒããããŠããŸãã ããã¯åžžã«æå¹ã«ãªã£ãŠããŸã -mcpu = ARC700.
-mno-mpy
ARC700ã®mpyåœä»€ãçæããªãã§ãã ããã
-mmul32x16
32x16ãããã®ä¹ç®ããã³MACåœä»€ãçæããŸãã
-mmul64
mul64ããã³mulu64åœä»€ãçæããŸãã ã®ã¿æå¹ -mcpu = ARC600.
-mnorm
ãã«ã åœä»€ãçæããŸãã ãããããã©ã«ãã§ã -mcpu = ARC700 æå¹ã§ãã
-mspfp
-mspfp-ã³ã³ãã¯ã
FPXïŒã³ã³ãã¯ããªå®è£ ã«åãããŠèª¿æŽãããå粟床FPXåœä»€ãçæããŸãã
-mspfp-é«é
FPXïŒé«éå®è£ çšã«èª¿æŽãããå粟床FPXåœä»€ãçæããŸãã
-msimd
ã¿ãŒã²ããåºæã®ãã«ãã€ã³ãä»ããŠARCSIMDåœä»€ã®çæãæå¹ã«ããŸãã ã®ã¿æå¹
for -mcpu = ARC700.
-msoft-float
ãã®ãªãã·ã§ã³ã¯ç¡èŠãããŸãã äºææ§ã®ç®çã§ã®ã¿æäŸãããŠããŸãã ãœãããŠã§ã¢
æµ®åå°æ°ç¹ã³ãŒãã¯ããã©ã«ãã§çºè¡ããããã®ããã©ã«ãã¯FPXã«ãã£ãŠãªãŒããŒã©ã€ãã§ããŸã
ãªãã·ã§ã³; mspfp, mspfp-ã³ã³ãã¯ããŸã㯠mspfp-é«é å粟床ã®å Žåãããã³ MDPFP, MDPFP-
ã³ã³ãã¯ããŸã㯠mdpfp-é«é å粟床ã®å Žåã
-mswap
ã¹ã¯ããåœä»€ãçæããŸãã
次ã®ãªãã·ã§ã³ã¯ã¢ã»ã³ãã©ã«æž¡ãããããªããã»ããµãå®çŸ©ããŸã
ãã¯ãã·ã³ãã«ã
-mdsp-packa
DSPPackAæ¡åŒµæ©èœãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸãã ãŸãã
ããªããã»ããµã·ã³ãã«ã__Xdsp_packaãã
-mdvbf
ãã¥ã¢ã«ããã«ããã¿ãã©ã€æ¡åŒµãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸãã ãŸã
ããªããã»ããµã·ã³ãã«ã__Xdvbfããèšå®ããŸãã
-ã ããã¯
Locked Load /StoreConditionalæ¡åŒµæ©èœãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸãã
ããªããã»ããµã·ã³ãã«ã__Xlockããèšå®ããŸãã
-mmac-d16
ã¢ã»ã³ãã©ã«åãç¶ãããŠããŸãã ãŸããããªããã»ããµã·ã³ãã«ã__Xxmac_d16ããèšå®ããŸãã
-mmac-24
ã¢ã»ã³ãã©ã«åãç¶ãããŠããŸãã ãŸããããªããã»ããµã·ã³ãã«ã__Xxmac_24ããèšå®ããŸãã
-mrtsc
64ãããã®ã¿ã€ã ã¹ã¿ã³ãã«ãŠã³ã¿æ¡åŒµãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸã
åœä»€ã ããªããã»ããµã·ã³ãã«ã__Xrtscããèšå®ããŸãã
-mswape
ã¹ã¯ãããã€ãé åºæ¡åŒµåœä»€ãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸãã
ããªããã»ããµã·ã³ãã«ã__Xswapeããèšå®ããŸãã
-mãã¬ãã©ããŒ
ã¢ã»ã³ãã©ã«æž¡ãããŠã次ã®XNUMXã€ã®ãªãã©ã³ããšXNUMXã€ã®ãªãã©ã³ãã®åœä»€ãæå¹ã«ããŸãã
ãã¬ãã©ããŒã ãŸããããªããã»ããµã·ã³ãã«ã__Xtelephonyããèšå®ããŸãã
-mxy
XYã¡ã¢ãªæ¡åŒµãæå¹ã«ããããã«ã¢ã»ã³ãã©ã«æž¡ãããŸãã ãŸãã
ããªããã»ããµã·ã³ãã«ã__Xxyãã
次ã®ãªãã·ã§ã³ã¯ãã¢ã»ã³ããªã³ãŒãã«æ³šéãä»ããæ¹æ³ãå¶åŸ¡ããŸãã
-ãã¹ãµã€ãº
ã¢ã»ã³ãã©åœä»€ã«æšå®ã¢ãã¬ã¹ã§æ³šéãä»ããŸãã
-mannotate-align
ã¢ã©ã€ã³ã¡ã³ãã®èæ ®äºé ãæ瀺ãè¡ã決å®ã«ã€ãªããããšã説æãã
çããŸãã¯é·ãã
次ã®ãªãã·ã§ã³ããªã³ã«ãŒã«æž¡ãããŸãã
-ãã«ã¯ãªããã¯ã¹
ãarclinuxããšãã¥ã¬ãŒã·ã§ã³ã®äœ¿çšãæå®ããããã«ããªã³ã«ã«æž¡ãããŸãã ãã®ãªãã·ã§ã³
ãarc-linux-uclibcãçšã«æ§ç¯ãããããŒã«ãã§ãŒã³ã§ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
ãarceb-linux-uclibcãã¯ããããã¡ã€ãªã³ã°ãèŠæ±ãããŠããªãå Žåã«ã¿ãŒã²ããã«ãªããŸãã
-marclinux_prof
ãarclinux_profããšãã¥ã¬ãŒã·ã§ã³ã®äœ¿çšãæå®ããããã«ããªã³ã«ã«æž¡ãããŸãã ãã
ãarc-linux-uclibcãçšã«æ§ç¯ãããããŒã«ãã§ãŒã³ã§ã¯ããªãã·ã§ã³ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
ãarceb-linux-uclibcãã¯ããããã¡ã€ãªã³ã°ãèŠæ±ããããšãã«ã¿ãŒã²ããã«ãªããŸãã
次ã®ãªãã·ã§ã³ã¯ãçæãããã³ãŒãã®ã»ãã³ãã£ã¯ã¹ãå¶åŸ¡ããŸãã
-ã¡ãããŒã°-cfi
ãšãããŒã°ã®ã³ãŒã«ãã¬ãŒã æ å ±ã®çæãæå¹ã«ããŸãã
-mno-ãšãããŒã°-cfi
ãšãããŒã°ã®ã³ãŒã«ãã¬ãŒã æ å ±ã®çæãç¡å¹ã«ããŸãã
-mlong-calls
éæ¥åŒã³åºãã®ç»é²ãšããŠåŒã³åºãinsnsãçæããå®å šãªã¢ã¯ã»ã¹ãæäŸããŸã
32ãããã®ã¢ãã¬ã¹ç¯å²ã
-ããã£ã¢ã ã³ãŒã«
䜿çšå¯èœãªãªãã»ããã§ãã25ãããæªæºã®ã¢ãã¬ã¹æå®ç¯å²ãåŒã³åºãã«äœ¿çšããªãã§ãã ãã
ç¡æ¡ä»¶ã®åå²ããã³ãªã³ã¯åœä»€ã®å Žåã é¢æ°ã®æ¡ä»¶ä»ãå®è¡
25ãããç¯å²ã§ã¯ãªãã21ãããç¯å²ã䜿çšã§ããããã«ããããã«ãåŒã³åºãã¯æå¶ãããŸãã
æ¡ä»¶ä»ãã®åå²ãšãªã³ã¯ã䜿çšããŸãã ããã¯ãã®ããã«æ§ç¯ãããããŒã«ãã§ãŒã³ã®ããã©ã«ãã§ã
ãarc-linux-uclibcãããã³ãarceb-linux-uclibcãã¿ãŒã²ããã
-mno-sdata
sdataåç §ãçæããªãã§ãã ããã ããã¯ãã®ããã«æ§ç¯ãããããŒã«ãã§ãŒã³ã®ããã©ã«ãã§ã
ãarc-linux-uclibcãããã³ãarceb-linux-uclibcãã¿ãŒã²ããã
-mucb-mcount
UCBã³ãŒãã§äœ¿çšãããmcountåŒã³åºããåããã€ã³ã¹ãã«ã¡ã³ãã ã€ãŸããåŒã³åºãå ã§ã«ãŠã³ããè¡ããŸãã
çºä¿¡è ã§ã¯ãããŸããã ããã©ã«ãã§ã¯ãARCã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã¯åŒã³åºãå ã§ã«ãŠã³ããããŸãã
-mvolatile-ãã£ãã·ã¥
æ®çºæ§ã®åç §ã«ã¯ãéåžžã¯ãã£ãã·ã¥ãããã¡ã¢ãªã¢ã¯ã»ã¹ã䜿çšããŸãã ãããããã©ã«ãã§ãã
-mno-volatile-ãã£ãã·ã¥
æ®çºæ§åç §ã®ãã£ãã·ã¥ãã€ãã¹ãæå¹ã«ããŸãã
次ã®ãªãã·ã§ã³ã¯ãã³ãŒãçæã埮調æŽããŸãã
-æªæ§ã³ãŒã«
åŒã³åºãåœä»€ã®é 眮ãæé©åããŸãã
-mauto-å€æŽ-reg
ã¬ãžã¹ã¿å€äœã䌎ãäºå/äºåŸå€æŽã®äœ¿çšãæå¹ã«ããŸãã
-mbbit-ã®ããç©Ž
bbitpeephole2ãæå¹ã«ããŸãã
-mno-brcc
ãã®ãªãã·ã§ã³ã¯ãã¿ãŒã²ããåºæã®ãã¹ã€ã³ãç¡å¹ã«ããŸã ã¢ãŒã¯ãªãªã«ã° ãBRccããçæãã
æ瀺ã ã³ã³ãã€ããã¹ã«ãã£ãŠé§åããããBRccãçæã«ã¯åœ±é¿ããŸããã
-mcase-vector-pcrel
PCçžå¯Ÿã¹ã€ããã±ãŒã¹ããŒãã«ã䜿çšããŸã-ããã«ãããã±ãŒã¹ããŒãã«ãççž®ã§ããŸãã ããã¯
ããã©ã«ãã® -ãªã¹.
-mcompact-casesi
ã³ã³ãã¯ããªcasesiãã¿ãŒã³ãæå¹ã«ããŸãã ããã¯ã®ããã©ã«ãã§ã -ãªã¹.
-mno-cond-exec
ARCompactåºæã®ãã¹ãç¡å¹ã«ããŠãæ¡ä»¶ä»ãå®è¡åœä»€ãçæããŸãã æé
ã¹ãããã®ã¹ã±ãžã¥ãŒãªã³ã°ãšãªãã©ã³ãçªå·ããªãã©ã«ãµã€ãºéã®çžäºäœçšãé ãããããã
åœä»€ã®é·ããããã³æ¡ä»¶ä»ãå®è¡ã®ãµããŒããã¿ãŒã²ããã«äŸåããªã
æ¡ä»¶ä»ãå®è¡ãçæããããã®ãã¹ãäžè¶³ããŠããããšãå€ããããARCããŒãã¯
ããå€ãã®æ¡ä»¶ä»ãå®è¡ãçæããããšããç¹å¥ãªãã¹
ã¬ãžã¹ã¿å²ãåœãŠããã©ã³ãççž®ãããã³é 延ã¹ãããã¹ã±ãžã¥ãŒãªã³ã°åŸã®æ©äŒ
è¡ãããŠããŸããã ãã®ãã¹ã¯ãåžžã«ã§ã¯ãããŸããããäžè¬çã«ããã©ãŒãã³ã¹ãšã³ãŒããæ¹åããŸã
ãµã€ãºãäœåãªã³ã³ãã€ã«æéãç ç²ã«ãªããŸããããããåãæ¿ãããªãã·ã§ã³ãããçç±ã§ãã
ããããªãã«ããŸãã 蚱容ãªãã»ãããè¶ ããåŒã³åºãåœä»€ã«åé¡ãããå Žå
ç¯å²ã¯æ¡ä»¶ä»ãã§ããããã䜿çšãæ€èšããå¿ èŠããããŸã -ããã£ã¢ã ã³ãŒã«
ã代ããã«ã䜿ããã ããã
-ã»ãŒ-cbranchsi
cbranchsiãã¿ãŒã³ã®ãªããŒãåã®äœ¿çšãæå¹ã«ããŸãã
-mexpand-adddi
rtlçææã«ãadddi3ããšãsubdi3ãããadd.fãããadcããªã©ã«å±éããŸãã
-mindexed-loads
ã€ã³ããã¯ã¹ä»ãããŒãã®äœ¿çšãæå¹ã«ããŸãã äžéšã®ãªããã£ãã€ã¶ã¯
次ã«ãã€ã³ããã¯ã¹ä»ãã¹ãã¢ãååšãããšä»®å®ããŸãããããã§ã¯ãããŸããã
-mlra
ããŒã«ã«ã¬ãžã¹ã¿å²ãåœãŠãæå¹ã«ããŸãã ããã¯ãŸã ARCã§å®éšçã§ãããããããã©ã«ãã§ã¯
ã³ã³ãã€ã©ã¯æšæºã®ãªããŒãã䜿çšããŸãïŒã€ãŸã -mno-lra).
-mlra-åªå 床-ãªã
ã¿ãŒã²ããã¬ãžã¹ã¿ã®åªå é äœã瀺ããªãã§ãã ããã
-mlra-priority-ã³ã³ãã¯ã
r0..r3/r12..r15ã®ã¿ãŒã²ããã¬ãžã¹ã¿ã®åªå 床ã瀺ããŸãã
-mlra-åªå é äœ-éã³ã³ãã¯ã
r0..r3/r12..r15ã®ã¿ãŒã²ããç»é²è ã®åªå 床ãäžããŸãã
-mno-ããªã³ãŒã
ãµã€ãºãæé©åããå ŽåïŒ -ãªã¹ïŒãä¿åããå¿ èŠãããããããŒã°ãšãšãããŒã°ãŸãã¯
å€æ°ã®ã¬ãžã¹ã¿ã®åŸ©å ã¯ãå€ãã®å Žåãç¹å¥ãªåŒã³åºãã䜿çšããããšã«ãã£ãŠççž®ãããŸã
libgccã®é¢æ°; ããã¯ã ããªã³ãŒã é»è©±ã ãããã®åŒã³åºãã¯ããŒãºããšãããšãã§ããã®ã§
ããã©ãŒãã³ã¹ã®åé¡ãããã³/ãŸãã¯éæšæºçãªæ¹æ³ã§ãªã³ã¯ãããšãã«ãªã³ã¯ã®åé¡ãåŒãèµ·ããã
ãã®ãªãã·ã§ã³ã¯ãããªã³ãŒãåŒã³åºãã®çæããªãã«ããããã«æäŸãããŠããŸãã
-æ··åã³ãŒã
ã¬ãžã¹ã¿å²ãåœãŠã埮調æŽããŠã16ãããåœä»€ã®çæãæ¯æŽããŸãã ããã¯äžè¬çã«æã£ãŠããŸã
åœä»€ãå¢ãããªããå¹³ååœä»€ãµã€ãºãæžããå¹æ
ã«ãŠã³ãã
-mq-ã¯ã©ã¹
'q'åœä»€ã®éžæè¢ãæå¹ã«ããŸãã ããã¯ã®ããã©ã«ãã§ã -ãªã¹.
-mRcq
Rcqå¶çŽåŠçãæå¹ã«ããŸã-ã»ãšãã©ã®çãã³ãŒãçæã¯ããã«äŸåããŸãã ããã¯
ããã©ã«ãã
-mRcw
Rcwå¶çŽåŠçãæå¹ã«ããŸã-ccfsmcondexecã¯äž»ã«ããã«äŸåããŸãã ããã¯
ããã©ã«ãã
-msize-level =ã¬ãã«
åœä»€ã®é·ããšäœçœ®åããã«é¢ããŠãµã€ãºã®æé©åã埮調æŽããŸãã The
ã®èªèå€ ã¬ãã« ã«ã¯æ¬¡ã®å€ããããŸã:
0 ãµã€ãºã®æé©åã¯ãããŸããã ãã®ã¬ãã«ã¯å»æ¢ããã次ã®ããã«æ±ãããŸã 1.
1 çãæ瀺ã¯æ¥åèŠçã«äœ¿çšãããŸãã
2 ããã«ãããªã¢ãåé€ãããåŸã®ã«ãŒããšã³ãŒãã®é 眮ã
3 ããã«ããªãã·ã§ã³ã®ããŒã¿ã¢ã©ã€ã¡ã³ããåé€ããããªãã·ã§ã³ Os æå¹ã«ãªã£ãŠããŸãã
ããã¯ããã©ã«ã㧠3 ã〠-ãªã¹ æå¹ã§ãã ãã以å€ã®å Žåãããããªãå Žåã®åäœ
ã»ããã¯ã¬ãã«ã«çžåœããŸã 1.
-mtune =CPU
ã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã CPUãã«ãã£ãŠæ瀺ããããã®ããªãŒããŒã©ã€ããã -mcpu =.
ãµããŒããããŠããå€ CPU ã
ARC600
ARC600CPUã«åãããŠèª¿æŽããŸãã
ARC601
ARC601CPUã«åãããŠèª¿æŽããŸãã
ARC700
æšæºã®ä¹ç®åšãããã¯ã䜿çšããŠARC700CPUã«åãããŠèª¿æŽããŸãã
ARC700-xmac
XMACãããã¯ã䜿çšããŠARC700CPUã調æŽããŸãã
ARC725D
ARC725DCPUã«åãããŠèª¿æŽããŸãã
ARC750D
ARC750DCPUã«åãããŠèª¿æŽããŸãã
-mmultcost =NUM
ä¹ç®åœä»€ã§æ³å®ããã³ã¹ãã 4 éåžžã®åœä»€ãšåãã§ãã
-munalign-prob-threshold =確ç
ãã©ã³ãã®äœçœ®åããã解é€ããããã®ç¢ºçãããå€ãèšå®ããŸãã ãã¥ãŒãã³ã°ãããšã ARC700 ãš
é床ãæé©åãããšãé 延ã¹ããããåããããŠããªãåå²ãæŸåºãããããšã奜ãŸãã
ãããã¡ã€ãªã³ã°ã§åå²ã®ç¢ºçã
åãããã¯ä»¥äžã§ã 確çã ããã©ã«ãã¯ïŒREG_BR_PROB_BASE / 2ïŒãã€ãŸã5000ã§ãã
次ã®ãªãã·ã§ã³ã¯äžäœäºææ§ã®ããã«ç¶æãããŠããŸãããçŸåšã¯éæšå¥šã§ã
å°æ¥ã®ãªãªãŒã¹ã§åé€ãããäºå®ã§ãã
-ããŒãŽããŒã
å»æ¢ãããFPXã
-mbig-ãšã³ãã£ã¢ã³
-EB ããã°ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããã³ã³ãã€ã«ããŸãã ãããã®ãªãã·ã§ã³ã®äœ¿çšã¯çŸåšéæšå¥šã§ãã ãŠãŒã¶ãŒ
ããã°ãšã³ãã£ã¢ã³ã³ãŒããå¿ èŠãªå Žåã¯ããarceb-elf32ãããã³ãarceb-linux-uclibcãã¿ãŒã²ããã䜿çšããå¿ èŠããããŸã
ããã°ãšã³ãã£ã¢ã³ãããã©ã«ãã§ããããŒã«ãã§ãŒã³ãæ§ç¯ãããšãã
-mlittle-ãšã³ãã£ã¢ã³
-THE ãªãã«ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããã³ã³ãã€ã«ããŸãã ãããã®ãªãã·ã§ã³ã®äœ¿çšã¯çŸåšéæšå¥šã§ãã
ãªãã«ãšã³ãã£ã¢ã³ã®ã³ãŒããå¿ èŠãªãŠãŒã¶ãŒã¯ããarc-elf32ããšãarc-linux-uclibcãã䜿çšããå¿ èŠããããŸã
ããŒã«ãã§ãŒã³ãæ§ç¯ãããšãã®ã¿ãŒã²ããããªãã«ãšã³ãã£ã¢ã³ãããã©ã«ãã§ãã
-mbarrel_shifter
ãšåãæãã -ãã¬ã«ã·ãã¿ãŒ
-mdpfp_compact
ãšåãæãã -mdpfp-ã³ã³ãã¯ã
-mdpfp_fast
ãšåãæãã -mdpfp-é«é
-mdsp_packa
ãšåãæãã -mdsp-packa
-mEA
ãšåãæãã -ã¡ã¢
-mmac_24
ãšåãæãã -mmac-24
-mmac_d16
ãšåãæãã -mmac-d16
-mspfp_compact
ãšåãæãã -mspfp-ã³ã³ãã¯ã
-mspfp_fast
ãšåãæãã -mspfp-é«é
-mtune =CPU
䟡å€èŠ³ arc600, arc601, arc700 ãš ã¢ãŒã¯700-xmac for CPU ã«çœ®ãæããããŸã ARC600, ARC601,
ARC700 ãš ARC700-xmac ãããã
-ãã«ãã³ã¹ã=NUM
ãšåãæãã -mmultcost.
ARM ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãAdvanced RISC Machines (ARM) ã¢ãŒããã¯ãã£çšã«å®çŸ©ãããŠããŸãã
-mabi =å
æå®ãããABIã®ã³ãŒããçæããŸãã 蚱容å€ã¯æ¬¡ã®ãšããã§ãã apcs-gnu, atpc, aapcs,
aapcs-linux ãš ç§ã¯.
-mapcs ãã¬ãŒã
ãã¹ãŠã®ARMããã·ãŒãžã£ã³ãŒã«æšæºã«æºæ ããã¹ã¿ãã¯ãã¬ãŒã ãçæããŸã
ã³ãŒããæ£ããå®è¡ããããã«ãããå³å¯ã«å¿ èŠã§ãªãå Žåã§ããé¢æ°ã
æå® -fomit-ãã¬ãŒã ãã€ã³ã¿ãŒ ãã®ãªãã·ã§ã³ã䜿çšãããšãã¹ã¿ãã¯ãã¬ãŒã ã
ãªãŒãé¢æ°çšã«çæãããŸãã ããã©ã«ã㯠-mno-apcs-frame.
-mapcs
ããã¯ã®å矩èªã§ã -mapcs ãã¬ãŒã .
-mthumb-ã€ã³ã¿ãŒã¯ãŒã¯
ARMåœä»€ã»ãããšThumbåœä»€ã»ããéã®åŒã³åºãããµããŒãããã³ãŒããçæããŸãã
ãã®ãªãã·ã§ã³ããªããšãv5ããåã®ã¢ãŒããã¯ãã£ã§ã¯ãXNUMXã€ã®åœä»€ã»ããã
XNUMXã€ã®ããã°ã©ã å ã§ç¢ºå®ã«äœ¿çšãããŸãã ããã©ã«ã㯠-mno-thumb-interworkãå°ããã
ãã倧ããªã³ãŒãã¯æ¬¡ã®å Žåã«çæãããŸã -mthumb-ã€ã³ã¿ãŒã¯ãŒã¯ ãæå®ãããŠããŸãã AAPCSæ§æã®å Žå
ãã®ãªãã·ã§ã³ã¯ç¡æå³ã§ãã
-mno-sched-ããããŒã°
é¢æ°ããããŒã°å ã®åœä»€ã®äžŠã¹æ¿ãããŸãã¯ã®ããŒãžãé²æ¢ããŸã
é¢æ°ã®æ¬äœã«ããåœä»€ãå«ããããã®åœä»€ã ããã¯ããã¹ãŠã
é¢æ°ã¯ãèªèå¯èœãªäžé£ã®åœä»€ïŒãŸãã¯å®éã«ã¯éžæè¢ã®XNUMXã€ïŒããå§ãŸããŸã
ããŸããŸãªé¢æ°ããããŒã°ã®å°ããªã»ããããïŒããã®æ å ±ã䜿çšããŠ
å®è¡å¯èœãªã³ãŒãå ã§é¢æ°ã®éå§ãèŠã€ããŸãã ããã©ã«ãã¯
-msched-ããããŒã°.
-mfloat-abi =å
䜿çšããæµ®åå°æ°ç¹ABIãæå®ããŸãã 蚱容å€ã¯æ¬¡ã®ãšããã§ãã ãœãã, ãœããFP ãš
ããŒã.
æå® ãœãã GCCã«ãããŒãã£ã³ã°ã®ã©ã€ãã©ãªåŒã³åºããå«ãåºåãçæãããŸã-
ãã€ã³ãæäœã ãœããFP ããŒããŠã§ã¢æµ®åå°æ°ç¹ã䜿çšããŠã³ãŒããçæã§ããŸã
ãã ãããœãããããŒãã®åŒã³åºãèŠçŽã䜿çšããŸãã ããŒã ããšãã§ããŸã
æµ®åå°æ°ç¹åœä»€ãçæããFPUåºæã®åŒã³åºãèŠçŽã䜿çšããŸãã
ããã©ã«ãã¯ãç¹å®ã®ã¿ãŒã²ããæ§æã«ãã£ãŠç°ãªããŸãã ããŒããããŒãã«æ³šæããŠãã ãã
ãœãããããŒãABIã¯ãªã³ã¯äºæã§ã¯ãããŸããã ããã°ã©ã å šäœãã§ã³ã³ãã€ã«ããå¿ èŠããããŸã
åãABIã§ãããäºææ§ã®ããã©ã€ãã©ãªã®ã»ãããšãªã³ã¯ããŸãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã§å®è¡ãããŠããããã»ããµã®ã³ãŒããçæããŸãã ããã¯ã®ããã©ã«ãã§ã
ãã¹ãŠã®æšæºæ§æã
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã¢ãŒãã§å®è¡ãããŠããããã»ããµã®ã³ãŒããçæããŸãã ããã©ã«ãã¯ã³ã³ãã€ã«ã§ã
ãªãã«ãšã³ãã£ã¢ã³ããã»ããµã®ã³ãŒãã
-mwords-ãªãã«ãšã³ãã£ã¢ã³
ãã®ãªãã·ã§ã³ã¯ãããã° ãšã³ãã£ã¢ã³ ããã»ããµçšã®ã³ãŒããçæããå Žåã«ã®ã¿é©çšãããŸãã çæ
ãªãã«ãšã³ãã£ã¢ã³ã®èªé ã®ã³ãŒãã§ãããããã°ãšã³ãã£ã¢ã³ã®ãã€ãé ã§ãã ã€ãŸãããã€ã
ãã©ãŒã ã®é åº 32107654. 泚: ãã®ãªãã·ã§ã³ã¯ãå¿ èŠãªå Žåã«ã®ã¿äœ¿çšããŠãã ããã
ã®ããŒãžã§ã³ã«ãã£ãŠçæãããããã°ãšã³ãã£ã¢ã³ ARM ããã»ããµçšã®ã³ãŒããšã®äºææ§
2.8 ããåã®ã³ã³ãã€ã©ã ãã®ãªãã·ã§ã³ã¯éæšå¥šã«ãªããŸããã
-XNUMXæ=å
ããã¯ãã¿ãŒã²ããARMã¢ãŒããã¯ãã£ã®ååãæå®ããŸãã GCCã¯ãã®ååã䜿çšããŠ
ã¢ã»ã³ããªã³ãŒããçæãããšãã«çºè¡ã§ããåœä»€ã®çš®é¡ã決å®ããŸãã ãã
ãªãã·ã§ã³ã¯ããšçµã¿åãããŠããŸãã¯ãã®ä»£ããã«äœ¿çšã§ããŸãã -mcpu = ãªãã·ã§ã³ã 蚱容ããã
ååã¯æ¬¡ã®ãšããã§ãã armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t, armv5e,
ã¢ãŒã v5te, armv6, armv6j, armv6t2, armv6z, armv6zk, armv6-m, armv7, armv7-a, armv7-r,
armv7-m, armv7e-m, armv7ve, armv8-a, armv8-a + crc, ç§ã¯, iwmmxt2, ep9312.
-march = armv7ve armv7-ä»®æ³åæ¡åŒµæ©èœãåããã¢ãŒããã¯ãã£ã§ãã
-march = armv8-a + crc ARMv8-Aã¢ãŒããã¯ãã£ã®ã³ãŒãçæã
ãªãã·ã§ã³ã®CRC32æ¡åŒµã
-march=ãã€ãã£ã ã³ã³ãã€ã©ã«ãã«ãã®ã¢ãŒããã¯ãã£ãèªåæ€åºãããŸã
ã³ã³ãã¥ãŒã¿ãŒã çŸåšããã®æ©èœã¯GNU / Linuxã§ã®ã¿ãµããŒããããŠããããã¹ãŠã§ã¯ãããŸããã
ã¢ãŒããã¯ãã£ãèªèãããŸãã èªåæ€åºã倱æããå Žåããªãã·ã§ã³ã«ã¯äœããããŸãã
å¹æã
-mtune =å
ãã®ãªãã·ã§ã³ã¯ãGCCã調æŽããå¿ èŠã®ããã¿ãŒã²ããARMããã»ããµã®ååãæå®ããŸã
ã³ãŒãã®ããã©ãŒãã³ã¹ã äžéšã®ARMå®è£ ã§ã¯ãããã©ãŒãã³ã¹ãåäžããå¯èœæ§ããããŸã
ãã®ãªãã·ã§ã³ã䜿çšããŠååŸããŸãã èš±å¯ãããååã¯æ¬¡ã®ãšããã§ãã arm2, arm250, arm3, arm6,
arm60, arm600, arm610, arm620, arm7, ã¢ãŒã 7m, ã¢ãŒã 7d, è 7dm, ã¢ãŒã 7ãã£, ã¢ãŒã 7dmi, arm70,
arm700, ã¢ãŒã 700i, arm710, ã¢ãŒã 710c, arm7100, arm720, arm7500, ã¢ãŒã 7500fe, ã¢ãŒã 7tdmi,
arm7tdmi-s, ã¢ãŒã 710t, ã¢ãŒã 720t, ã¢ãŒã 740t, 匷ãè , ã¹ããã³ã°ã¢ãŒã 110, ã¹ããã³ã°ã¢ãŒã 1100,
ã¹ããã³ã°ã¢ãŒã 1110, arm8, arm810, arm9, ã¢ãŒã 9e, arm920, ã¢ãŒã 920t, ã¢ãŒã 922t, ã¢ãŒã 946e-s,
ã¢ãŒã 966e-s, ã¢ãŒã 968e-s, arm926ej-s, ã¢ãŒã 940t, ã¢ãŒã 9tdmi, ã¢ãŒã 10tdmi, ã¢ãŒã 1020t, arm1026ej-s,
ã¢ãŒã 10e, ã¢ãŒã 1020e, ã¢ãŒã 1022e, ã¢ãŒã 1136j-s, ã¢ãŒã 1136jf-s, mpã³ã¢, mpcorenovfp, ã¢ãŒã 1156t2-s,
ã¢ãŒã 1156t2f-s, ã¢ãŒã 1176JZ-S, arm1176jzf-s, ç®è³ª-a5, ç®è³ª-a7, ç®è³ª-a8, ç®è³ª-a9,
ç®è³ª-a12, ç®è³ª-a15, ç®è³ª-a53, ç®è³ª-a57, ç®è³ª-r4, ç®è³ª-r4f, ç®è³ª-r5,
ç®è³ª-r7, ç®è³ª-m4, ç®è³ª-m3, ç®è³ª-m1, ç®è³ª-m0, ç®è³ª-m0plus, é©ç°-pj4,
ã¹ã±ãŒã«, ç§ã¯, iwmmxt2, ep9312, fa526, fa626, fa606te, fa626te, fmp626, fa726te.
ããã«ããã®ãªãã·ã§ã³ã¯ãGCCãã³ãŒãã®ããã©ãŒãã³ã¹ã調æŽããå¿ èŠãããããšãæå®ã§ããŸã
big.LITTLEã·ã¹ãã ã®å Žåã èš±å¯ãããååã¯æ¬¡ã®ãšããã§ãã ç®è³ª-a15.ç®è³ª-a7,
ç®è³ª-a57.ç®è³ª-a53.
-mtune = generic-ã¢ãŒã GCCã次ã®ãã¬ã³ãã®ããã©ãŒãã³ã¹ã調æŽããå¿ èŠãããããšãæå®ããŸã
ã¢ãŒããã¯ãã£å ã®ããã»ããµ ã¢ãŒãã ç®çã¯ãäžã§ããŸãå®è¡ãããã³ãŒããçæããããšã§ã
çŸåšæã人æ°ã®ããããã»ããµãããã€ãã®å©çãããããæé©åéã®ãã©ã³ã¹
ç¯å²å ã®CPUãããã³ä»ã®CPUã®ããã©ãŒãã³ã¹ã®èœãšãç©Žãåé¿ããŸãã ã®å¹æ
ãã®ãªãã·ã§ã³ã¯ãCPUã¢ãã«ãåºå ¥ãããã«ã€ããŠãå°æ¥ã®GCCããŒãžã§ã³ã§å€æŽãããå¯èœæ§ããããŸãã
-mtune = native ã³ã³ãã€ã©ãŒã«ãã«ãã³ã³ãã¥ãŒã¿ãŒã®CPUãèªåæ€åºãããŸãã ã§
çŸåšããã®æ©èœã¯GNU / Linuxã§ã®ã¿ãµããŒããããŠããããã¹ãŠã®ã¢ãŒããã¯ãã£ããµããŒããããŠããããã§ã¯ãããŸããã
èªèãããã èªåæ€åºã倱æããå Žåããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-mcpu =å
ããã¯ãã¿ãŒã²ããARMããã»ããµã®ååãæå®ããŸãã GCCã¯ãã®ååã䜿çšããŠã
ã¿ãŒã²ããARMã¢ãŒããã¯ãã£ã®ååïŒã«ãã£ãŠæå®ãããŠãããã®ããã«ïŒ -è¡é²ïŒããã³ARMããã»ããµ
ããã©ãŒãã³ã¹ã調æŽããã¿ã€ãïŒ -ã ãã¥ãŒã³ïŒã ãã®ãªãã·ã§ã³ã®å Žæ
ãšãšãã«äœ¿çšãããŸã -è¡é² or -ã ãã¥ãŒã³ããããã®ãªãã·ã§ã³ã¯
ãã®ãªãã·ã§ã³ã®é©åãªéšåã
ãã®ãªãã·ã§ã³ã®èš±å®¹åã¯ã -ã ãã¥ãŒã³.
-mcpu = generic-ã¢ãŒã ã蚱容ããããšåçã§ã -XNUMXæ=ã¢ãŒã
-mtune = generic-ã¢ãŒãã èŠã -ã ãã¥ãŒã³ ãã芧ãã ããã
-mcpu = native ã³ã³ãã€ã©ãŒã«ãã«ãã³ã³ãã¥ãŒã¿ãŒã®CPUãèªåæ€åºãããŸãã ã§
çŸåšããã®æ©èœã¯GNU / Linuxã§ã®ã¿ãµããŒããããŠããããã¹ãŠã®ã¢ãŒããã¯ãã£ããµããŒããããŠããããã§ã¯ãããŸããã
èªèãããã èªåæ€åºã倱æããå Žåããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-mfpu =å
ããã¯ãã©ã®æµ®åå°æ°ç¹ããŒããŠã§ã¢ïŒãŸãã¯ããŒããŠã§ã¢ãšãã¥ã¬ãŒã·ã§ã³ïŒãã§å©çšå¯èœããæå®ããŸã
ã¿ãŒã²ããã èš±å¯ãããååã¯æ¬¡ã®ãšããã§ãã vfp, vfpv3, vfpv3-fp16, vfpv3-d16, vfpv3-d16-fp16,
vfpv3xd, vfpv3xd-fp16, ããªã³, ããªã³-fp16, vfpv4, vfpv4-d16, fpv4-sp-d16, ããªã³-vfpv4,
FP-ARMV8, ããªã³-fp-armv8, ã¯ãªãã-ããªã³-fp-armv8.
If -msoft-float ããã¯æµ®åå°æ°ç¹å€ã®åœ¢åŒãæå®ããŸãã
éžæããæµ®åå°æ°ç¹ããŒããŠã§ã¢ã«NEONæ¡åŒµæ©èœãå«ãŸããŠããå ŽåïŒäŸïŒ -mfpu=ããªã³),
æµ®åå°æ°ç¹æŒç®ã¯GCCã®èªåãã¯ãã«åãã¹ã«ãã£ãŠçæãããªãããšã«æ³šæããŠãã ãã
ãªãéãã -funsafe-æ°åŠã®æé©å ãæå®ãããŠããŸãã ããã¯NEONããŒããŠã§ã¢ã
æµ®åå°æ°ç¹æŒç®ã®IEEE754æšæºãå®å šã«ã¯å®è£ ããŠããŸããïŒ
ç¹å®ã®éæ£èŠåæ°ã¯ãŒããšããŠæ±ããããããNEONåœä»€ã䜿çšãããš
粟床ã®äœäžã«ã€ãªãããŸãã
-mfp16-format =å
ã__fp16ãå粟床浮åå°æ°ç¹åã®åœ¢åŒãæå®ããŸãã 蚱容ããã
åå㯠ãªã, IEEE, 代æ¿æ¡; ããã©ã«ã㯠ãªãããã®å Žåãã__fp16ã
ã¿ã€ãã¯å®çŸ©ãããŠããŸããã
-mstructure-size-boundary =n
ãã¹ãŠã®æ§é äœãšçµåã®ãµã€ãºã¯ãæ°ã®åæ°ã«åãäžããããŸãã
ãã®ãªãã·ã§ã³ã§èšå®ããããããã 蚱容å€ã¯8ã32ã64ã§ããããã©ã«ãå€
ããŒã«ãã§ãŒã³ã«ãã£ãŠç°ãªããŸãã COFFã察象ãšããããŒã«ãã§ãŒã³ã®å Žåãããã©ã«ãå€ã¯
8. 64ã®å€ã¯ãåºç€ãšãªãABIãããããµããŒãããŠããå Žåã«ã®ã¿èš±å¯ãããŸãã
ãã倧ããªæ°ãæå®ãããšãããé«éã§å¹ççãªã³ãŒããçæã§ããŸããã
ããã°ã©ã ã®ãµã€ãºã倧ããããŸãã ç°ãªãå€ã¯æœåšçã«äºææ§ããããŸããã
XNUMXã€ã®å€ã§ã³ã³ãã€ã«ãããã³ãŒãã¯ãå¿ ãããã³ãŒããŸãã¯ã©ã€ãã©ãªã§æ©èœããããšãæåŸ ã§ãããšã¯éããŸããã
æ§é äœãŸãã¯å ±çšäœã䜿çšããŠæ å ±ã亀æããå Žåã¯ãå¥ã®å€ã§ã³ã³ãã€ã«ãããŸãã
-mabort-on-noreturn
ãnoreturnãé¢æ°ã®æåŸã«ãé¢æ°ãabortããžã®åŒã³åºããçæããŸãã ã§ã
é¢æ°ãæ»ãããšããå Žåã«å®è¡ãããŸãã
-mlong-calls
-mno-long-calls
æåã«ã®ã¢ãã¬ã¹ãããŒãããããšã«ãããé¢æ°åŒã³åºããå®è¡ããããã«ã³ã³ãã€ã©ãŒã«æ瀺ããŸãã
é¢æ°ãã¬ãžã¹ã¿ã«å ¥ããŠããããã®ã¬ãžã¹ã¿ã§ãµãã«ãŒãã³åŒã³åºããå®è¡ããŸãã ãã
ã¿ãŒã²ããæ©èœã64ã¡ã¬ãã€ãã®ã¢ãã¬ã¹æå®ã®ç¯å²å€ã«ããå Žåã¯ãã¹ã€ãããå¿ èŠã§ã
ãµãã«ãŒãã³åŒã³åºãåœä»€ã®ãªãã»ããããŒã¹ããŒãžã§ã³ã®ç¯å²ã
ãã®ã¹ã€ãããæå¹ã«ããŠãããã¹ãŠã®é¢æ°åŒã³åºããé·ãåŒã³åºãã«å€ããããã§ã¯ãããŸããã
ãã¥ãŒãªã¹ãã£ãã¯ã¯ãéçé¢æ°ãé¢æ°ãæã€é¢æ°ã§ãã ã·ã§ãŒãã³ãŒã« å±æ§ã
ã®ã¹ã³ãŒãå ã«ããé¢æ° #ãã©ã°ã é·é»è©±çŠæ¢ ãã£ã¬ã¯ãã£ããããã³
å®çŸ©ãçŸåšã®ã³ã³ãã€ã«å ã§æ¢ã«ã³ã³ãã€ã«ãããŠããé¢æ°
é·é»è©±ã«ãªããŸããã ãã®ã«ãŒã«ã®äŸå€ã¯ã
é¢æ°å®çŸ©ãé¢æ° é·é»è©± å±æ§ãŸã㯠å±æ§ã
ã®ç¯å²å ã«ããé¢æ° #ãã©ã°ã ãã³ã°ã³ãŒã« ãã£ã¬ã¯ãã£ãã¯åžžã«
é·é»è©±ã«å€ãããŸããã
ãã®æ©èœã¯ããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠããŸããã æå®ãã -mno-long-calls ãããã埩å ãã
é¢æ°åŒã³åºãã #ãã©ã°ã
ãã³ã°ã³ãŒã«ãªã æ什ã ãããã®ã¹ã€ããã¯ãã³ã³ãã€ã©ãã©ã®ããã«åäœãããã«ã¯åœ±é¿ããªãããšã«æ³šæããŠãã ããã
é¢æ°ãã€ã³ã¿ãä»ããŠé¢æ°åŒã³åºããåŠçããã³ãŒããçæããŸãã
-msingle-pic-base
PICã¢ãã¬ã¹æå®ã«äœ¿çšãããã¬ãžã¹ã¿ããããŒãããã®ã§ã¯ãªããèªã¿åãå°çšãšããŠæ±ããŸãã
åé¢æ°ã®ããããŒã°ã ã©ã³ã¿ã€ã ã·ã¹ãã ã¯ãããåæåãã責任ããããŸã
å®è¡ãéå§ããåã«ãé©åãªå€ã§ç»é²ããŠãã ããã
-mpic-register =REG
PICã¢ãã¬ã¹æå®ã«äœ¿çšããã¬ãžã¹ã¿ãæå®ããŸãã æšæºã®PICããŒã¹ã±ãŒã¹ã®å Žåã
ããã©ã«ãã¯ãã³ã³ãã€ã©ã«ãã£ãŠæ±ºå®ãããé©åãªã¬ãžã¹ã¿ã«ãªããŸãã ã·ã³ã°ã«PICããŒã¹çš
ããã©ã«ã㯠R9 ã¿ãŒã²ããã EABI ããŒã¹ã§ããããã¹ã¿ã㯠ãã§ãã¯ãæå¹ã«ãªã£ãŠããå Žåã
ãã以å€ã®å Žåãããã©ã«ã㯠R10.
-mpic-data-is-text-relative
åããŒã¿ã»ã°ã¡ã³ãã¯ãããŒãæã«ããã¹ãã»ã°ã¡ã³ãã«é¢é£ããŠãããšæ³å®ããŸãã ãããã£ãŠã
PCçžå¯Ÿæäœã䜿çšããŠããŒã¿ãã¢ãã¬ã¹æå®ã§ããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸã
VxWorksRTP以å€ã®ã¿ãŒã²ããã®å Žåã
-mpoke-é¢æ°å
åé¢æ°ã®ååããé¢æ°ã®çŽåã®ããã¹ãã»ã¯ã·ã§ã³ã«æžã蟌ã¿ãŸã
ããããŒã°ã çæãããã³ãŒãã¯æ¬¡ã®ããã«ãªããŸãã
t0
.ascii "arm_poke_function_name"ã0
.align
t1
.word 0xff000000 +ïŒt1-t0ïŒ
arm_poke_function_name
mov ipãsp
stmfd spïŒã{fpãipãlrãpc}
ãµãfpãipãïŒ4
ã¹ã¿ãã¯ããã¯ãã¬ãŒã¹ãå®è¡ããå Žåãã³ãŒãã¯ãfp+ãã«æ ŒçŽãããŠãããpcãã®å€ãæ€æ»ã§ããŸãã
0"ããã¬ãŒã¹é¢æ°ãäœçœ®"pc-12"ã調ã¹ãäžäœ8ãããã
ã»ãããããšããã®çŽåã«é¢æ°åãåã蟌ãŸããŠããããšãããããŸã
å Žæã§ãé·ãã¯ãïŒïŒpc [-3]ïŒïŒ0xff000000ïŒãã§ãã
-mthumb
-ããŒã
ARMç¶æ ãšThumbç¶æ ã§å®è¡ããã³ãŒããçæãããã©ãããéžæããŸãã ã®ããã©ã«ã
ã»ãšãã©ã®æ§æã¯ãARMç¶æ ã§å®è¡ãããã³ãŒããçæããããšã§ãããããã©ã«ãã¯
ã§GCCãæ§æããããšã§å€æŽã§ããŸã --with-mode =ç¶æ ãªãã·ã§ã³ãæ§æããŸãã
-mtpcs-ãã¬ãŒã
ã®ThumbProcedureCallStandardã«æºæ ããã¹ã¿ãã¯ãã¬ãŒã ãçæããŸãã
ãã¹ãŠã®éãªãŒãé¢æ°ã ïŒãªãŒãé¢æ°ã¯ãä»ã®é¢æ°ãåŒã³åºããªãé¢æ°ã§ã
é¢æ°ãïŒããã©ã«ã㯠-mno-tpcs-ãã¬ãŒã .
-mtpcs-ãªãŒã-ãã¬ãŒã
ã®ThumbProcedureCallStandardã«æºæ ããã¹ã¿ãã¯ãã¬ãŒã ãçæããŸãã
ãã¹ãŠã®èã®æ©èœã ïŒãªãŒãé¢æ°ã¯ãä»ã®é¢æ°ãåŒã³åºããªãé¢æ°ã§ããïŒ
ããã©ã«ã㯠-mno-apcs-ãªãŒããã¬ãŒã .
-mcallee-ã¹ãŒããŒã€ã³ã¿ãŒã¯ãŒãã³ã°
ã³ã³ãã€ã«ããããã¡ã€ã«å ã®ãã¹ãŠã®å€éšããèŠããé¢æ°ã«ARMåœä»€ãäžããŸã
é¢æ°ã®æ®ãã®éšåãå®è¡ããåã«Thumbã¢ãŒãã«åãæ¿ããããããŒãèšå®ããŸãã
ããã«ããããããã®é¢æ°ãçžäºäœçšããªãã³ãŒãããåŒã³åºãããšãã§ããŸãã ãã®ãªãã·ã§ã³ã¯
ã€ã³ã¿ãŒã¯ãŒãã³ã°ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠãããããAAPCSæ§æã§ã¯ç¡å¹ã§ãã
-mcaller-ã¹ãŒããŒã€ã³ã¿ãŒã¯ãŒãã³ã°
é¢æ°ãã€ã³ã¿ïŒä»®æ³é¢æ°ãå«ãïŒãä»ããåŒã³åºããæ£ããå®è¡ã§ããããã«ããŸã
ã¿ãŒã²ããã³ãŒããã€ã³ã¿ãŒã¯ãŒãã³ã°çšã«ã³ã³ãã€ã«ãããŠãããã©ããã«é¢ä¿ãªãã
ãã®ãªãã·ã§ã³ã®å Žåãé¢æ°ãã€ã³ã¿ã®å®è¡ã³ã¹ãã«ããããªãªãŒããŒãããããããŸã
æå¹ã«ãªã£ãŠããŸãã ã€ã³ã¿ãŒã¯ãŒãã³ã°ã¯æ¬¡ã®ããã«ãªã£ãŠããããããã®ãªãã·ã§ã³ã¯AAPCSæ§æã§ã¯ç¡å¹ã§ãã
ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
-mtp =å
ã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžãã€ã³ã¿ã®ã¢ã¯ã»ã¹ã¢ãã«ãæå®ããŸãã æå¹ãªã¢ãã«ã¯
ãœãããã__aeabi_read_tpããžã®åŒã³åºããçæããŸãã cp15ãã¹ã¬ããããã§ããããŸã
ãcp15ãããã®çŽæ¥ãã€ã³ã¿ïŒarm6kã¢ãŒããã¯ãã£ã§ãµããŒãïŒãããã³ ãªãŒãããã®
éžæããããã»ããµã«å©çšå¯èœãªæè¯ã®æ¹æ³ã䜿çšããŸãã ããã©ã«ãèšå®ã¯
ãªãŒã.
-mtls-dialect =æ¹èš
ã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžãžã®ã¢ã¯ã»ã¹ã«äœ¿çšããæ¹èšãæå®ããŸãã äº æ¹èšsã§ã
ãµããŒã---ã㌠㚠ããŒ2ãéžæããŸãã ã㌠æ¹èšã¯å ã®GNUã¹ããŒã ãéžæããŸã
ããŒã«ã«ããã³ã°ããŒãã«ã®åçTLSã¢ãã«ããµããŒãããŸãã The ããŒ2 æ¹èšã¯GNUãéžæããŸã
èšè¿°åã¹ããŒã ãå ±æã©ã€ãã©ãªã®ããã©ãŒãã³ã¹ãåäžããŸãã GNU
èšè¿°åã¹ããŒã ã¯å ã®ã¹ããŒã ãšäºææ§ããããŸãããæ°ããã¹ããŒã ãå¿ èŠã§ã
ã¢ã»ã³ãã©ããªã³ã«ãã©ã€ãã©ãªã®ãµããŒãã åæããã³ããŒã«ã«ã®execTLSã¢ãã«ã¯
ãã®ãªãã·ã§ã³ã®åœ±é¿ãåãããåžžã«å ã®ã¹ããŒã ã䜿çšããŸãã
-mword-åé 眮
ã¯ãŒããµã€ãºã®å€ïŒã€ãŸããR_ARM_ABS32ïŒã§ã®ã¿çµ¶å¯Ÿåé 眮ãçæããŸãã ããã¯
ã©ã³ã¿ã€ã ããŒããŒã課ãã¿ãŒã²ããïŒuClinuxãSymbianOSïŒã§ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ãã®å¶éãããã³ -fpic or -fPIC æå®ãããŠããŸãã
-mfix-cortex-m3-ldrd
äžéšã®Cortex-M3ã³ã¢ã¯ããldrdãåœä»€ã
ãªãŒããŒã©ãããããã¹ãã£ããŒã·ã§ã³ã¬ãžã¹ã¿ãšããŒã¹ã¬ãžã¹ã¿ã䜿çšãããŸãã ãã®ãªãã·ã§ã³ã¯çæãåé¿ããŸã
ãããã®æ瀺ã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ããã©ã«ãã§æå¹ã«ãªããŸãã -mcpu = cortex-m3 is
æå®ã
-äžæŽåã¢ã¯ã»ã¹
-mno-unaligned-access
ã¢ãã¬ã¹ããã®16ãããå€ãš32ãããå€ã®èªã¿åããšæžã蟌ã¿ãæå¹ïŒãŸãã¯ç¡å¹ïŒã«ããŸã
16ããããŸãã¯32ãããã§æŽåãããŠããŸããã ããã©ã«ãã§ã¯ãã¢ã©ã€ã¡ã³ããããŠããªãã¢ã¯ã»ã¹ã¯ãã¹ãŠç¡å¹ã«ãªã£ãŠããŸã
ARMv6ããåããã³ãã¹ãŠã®ARMv6-Mã¢ãŒããã¯ãã£ãããã³ä»ã®ãã¹ãŠã®ã¢ãŒããã¯ãã£ã§æå¹ã«ãªã£ãŠããŸãã ããã
éå¢çæŽåã¢ã¯ã»ã¹ãæå¹ã«ãªã£ãŠããªãå Žåãããã¯ãããããŒã¿æ§é å ã®ã¯ãŒããã¢ã¯ã»ã¹ãããŸã
äžåºŠã«XNUMXãã€ãã
ARM å±æ§ãTag_CPU_unaligned_accessãã¯ãçæããããªããžã§ã¯ã ãã¡ã€ã«ã«èšå®ãããŸãã
ãã®ãªãã·ã§ã³ã®èšå®ã«å¿ããŠãtrue ãŸã㯠false ã«ãªããŸãã æŽåããŠããªãå Žå
ã¢ã¯ã»ã¹ãæå¹ã«ãªã£ãŠããå Žåãããªããã»ããµ ã·ã³ãã«ã__ARM_FEATURE_UNALIGNEDãã
å®çŸ©ãããã
-mneon-for-64ããã
Neonã䜿çšããŠã¹ã«ã©ãŒ64ãããæäœãåŠçã§ããããã«ããŸãã ããã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸã
ã³ã¢ã¬ãžã¹ã¿ããããªã³ã«ããŒã¿ã移åããã³ã¹ããé«ãããã§ãã
-mslow-ãã©ãã·ã¥ ããŒã¿
ãã©ãã·ã¥ããã®ããŒã¿ã®ããŒãã¯ãåœä»€ã®ãã§ãããããé ããšæ³å®ããŸãã ãããã£ãŠãæåéã
ããã©ãŒãã³ã¹ãåäžãããããã«ãè² è·ãæå°éã«æããŸãã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿ãµããŒããããŸã
ARMv7 Mãããã¡ã€ã«çšã«ã³ã³ãã€ã«ããããã©ã«ãã§ãªãã«ããŸãã
-mrestrict-ãã
ARMv8ã®ã«ãŒã«ã«æºæ ããããã«ITãããã¯ã®çæãå¶éããŸãã ITãããã¯ã¯
éžæããäžé£ã®åœä»€ããã®åäžã®16ãããåœä»€ã®ã¿ãå«ãŸããŸãã ãã
ARMv8ãµã ã¢ãŒãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
AVR ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãAVRå®è£ çšã«å®çŸ©ãããŠããŸãã
-mmcu =MCU
Atmel AVRåœä»€ã»ããã¢ãŒããã¯ãã£ïŒISAïŒãŸãã¯MCUã¿ã€ããæå®ããŸãã
ãã®ãªãã·ã§ã³ã®ããã©ã«ã㯠@tie{}"avr2" ã§ãã
GCCã¯ã次ã®AVRããã€ã¹ãšISAããµããŒãããŠããŸãã
ãavr2ã
æ倧8@tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãåãããã¯ã©ã·ãã¯ãããã€ã¹ã MCU@tie {} = "attiny22"ã
"attiny26", "at90c8534", "at90s2313", "at90s2323", "at90s2333", "at90s2343",
"at90s4414", "at90s4433", "at90s4434", "at90s8515", "at90s8535".
ãavr25ã
æ倧8@tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãšãMOVWããåãããã¯ã©ã·ãã¯ãããã€ã¹
åœä»€ã MCU@tie{}= "ata5272", "ata6289", "attiny13", "attiny13a",
ãattiny2313ãããattiny2313aãããattiny24ãããattiny24aãããattiny25ãããattiny261ãã
ãattiny261aãããattiny43uãããattiny4313ãããattiny44ãããattiny44aãããattiny45ãã
ãattiny461ãããattiny461aãããattiny48ãããattiny84ãããattiny84aãããattiny85ãã
ãattiny861ãããattiny861aãããattiny87ãããattiny88ãããat86rf401ãã
ãavr3ã
16 @ tie{}KiBãã64@tie{}KiBãŸã§ã®ããã°ã©ã ã¡ã¢ãªãåãããã¯ã©ã·ãã¯ãããã€ã¹ã
MCU@tie {} = "at43usb355"ã"at76c711"ã
ãavr31ã
128 @ tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãåãããã¯ã©ã·ãã¯ãããã€ã¹ã MCU@tie {} = "atmega103"ã
ãat43usb320ãã
ãavr35ã
16 @ tie{}KiBãã64@tie{}KiBãŸã§ã®ããã°ã©ã ã¡ã¢ãªãåãããã¯ã©ã·ãã¯ãããã€ã¹
ãMOVWãåœä»€ã MCU@tie{}= "ata5505", "atmega16u2", "atmega32u2",
ãatmega8u2ãããattiny1634ãããattiny167ãããat90usb162ãããat90usb82ãã
ãavr4ã
æ倧8@tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãåãããæ¡åŒµãããã€ã¹ã MCU@tie {} = "ata6285"ã
ãata6286ãããatmega48ãããatmega48aãããatmega48pãããatmega48paãããatmega8ãã
ãatmega8aãããatmega8hvaãããatmega8515ãããatmega8535ãããatmega88ãããatmega88aãã
ãatmega88pãããatmega88paãããat90pwm1ãããat90pwm2ãããat90pwm2bãããat90pwm3ãã
ãat90pwm3bãããat90pwm81ãã
ãavr5ã
16 @ tie{}KiBãã64@tie{}KiBãŸã§ã®ããã°ã©ã ã¡ã¢ãªãåãããæ¡åŒµãããã€ã¹ã
MCU@tie{}= "ata5790", "ata5790n", "ata5795", "atmega16", "atmega16a",
"atmega16hva"ã"atmega16hva2"ã"atmega16hvb"ã"atmega16hvbrevb"ã"atmega16m1"ã
ãatmega16u4ãããatmega161ãããatmega162ãããatmega163ãããatmega164aãããatmega164pãã
ãatmega164paãããatmega165ãããatmega165aãããatmega165pãããatmega165paãã
ãatmega168ãããatmega168aãããatmega168pãããatmega168paãããatmega169ãããatmega169aãã
ãatmega169pãããatmega169paãããatmega26hvgãããatmega32ãããatmega32aãããatmega32c1ãã
"atmega32hvb"ã"atmega32hvbrevb"ã"atmega32m1"ã"atmega32u4"ã"atmega32u6"ã
ãatmega323ãããatmega324aãããatmega324pãããatmega324paãããatmega325ãããatmega325aãã
ãatmega325pãããatmega3250ãããatmega3250aãããatmega3250pãããatmega3250paãã
ãatmega328ãããatmega328pãããatmega329ãããatmega329aãããatmega329pãããatmega329paãã
ãatmega3290ãããatmega3290aãããatmega3290pãããatmega3290paãããatmega406ãã
ãatmega48hvfãããatmega64ãããatmega64aãããatmega64c1ãããatmega64hveãããatmega64m1ãã
ãatmega64rfa2ãããatmega64rfr2ãããatmega640ãããatmega644ãããatmega644aãã
ãatmega644pãããatmega644paãããatmega645ãããatmega645aãããatmega645pãã
ãatmega6450ãããatmega6450aãããatmega6450pãããatmega649ãããatmega649aãã
ãatmega649pãããatmega6490ãããatmega6490aãããatmega6490pãããat90can32ãã
"at90can64", "at90pwm161", "at90pwm216", "at90pwm316", "at90scr100", "at90usb646",
ãat90usb647ãããat94kãããm3000ãã
ãavr51ã
128 @ tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãåãããæ¡åŒµãããã€ã¹ã MCU@tie {} = "atmega128"ã
ãatmega128aãããatmega128rfa1ãããatmega1280ãããatmega1281ãããatmega1284ãã
"atmega1284p", "at90can128", "at90usb1286", "at90usb1287".
ãavr6ã
3ãã€ãã®PCãã€ãŸã128 @ tie{}KiBãè¶ ããããã°ã©ã ãåãããæ¡åŒµãããã€ã¹
ã¡ã¢ãªã MCU@tie{} = "atmega2560", "atmega2561".
ãavrxmega2ã
8 @ tie{}KiB以äžããã³æ倧64@tie{}KiBã®ããã°ã©ã ã¡ã¢ãªãåãããXMEGAãããã€ã¹ã
MCU@tie{}= "atmxt112sl", "atmxt224", "atmxt224e", "atmxt336s", "atxmega16a4",
"atxmega16a4u", "atxmega16c4", "atxmega16d4", "atxmega32a4", "atxmega32a4u",
"atxmega32c4", "atxmega32d4", "atxmega32e5", "atxmega32x1".
ãavrxmega4ã
64 @ tie{}KiB以äžããã³æ倧128@tie{}KiBã®ããã°ã©ã ãåãããXMEGAãããã€ã¹
ã¡ã¢ãªã MCU@tie {} = "atxmega64a3"ã "atxmega64a3u"ã "atxmega64a4u"ã "atxmega64b1"ã
"atxmega64b3", "atxmega64c3", "atxmega64d3", "atxmega64d4".
ãavrxmega5ã
64 @ tie{}KiB以äžããã³æ倧128@tie{}KiBã®ããã°ã©ã ãåãããXMEGAãããã€ã¹
ã¡ã¢ãªãš64@tie{}KiB以äžã®RAMã MCU@tie {} = "atxmega64a1"ã
ãatxmega64a1uãã
ãavrxmega6ã
128 @ tie{}KiBãè¶ ããããã°ã©ã ã¡ã¢ãªãåãããXMEGAãããã€ã¹ã MCU@tie {} =
ãatmxt540sãããatmxt540srevaãããatxmega128a3ãããatxmega128a3uãããatxmega128b1ãã
"atxmega128b3", "atxmega128c3", "atxmega128d3", "atxmega128d4", "atxmega192a3",
"atxmega192a3u", "atxmega192c3", "atxmega192d3", "atxmega256a3", "atxmega256a3b",
"atxmega256a3bu", "atxmega256a3u", "atxmega256c3", "atxmega256d3", "atxmega384c3",
ãatxmega384d3ãã
ãavrxmega7ã
128 @ tie{}KiB以äžã®ããã°ã©ã ã¡ã¢ãªãšä»¥äžã®ãXMEGAãããã€ã¹
64 @ tie{}KiBã®RAMã MCU@tie {} = "atxmega128a1"ã "atxmega128a1u"ã"atxmega128a4u"ã
ãavr1ã
ãã®ISAã¯ãæå°éã®AVRã³ã¢ã«ãã£ãŠå®è£ ãããã¢ã»ã³ãã©ãŒã§ã®ã¿ãµããŒããããŸãã
MCU@tie {} = "attiny11"ã "attiny12"ã "attiny15"ã "attiny28"ã"at90s1200"ã
-maccumulate-args
çºä¿¡é¢æ°ã®åŒæ°ã环ç©ããå¿ èŠãªã¹ã¿ãã¯ã¹ããŒã¹ãååŸ/解æŸããŸã
é¢æ°ããããŒã°/ãšãããŒã°ã§é¢æ°åŒæ°ãXNUMXåéä¿¡ããŸãã ãã®ãªãã·ã§ã³ããªããšã
çºä¿¡åŒæ°ã¯ãé¢æ°ãåŒã³åºãåã«ããã·ã¥ãããåŸã§ããããããŸãã
é¢æ°åŒã³åºãã®åŸã«åŒæ°ããããããããšã¯ãAVRã§ã³ã¹ãããããå¯èœæ§ãããããã
ã¹ã¿ãã¯ã¹ããŒã¹ãèç©ãããšãåŒæ°ãå¿ èŠã«ãªããããå®è¡å¯èœãã¡ã€ã«ãå°ãããªãå¯èœæ§ããããŸã
ãã®ãããªé¢æ°åŒã³åºãã®åŸã§ã¹ã¿ãã¯ããåé€ãããªãããã«ããŸãã
ãã®ãªãã·ã§ã³ã¯ããžã®è€æ°ã®åŒã³åºããå®è¡ããé¢æ°ã®ã³ãŒããµã€ãºãçž®å°ããå¯èœæ§ããããŸã
printfã®ãããªé¢æ°ã®åŒã³åºãã®ããã«ãã¹ã¿ãã¯äžã§åŒæ°ãååŸããé¢æ°ã
-mbranch-cost =ã³ã¹ã
æ¡ä»¶ä»ãåå²åœä»€ã®åå²ã³ã¹ãã次ã®ããã«èšå®ããŸã ã³ã¹ãã åççãªå€
for ã³ã¹ã å°ãããéè² ã®æŽæ°ã§ãã ããã©ã«ãã®ãã©ã³ãã³ã¹ãã¯0ã§ãã
-mcall-ããããŒã°
é¢æ°ã®ããããŒã°/ãšãããŒã°ã¯ãé©åãªãµãã«ãŒãã³ãžã®åŒã³åºããšããŠæ¡åŒµãããŸãã ã³ãŒã
ãµã€ãºãå°ããã§ãã
-ãã³ã8
ãintãã8ãããæŽæ°ãšä»®å®ããŸãã ããã¯ãã¹ãŠã®ã¿ã€ãã®ãµã€ãºã«åœ±é¿ããŸãããcharãã¯1ã§ãã
ãã€ãããintãã¯1ãã€ãããlongãã¯2ãã€ãããlonglongãã¯4ãã€ãã§ãã ãé¡ãããŸã
ãã®ãªãã·ã§ã³ã¯Cæšæºã«æºæ ããŠããŸããããçµæãšããŠå°ãããªãããšã«æ³šæããŠãã ãã
ã³ãŒããµã€ãºã
-mno-å²ã蟌ã¿
çæãããã³ãŒãã¯ãããŒããŠã§ã¢å²ã蟌ã¿ãšäºææ§ããããŸããã ã³ãŒããµã€ãºãå°ããã§ãã
-mãªã©ãã¯ã¹
ãCALLããŸãã¯ãCALLãã眮ãæããŠã¿ãŠãã ããã çããRCALLãå¿çã«ãããJMPãåœä»€ã ãRJMPã
該åœããå Žåã®æ瀺ã ã-mrelaxããèšå®ãããšãã--relaxããªãã·ã§ã³ã
ãªã³ã«ãŒãåŒã³åºããããšãã®ãªã³ã«ãŒ ã³ãã³ã ã©ã€ã³ã
ãžã£ã³ããªãã»ããã¯ä»¥åã¯äžæã§ãã£ãããããžã£ã³ãç·©åã¯ãªã³ã«ãŒã«ãã£ãŠå®è¡ãããŸã
ã³ãŒãããããŸãã ãããã£ãŠãã³ã³ãã€ã©ã«ãã£ãŠçæãããã¢ã»ã³ãã©ã³ãŒãã¯åãã§ãã
ãã ããå®è¡å¯èœãã¡ã€ã«ã®åœä»€ã¯ãã¢ã»ã³ãã©ã®åœä»€ãšã¯ç°ãªãå ŽåããããŸã
ã³ãŒââãã
ãªã³ã«ãŒã¹ã¿ããå¿ èŠãªå Žåã¯ããªã©ã¯ã·ã³ã°ããªã³ã«ããå¿ èŠããããŸãããEINDãã®ã»ã¯ã·ã§ã³ãåç §ããŠãã ããã
以äžã®ãªã³ã«ãŒã¹ã¿ãã
-msp8
ã¹ã¿ãã¯ãã€ã³ã¿ã¬ãžã¹ã¿ã8ãããã¬ãžã¹ã¿ãšããŠæ±ããŸããã€ãŸãã
ã¹ã¿ãã¯ãã€ã³ã¿ã¯ãŒãã§ãã éåžžããã®ãªãã·ã§ã³ãæåã§èšå®ããå¿ èŠã¯ãããŸããã
ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ã次ã®ãã«ãã©ã€ãã©ãªãéžæããŠãã«ãããããã«å éšçã«äœ¿çšãããŸãã
ã¢ãŒããã¯ãã£ãavr2ãããã³ãavr25ãã ãããã®ã¢ãŒããã¯ãã£ã¯ãããã€ã¹ã®æç¡ã«ãããããããã€ã¹ãæ··åããŸã
ããã ã-mmcu=avr2ããŸãã¯ã-mmcu=avr25ã以å€ã®èšå®ã®å Žåãã³ã³ãã€ã© ãã©ã€ãã¯
ã³ã³ãã€ã©æ¬äœã®ã³ãã³ã ã©ã€ã³ãããã®ãªãã·ã§ã³ãè¿œå ãŸãã¯åé€ããŸãã
ã³ã³ãã€ã©ã¯ãããã€ã¹ãŸãã¯ã¢ãŒããã¯ãã£ã« 8 ãããã®ã¹ã¿ã㯠ãã€ã³ã¿ããããã©ãããèªèãããããã£ãŠ
ãSPHãã¬ãžã¹ã¿ããªããã©ããã
-mstrict-X
ããŒããŠã§ã¢ãææ¡ããæ¹æ³ã§ã¢ãã¬ã¹ã¬ãžã¹ã¿ãXãã䜿çšããŸãã ããã¯ããXãã
éæ¥ããã¹ãã€ã³ã¯ãªã¡ã³ãããŸãã¯ãã¬ãã¯ãªã¡ã³ãã®ã¢ãã¬ã¹æå®ã§ã®ã¿äœ¿çšãããŸãã
ãã®ãªãã·ã§ã³ããªãå ŽåããXãã¬ãžã¹ã¿ã¯ãYããŸãã¯ãZããšåãããã«äœ¿çšã§ããŸãã
次ã«ãè¿œå ã®åœä»€ã«ãã£ãŠãšãã¥ã¬ãŒããããŸãã ããšãã°ã次ã®å€ãããŒãããŸã
ã¬ãžã¹ã¿ãžã®å°ããªéè² ã®ãconst<64ãã«ãããX+constãã¢ãã¬ã¹æå® Rn is
ãšããŠå®è¡
adiw r26ãconst; X + = const
ld ã ãã ; = * X
sbiw r26ãconst; X-= const
-mtiny-ã¹ã¿ãã¯
ã¹ã¿ãã¯ãã€ã³ã¿ã®äžäœ8@tie{}ãããã®ã¿ãå€æŽããŸãã
-Waddr-space-convert
çµæã®ã¢ãã¬ã¹ã
çä¿¡ã¢ãã¬ã¹ç©ºéã«ã¹ããŒã¹ãå«ãŸããŠããŸããã
ãEINDãããã³ 128 Ki ãã€ããè¶ ãããã©ãã·ã¥ãæèŒããããã€ã¹
å®è£ ã®ãã€ã³ã¿ã¯16@tie{}ãããå¹ ã§ãã é¢æ°ãŸãã¯ã©ãã«ã®ã¢ãã¬ã¹
éæ¥ãžã£ã³ããåŒã³åºããä»»æã®ã³ãŒããã¿ãŒã²ããã«ã§ããããã«ãã¯ãŒãã¢ãã¬ã¹ãšããŠè¡šãããŸã
64 @ tie{}Kiã¯ãŒãã®ç¯å²ã®ã¢ãã¬ã¹ã
128 @ tie{}Kiãã€ããè¶ ããããã€ã¹ã§ã®éæ¥ãžã£ã³ãã容æã«ãããã
ããã°ã©ã ã¡ã¢ãªç©ºéã«ã¯ããEINDããšåŒã°ããç¹æ®æ©èœã¬ãžã¹ã¿ããããŸãã
ãEICALLããŸãã¯ãEIJMPãåœä»€ã次ã®å Žåã®ã¿ãŒã²ããã¢ãã¬ã¹ã®æãéèŠãªéšå
äžå€ã
ãããã®ããã€ã¹ã§ã®éæ¥ãžã£ã³ãããã³åŒã³åºãã¯ãã³ã³ãã€ã©ã«ãã£ãŠæ¬¡ã®ããã«åŠçããã
ããã€ãã®å¶éããããŸãïŒ
· ã³ã³ãã€ã©ã¯ "EIND" ãèšå®ããŸããã
· ã³ã³ãã€ã©ã¯ã"EICALL"/"EIJMP" åœä»€ã§æé»çã« "EIND" ã䜿çšããããèªã¿åãå ŽåããããŸãã
ãRETãã䜿çšããŠéæ¥åŒã³åºã/ãžã£ã³ãããšãã¥ã¬ãŒãããããã«çŽæ¥ãEINDã
åœä»€ã
· ã³ã³ãã€ã©ã¯ããEINDããã¹ã¿ãŒãã¢ãã ã³ãŒããŸãã¯
å¿çšã ç¹ã«ããEINDãã¯é¢æ°ãŸãã¯å²ã蟌ã¿ã§ä¿å/埩å ãããŸãã
ãµãŒãã¹ã«ãŒãã³ã®ããããŒã°/ãšãããŒã°ã
· é¢æ°ãžã®éæ¥åŒã³åºããšèšç®ããã goto ã®å Žåããªã³ã«ã¯ ã¹ã¿ãã ã¹ã¿ã
ãžã£ã³ãããããšåŒã°ããããšããããŸã ãã©ã³ããªã³ã ãããã£ãŠãéæ¥åŒã³åºã/ãžã£ã³ãã¯ã«ãžã£ã³ãããŸã
ãã®ãããªã¹ã¿ãã ã¹ã¿ãã«ã¯ãç®çã®ã¢ãã¬ã¹ãžã®çŽæ¥ãžã£ã³ããå«ãŸããŠããŸãã
· ãªã³ã«ãŒãã¹ã¿ããçæããããã«ããªã³ã«ãŒç·©åãæå¹ã«ããå¿ èŠããããŸãã
æ£ãããã¹ãŠã®ç¶æ³ã ã³ã³ãã€ã© ãªãã·ã§ã³ "-mrelax" ãš linler ãªãã·ã§ã³ãåç §ããŠãã ããã
" - ãªã©ãã¯ã¹"ã ãªã³ã«ãŒãã¹ã¿ããçæããããšã«ãªã£ãŠãããŸããªã±ãŒã¹ããããŸããã
ç·©åããã圹ç«ã€ãšã©ãŒ ã¡ãã»ãŒãžã衚瀺ããã«äžæ¢ããŸãã
ã»ãEIND=0ãã®ã³ãŒãã¯ãããã©ã«ãã®ãªã³ã«ã¹ã¯ãªãããé 眮ãããŠããŸãã ã³ãŒããæ³å®ãããå Žå
ãEINDïŒ= 0ãã®ã»ããã¢ããã§æ©èœããã«ã¯ãã«ã¹ã¿ã ãªã³ã«ãŒã¹ã¯ãªãããé çªã«äœ¿çšããå¿ èŠããããŸã
ååãã.trampolinesãã§å§ãŸãã»ã¯ã·ã§ã³ã次ã®ã»ã°ã¡ã³ãã«é 眮ããŸãã
ãEINDãã¯ãæããŸãã
· libgcc ããã®èµ·åã³ãŒã㯠"EIND" ãèšå®ããŸããã ã¹ã¿ãŒãã¢ãã ã³ãŒãããã¬ã³ãã§ããããšã«æ³šæããŠãã ãã
libgccããã³AVR-LibCããã®ã³ãŒãã®ã ãEINDãã«å¯ŸããAVR-LibCã®åœ±é¿ã«ã€ããŠã¯ãAVR-ãåç §ããŠãã ããã
LibCãŠãŒã¶ãŒããã¥ã¢ã«ïŒ "http://nongnu.org/avr-libc/user-manual/"ïŒã
· ãŠãŒã¶ãŒåºæã®èµ·åã³ãŒãããEINDããæ©æã«èšå®ããããšã¯æ£åœã§ããããšãã°ã
ã»ã¯ã·ã§ã³ã.init3ãã«ããåæåã³ãŒãã®æ段ã ãã®ãããªã³ãŒãã¯åã«å®è¡ãããŸã
RAMãåæåããã³ã³ã¹ãã©ã¯ã¿ãŒãåŒã³åºãäžè¬çãªã¹ã¿ãŒãã¢ããã³ãŒãã§ããã
ãã¯ãã«ããŒãã«ãããã»ã°ã¡ã³ãã«ãEINDããèšå®ããAVR-LibCããã®èµ·åã³ãŒã
äœçœ®ããŠããŸãã
ïŒå«ã
éçãã€ã
__attribute __ïŒïŒsectionïŒ "ãinit3"ïŒãnakedãusedãno_instrument_functionïŒïŒ
init3_set_eindïŒvoidïŒ
{
__asm volatileïŒ "ldi r24ãpm_hh8ïŒ__ trampolines_startïŒ\ n \ t"
"outïŒ i0ãr24" :: "n"ïŒïŒEINDïŒïŒ "r24"ã "memory"ïŒ;
}
ã__trampolines_startãã·ã³ãã«ã¯ããªã³ã«ãŒã¹ã¯ãªããã§å®çŸ©ãããŠããŸãã
· 以äžã® XNUMX ã€ã®æ¡ä»¶ãæºããããŠããå Žåããªã³ã«ã«ãã£ãŠã¹ã¿ããèªåçã«çæãããŸãã
äŒã£ãïŒ
-
ïŒã®ç¥ çæãã ã¹ã¿ãïŒ ãã®ããã§ãïŒ
LDI r24ãlo8ïŒgsïŒ ïŒïŒ
LDI r25ãhi8ïŒgsïŒ ïŒïŒ
-
å€åŽ ã¹ã¿ããé 眮ãããŠããã»ã°ã¡ã³ãã
· ã³ã³ãã€ã©ã¯ã次ã®ç¶æ³ã§ã³ãŒã ã©ãã«ã«å¯ŸããŠãã®ãã㪠"gs" 修食åãçºè¡ããŸãã
-
-
- -mcall-ããããŒã°>
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
-
æå®ã§ããããŒãã« -fno-ãžã£ã³ãããŒãã« ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
-
-
· ãã®ãããªéã·ã³ããªã㯠ã¢ãã¬ã¹ãžã®ãžã£ã³ã㯠ãµããŒãïŒ
int mainïŒvoidïŒ
{
/*ã¯ãŒãã¢ãã¬ã¹0x2ã§é¢æ°ãåŒã³åºã*/
returnïŒïŒintïŒ*ïŒïŒvoidïŒïŒ0x2ïŒïŒïŒ;
}
代ããã«ãã¹ã¿ããèšå®ããå¿ èŠããããŸããã€ãŸããé¢æ°ã¯ã·ã³ãã«ãä»ããŠåŒã³åºãå¿ èŠããããŸã
ïŒäŸã§ã¯ãfunc_4ãïŒïŒ
int mainïŒvoidïŒ
{
extern int func_4ïŒvoidïŒ;
/*ãã€ãã¢ãã¬ã¹0x4ã§é¢æ°ãåŒã³åºã*/
func_4ïŒïŒ;ãè¿ããŸãã
}
ã¢ããªã±ãŒã·ã§ã³ã¯ã-Wl,--defsym,func_4=0x4ãã§ãªã³ã¯ãããŸãã ãŸãã¯ããfunc_4ã
ãªã³ã«ã¹ã¯ãªããã§å®çŸ©ã§ããŸãã
ãRAMPDãããRAMPXãããRAMPYããããã³ãRAMPZãç¹æ®æ©èœã¬ãžã¹ã¿ã®åŠç
äžéšã®AVRããã€ã¹ã¯ãã¢ã¯ã»ã¹å¯èœãª64 @ tie{}KiBç¯å²ããã倧ããã¡ã¢ãªããµããŒãããŸã
16ããããã€ã³ã¿ä»ãã ãã®64@tie {} KiBã®ç¯å²å€ã®ã¡ã¢ãªäœçœ®ã«ã¢ã¯ã»ã¹ããã«ã¯ã
ãRAMPãã¬ãžã¹ã¿ã®å 容ã¯ãã¢ãã¬ã¹ã®äžäœéšåãšããŠäœ¿çšãããŸãïŒãXãããYãããZã
ã¢ãã¬ã¹ã¬ãžã¹ã¿ã¯ããRAMPXãããRAMPYãããRAMPZãç¹æ®æ©èœãšé£çµãããŠããŸãã
ã¯ã€ãã¢ãã¬ã¹ãååŸããã«ã¯ãããããç»é²ããŸãã åæ§ã«ããRAMPDãã¯
çŽæ¥ã¢ãã¬ã¹æå®ã
· ã¹ã¿ãŒãã¢ãã ã³ãŒãã¯ããRAMPãç¹æ®æ©èœã¬ãžã¹ã¿ããŒãã§åæåããŸãã
ã» ãã AVR ååä»ã äœæ ã¹ããŒã¹ãååä»ã äœæ ã¹ããŒã¹ ãžã§ããªãã¯ãŸãã¯ã__flashã以å€ã¯
䜿çšãããšãæäœåã«å¿ èŠã«å¿ããŠãRAMPZããèšå®ãããŸãã
· ããã€ã¹ã 64@tie{}KiB ãè¶ ãã RAM ããµããŒãããŠããŠãã³ã³ãã€ã©ãå€æŽããå¿ èŠãããå Žå
ãRAMPZãã¯æäœãå®è¡ãããRAMPZãã¯æäœåŸã«ãŒãã«ãªã»ãããããŸãã
· ããã€ã¹ã«ç¹å®ã®ãRAMPãã¬ãžã¹ã¿ãä»å±ããŠããå ŽåãISR ããããŒã°/ãšãããŒã°
ãã®SFRãä¿å/埩å ããISRã³ãŒããçºçããå¯èœæ§ãããå Žåã«åããŠãŒãã§åæåããŸãã
ïŒæé»çã«ïŒããã䜿çšããŸãã
· 64@tie{}KiB ãè¶ ãã RAM ã¯ãAVR ã¿ãŒã²ããã® GCC ã§ã¯ãµããŒããããŠããŸããã 䜿çšããå Žå
16ãããã¢ãã¬ã¹ç¯å²å€ã®å Žæããèªã¿åããå€æŽããã€ã³ã©ã€ã³ã¢ã»ã³ãã©
ãRAMPãã¬ãžã¹ã¿ã®XNUMXã€ã§ãããããã¢ã¯ã»ã¹åŸã«ãŒãã«ãªã»ããããå¿ èŠããããŸãã
AVRãã«ãã€ã³ãã¯ã
GCCã¯ããŠãŒã¶ãŒã³ãŒããååšããã¹ãã§ããããã«ãããã€ãã®çµã¿èŸŒã¿ãã¯ããå®çŸ©ããŸãã
æ©èœã®æ¬ åŠã 次ã®çµã¿èŸŒã¿ãã¯ãã®ã»ãšãã©ãã¹ãŠãããã€ã¹ããæšå®ãããŸã
ãããã£ãŠãã-mmcu=ãã³ãã³ãã©ã€ã³ ãªãã·ã§ã³ã«ãã£ãŠããªã¬ãŒãããŸãã
ããã«å€ãã®AVRåºæã®çµã¿èŸŒã¿ãã¯ãã«ã€ããŠã¯ããåç §ããŠãã ããã AVR ååä»ã äœæ ã¹ããŒã¹ ãš AVR å èµ
æ©èœ.
ã__AVR_ARCH__ã
ã¢ãŒããã¯ãã£ãèå¥ããXNUMXé²æ°ã«è§£æ±ºãããçµã¿èŸŒã¿ãã¯ããš
"-mmcu=mcuã ãªãã·ã§ã³ã å¯èœãªå€ã¯æ¬¡ã®ãšããã§ãã
2ã25ã3ã31ã35ã4ã5ã51ã6ã102ã104ã105ã106ã107
for MCU= "avr2"ã "avr25"ã "avr3"ã "avr31"ã "avr35"ã "avr4"ã "avr5"ã "avr51"ã "avr6"ã
ãããããavrxmega2ãããavrxmega4ãããavrxmega5ãããavrxmega6ãããavrxmega7ãã ããã MCU
ããã€ã¹ãæå®ãããšããã®çµã¿èŸŒã¿ãã¯ããããã«å¿ããŠèšå®ãããŸãã ããšãã°ã
"-mmcu=atmega8" ãã¯ã㯠4 ã«å®çŸ©ãããŸãã
"__AVR_ããã€ã¹__"
ã-mmcu=ãã®èšå®ããã€ã¹" ããã€ã¹ã®ååãåæ ãããã®çµã¿èŸŒã¿ãã¯ããå®çŸ©ããŸãã
ããšãã°ã"-mmcu=atmega8" ã¯çµã¿èŸŒã¿ãã¯ã "__AVR_ATmega8__" ãå®çŸ©ããŸãã
ã-mmcu=attiny261aãã¯ã__AVR_ATtiny261A__ããªã©ãå®çŸ©ããŸãã
çµã¿èŸŒã¿ãã¯ãã®ååã¯ãã¹ããŒã ã__AVR_ãã«åŸããŸããããã€ã¹__" ã³ã©ãã¬ãŒ ããã€ã¹ ã¯
AVRãŠãŒã¶ãŒããã¥ã¢ã«ããã®ããã€ã¹åã ã®éã ããã€ã¹ ãã«ãã€ã³ã§
ãã¯ããš ããã€ã¹ ã-mmcu=ãã§ããã€ã¹" åŸè ã¯åžžã«å°æåã§ãããšããããšã§ãã
If ããã€ã¹ ããã€ã¹ã§ã¯ãªãããavr51ãã®ãããªã³ã¢ ã¢ãŒããã¯ãã£ã«ãããªãå Žåããã®ãã¯ãã¯
å®çŸ©ãããŸããã
ã__AVR_XMEGA__ã
ããã€ã¹/ã¢ãŒããã¯ãã£ã¯ãXMEGAãã¡ããªã®ããã€ã¹ã«å±ããŠããŸãã
ã__AVR_HAVE_ELPM__ã
ããã€ã¹ã«ã¯ãELPMãåœä»€ããããŸãã
"__AVR_HAVE_ELPMX__"
ããã€ã¹ã«ã¯ãELPMRnãZã ããã³ãELPMRnãZ + " æ瀺ã«åŸã£ãŠãã ããã
ã__AVR_HAVE_MOVW__ã
ããã€ã¹ã«ã¯ã16ãããã®ã¬ãžã¹ã¿-ã¬ãžã¹ã¿ç§»åãå®è¡ããããã®ãMOVWãåœä»€ããããŸãã
ã__AVR_HAVE_LPMX__ã
ããã€ã¹ã«ã¯ãLPMRnãZã ããã³ãLPMRnãZ + " æ瀺ã«åŸã£ãŠãã ããã
ã__AVR_HAVE_MUL__ã
ããã€ã¹ã«ã¯ããŒããŠã§ã¢ä¹ç®åšããããŸãã
"__AVR_HAVE_JMP_CALL__"
ããã€ã¹ã«ã¯ãJMPãããã³ãCALLãåœä»€ããããŸãã ããã¯ã
ããã°ã©ã ã¡ã¢ãªã®å°ãªããšã16@tie{}KiBã
"__AVR_HAVE_EIJMP_EICALL__"
ã__AVR_3_BYTE_PC__ã
ããã€ã¹ã«ã¯ãEIJMPãããã³ãEICALLãåœä»€ããããŸãã ããã¯ããã€ã¹ã®å Žåã§ã
128 @ tie{}KiBãè¶ ããããã°ã©ã ã¡ã¢ãªãåããŠããŸãã ããã¯ãŸããããã°ã©ã ã
ã«ãŠã³ã¿ãŒïŒPCïŒã®å¹ ã¯3 @tie{}ãã€ãã§ãã
ã__AVR_2_BYTE_PC__ã
ããã°ã©ã ã«ãŠã³ã¿ãŒïŒPCïŒã®å¹ ã¯2 @tie{}ãã€ãã§ãã ããã¯ãæ倧ã§
ããã°ã©ã ã¡ã¢ãªã®128@tie{}KiBã
"__AVR_HAVE_8BIT_SP__"
"__AVR_HAVE_16BIT_SP__"
ã¹ã¿ãã¯ãã€ã³ã¿ïŒSPïŒã¬ãžã¹ã¿ã¯ãã«ãã£ãŠ8ããããŸãã¯16ãããã¬ãžã¹ã¿ãšããŠæ±ãããŸãã
ã³ã³ãã€ã©ã ãããã®ãã¯ãã®å®çŸ©ã¯ãã-mtiny-stackãã®åœ±é¿ãåããŸãã
ã__AVR_HAVE_SPH__ã
ã__AVR_SP8__ã
ããã€ã¹ã«SPHïŒã¹ã¿ãã¯ãã€ã³ã¿ã®äžäœéšåïŒç¹æ®æ©èœã¬ãžã¹ã¿ããããã
ãããã8ãããã®ã¹ã¿ãã¯ãã€ã³ã¿ã ãããã®ãã¯ãã®å®çŸ©ã¯ã
"-mmcu=" ãš "-mmcu=avr2" ããã³ "-mmcu=avr25" ã®å Žå㯠"-msp8" ã«ãã£ãŠãã
ã__AVR_HAVE_RAMPD__ã
ã__AVR_HAVE_RAMPX__ã
ã__AVR_HAVE_RAMPY__ã
"__AVR_HAVE_RAMPZ__"
ããã€ã¹ã«ã¯ããRAMPDãããRAMPXãããRAMPYãããRAMPZãç¹æ®æ©èœã¬ãžã¹ã¿ãããã
ã
"__NO_INTERRUPTS__"
ãã®ãã¯ãã¯ãã-mno-interruptsãã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ãåæ ããŠããŸãã
ã__AVR_ERRATA_SKIP__ã
"__AVR_ERRATA_SKIP_JMP_CALL__"
äžéšã®AVRããã€ã¹ïŒAT90S8515ãATmega103ïŒã¯ã次ã®çç±ã§32ãããåœä»€ãã¹ãããããŠã¯ãªããŸããã
ããŒããŠã§ã¢ã®æ£èª€è¡šã ã¹ãããæé ã¯ããSBRSãããSBRCãããSBISãããSBICãããCPSEãã§ãã
XNUMXçªç®ã®ãã¯ãã¯ãã__AVR_HAVE_JMP_CALL__ããèšå®ãããŠããå Žåã«ã®ã¿å®çŸ©ãããŸãã
ã__AVR_ISA_RMW__ã
ããã€ã¹ã«ã¯ããªãŒãã¢ãã£ãã¡ã€ã©ã€ãåœä»€ïŒXCHãLACãLASãããã³LATïŒããããŸãã
"__AVR_SFR_OFFSET __ =ãªãã»ãã"
ãINãã®ããã«I/Oç¹æ®æ©èœã¬ãžã¹ã¿ãçŽæ¥ã¢ãã¬ã¹æå®ã§ããåœä»€ã
ãOUTãããSBIããªã©ã¯ã次ã®åœä»€ã§ã¢ãã¬ã¹æå®ãããŠãããã®ããã«ãç°ãªãã¢ãã¬ã¹ã䜿çšããå ŽåããããŸãã
ãLDãããSTSããªã©ã®RAMã«ã¢ã¯ã»ã¹ããŸãã ãã®ãªãã»ããã¯ããã€ã¹ã¢ãŒããã¯ãã£ã«äŸåãã
ããããã®I/O @ tie {}ã¢ãã¬ã¹ãååŸããããã«ãRAMã¢ãã¬ã¹ããæžç®ãããŸãã
"__WITH_AVRLIBC__"
ã³ã³ãã€ã©ã¯ãAVR-Libcãšäžç·ã«äœ¿çšããããã«æ§æãããŠããŸãã ãåç §ããŠãã ãã
ã--with-avrlibcãæ§æãªãã·ã§ã³ã
ãã©ãã¯ãã£ã³ ãªãã·ã§ã³
-mcpu =CPU[-ã·ã¬ããžã§ã³]
ã¿ãŒã²ããBlackfinããã»ããµã®ååãæå®ããŸãã çŸåšã CPU ã®XNUMXã€ã«ãªãããšãã§ããŸã
bf512, bf514, bf516, bf518, bf522, bf523, bf524, bf525, bf526, bf527, bf531, bf532,
bf533, bf534, bf536, bf537, bf538, bf539, bf542, bf544, bf547, bf548, bf549, BF542M,
BF544M, BF547M, BF548M, BF549M, bf561, bf592.
ãªãã·ã§ã³ ã·ã¬ããžã§ã³ ã¿ãŒã²ããBlackfinã®ã·ãªã³ã³ãªããžã§ã³ãæå®ããŸã
ããã»ããµã 察象ãšãªãã·ãªã³ã³ãªããžã§ã³ã§å©çšå¯èœãªåé¿çã¯ãã¹ãŠæå¹ã«ãªã£ãŠããŸãã
If ã·ã¬ããžã§ã³ is ãªããåé¿çã¯æå¹ã«ãªã£ãŠããŸããã ããã ã·ã¬ããžã§ã³ is ã©ããããã¹ãŠã®
ã¿ãŒã²ããããã»ããµã®åé¿çãæå¹ã«ãªã£ãŠããŸãã ã__SILICON_REVISION__ããã¯ã
ã¯ãã®ã¡ãžã£ãŒçªå·ãšãã€ããŒçªå·ãè¡šãXNUMXã€ã®XNUMXé²æ°ã«å®çŸ©ãããŸãã
ã·ãªã³ã³ãªããžã§ã³ã ããã ã·ã¬ããžã§ã³ is ãªããã__SILICON_REVISION__ããå®çŸ©ãããŠããŸããã
If ã·ã¬ããžã§ã³ is ã©ãããã__SILICON_REVISION__ãã¯0xffffãšããŠå®çŸ©ãããŠããŸãã ãããªã
ä»»æ ã·ã¬ããžã§ã³ ã䜿çšãããŠããªãå ŽåãGCCã¯ææ°ã®æ¢ç¥ã®ã·ãªã³ã³ãªããžã§ã³ãæ³å®ããŠããŸãã
ã¿ãŒã²ãããçµã£ãBlackfinããã»ããµã
GCCã¯ãæå®ãããããªããã»ããµãã¯ããå®çŸ©ããŸã CPUã ã®ããã« bfinãšã«ã ããŒã«ãã§ãŒã³ã
ãã®ãªãã·ã§ã³ã«ãããlibglossã«ãã£ãŠæäŸãããããŒããŠã§ã¢BSPããªã³ã¯ãããŸãã -msim is
äžããããŠããŸããã
ãã®ãªãã·ã§ã³ããªãå Žåã bf532 ããã©ã«ãã§ã¯ããã»ããµãšããŠäœ¿çšãããŸãã
ã®ãµããŒãã«æ³šæããŠãã ãã bf561 äžå®å šã§ãã çºã« bf561ãããªããã»ããµãã¯ãã®ã¿ã
å®çŸ©ãããã
-msim
ããã°ã©ã ãã·ãã¥ã¬ãŒã¿ãŒã§å®è¡ãããããšãæå®ããŸãã ããã«ãããã·ãã¥ã¬ãŒã¿ãçºçããŸã
ãªã³ã¯ããlibglossã«ãã£ãŠæäŸãããBSPããã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿æå¹ã§ãã bfinãšã«ã
ããŒã«ãã§ãŒã³ã ã®ãããªç¹å®ã®ä»ã®ãªãã·ã§ã³ -mid-å ±æã©ã€ãã©ãª ãš -mfdpicã æå³ãã
-msim.
-momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
ãªãŒãé¢æ°ã®ã¬ãžã¹ã¿ã«ãã¬ãŒã ãã€ã³ã¿ãä¿æããªãã§ãã ããã ããã«ããã
ãã¬ãŒã ãã€ã³ã¿ãä¿åãèšå®ã埩å ããè¿œå ã®ã¬ãžã¹ã¿ãäœæããæé
ãªãŒãæ©èœã§å©çšã§ããŸãã ãªãã·ã§ã³ -fomit-ãã¬ãŒã ãã€ã³ã¿ãŒ ãã¬ãŒã ãåé€ããŸã
ãã¹ãŠã®é¢æ°ãžã®ãã€ã³ã¿ããããã°ãé£ãããªãå¯èœæ§ããããŸãã
-mspecld-ç°åžž
æå¹ã«ãããšãã³ã³ãã€ã©ã¯çæãããã³ãŒãã«ãå«ãŸããŠããªãããšã確èªããŸã
ãžã£ã³ãåœä»€åŸã®ææ©çããŒãã ãã®ãªãã·ã§ã³ã䜿çšããå Žåã
ã__WORKAROUND_SPECULATIVE_LOADSããå®çŸ©ãããŠããŸãã
-mno-specld-ç°åžž
ææ©çãªè² è·ã®çºçãé²ãããã«äœåãªã³ãŒããçæããªãã§ãã ããã
-mcsync-ç°åžž
æå¹ã«ãããšãã³ã³ãã€ã©ãŒã¯ãçæãããã³ãŒãã«CSYNCãŸãã¯
æ¡ä»¶ä»ãåå²åŸã®SSYNCåœä»€ãæ©ãããŸãã ãã®ãªãã·ã§ã³ã䜿çšããå Žåã
ã__WORKAROUND_SPECULATIVE_SYNCSããå®çŸ©ãããŠããŸãã
-mno-csync-ç°åžž
CSYNCãŸãã¯SSYNCåœä»€ã®çºçãé²ãããã«äœåãªã³ãŒããçæããªãã§ãã ãã
æ¡ä»¶åå²ã®çŽåŸã
-mlow-64k
æå¹ã«ãããšãã³ã³ãã€ã©ã¯ãå šäœã
ããã°ã©ã ã¯ã¡ã¢ãªã®äœã64kã«åãŸããŸãã
-mno-low-64k
ããã°ã©ã ãä»»æã«å€§ãããšä»®å®ããŸãã ãããããã©ã«ãã§ãã
-mstack-check-l1
uClinuxã«ãã£ãŠL1ã¹ã¯ã©ãããããã¡ã¢ãªã«é 眮ãããæ å ±ã䜿çšããŠã¹ã¿ãã¯ãã§ãã¯ãå®è¡ããŸã
ã«ãŒãã«ã
-mid-å ±æã©ã€ãã©ãª
ã©ã€ãã©ãªIDã¡ãœãããä»ããŠå ±æã©ã€ãã©ãªããµããŒãããã³ãŒããçæããŸãã ããã«ããã
ä»®æ³ã¡ã¢ãªã®ãªãç°å¢ã§ã€ã³ãã¬ãŒã¹ããã³å ±æã©ã€ãã©ãªãå®è¡ããå Žå
管çã ãã®ãªãã·ã§ã³ã¯ã -fPICã ãšãšãã« bfinãšã«ã ã¿ãŒã²ããããã®ãªãã·ã§ã³ã¯
-msim.
-mno-id-å ±æã©ã€ãã©ãª
IDããŒã¹ã®å ±æã©ã€ãã©ãªã䜿çšãããŠãããšæ³å®ããªãã³ãŒããçæããŸãã ããã¯
ããã©ã«ãã
-mleaf-id-å ±æã©ã€ãã©ãª
ã©ã€ãã©ãªIDã¡ãœãããä»ããŠå ±æã©ã€ãã©ãªããµããŒãããã³ãŒããçæããŸããã
ãã®ã©ã€ãã©ãªãŸãã¯å®è¡å¯èœãã¡ã€ã«ã¯ãä»ã®IDå ±æã©ã€ãã©ãªã«å¯ŸããŠãªã³ã¯ããŸããã
ããã«ãããã³ã³ãã€ã©ãŒã¯ãžã£ã³ããšåŒã³åºãã«é«éãªã³ãŒãã䜿çšã§ããŸãã
-mno-leaf-id-å ±æã©ã€ãã©ãª
ã³ã³ãã€ã«äžã®ã³ãŒããIDå ±æã©ã€ãã©ãªã«ãªã³ã¯ããªããšæ³å®ããªãã§ãã ããã
ãžã£ã³ãããã³åŒã³åºãinsnsçšã«äœéã®ã³ãŒããçæãããŸãã
-mshared-library-id = n
ã³ã³ãã€ã«ãããIDããŒã¹ã®å ±æã©ã€ãã©ãªã®èå¥çªå·ãæå®ããŸãã
å€0ãæå®ãããšãããã³ã³ãã¯ããªã³ãŒããçæãããŸãã ä»ã®å€ãæå®ãããšã
ãã®çªå·ã®çŸåšã®ã©ã€ãã©ãªãžã®å²ãåœãŠã§ããããã以äžã®ã¹ããŒã¹ãæéã¯ãããŸãã-
ãã®ãªãã·ã§ã³ãçç¥ãããããå¹ççã§ãã
-msep-ããŒã¿
ããŒã¿ã»ã°ã¡ã³ããã¡ã¢ãªã®å¥ã®é åã«é 眮ã§ããããã«ããã³ãŒããçæãã
ããã¹ãã»ã°ã¡ã³ãããã ããã«ããã次ã®ãããªç°å¢ã§ã®å®è¡ãå¯èœã«ãªããŸãã
ããã¹ãã»ã¯ã·ã§ã³ã«å¯Ÿããåé 眮ãæé€ããããšã«ããä»®æ³ã¡ã¢ãªç®¡çã
-mno-sep-ããŒã¿
ããŒã¿ã»ã°ã¡ã³ããããã¹ãã»ã°ã¡ã³ãã®åŸã«ç¶ããšæ³å®ããã³ãŒããçæããŸãã ããã¯
ããã©ã«ãã
-mlong-calls
-mno-long-calls
æåã«ã®ã¢ãã¬ã¹ãããŒãããããšã«ãããé¢æ°åŒã³åºããå®è¡ããããã«ã³ã³ãã€ã©ãŒã«æ瀺ããŸãã
é¢æ°ãã¬ãžã¹ã¿ã«å ¥ããŠããããã®ã¬ãžã¹ã¿ã§ãµãã«ãŒãã³åŒã³åºããå®è¡ããŸãã ãã
ã¿ãŒã²ããæ©èœãã®24ãããã¢ãã¬ã¹æå®ç¯å²å€ã«ããå Žåã¯ãã¹ã€ãããå¿ èŠã§ãã
ãµãã«ãŒãã³åŒã³åºãåœä»€ã®ãªãã»ããããŒã¹ã®ããŒãžã§ã³ã
ãã®æ©èœã¯ããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠããŸããã æå®ãã -mno-long-calls ãããã埩å ãã
ããã©ã«ãã®åäœã ãããã®ã¹ã€ããã¯ãã³ã³ãã€ã©ãçæããæ¹æ³ã«åœ±é¿ãäžããªãããšã«æ³šæããŠãã ãã
é¢æ°ãã€ã³ã¿ãä»ããŠé¢æ°åŒã³åºããåŠçããã³ãŒãã
-mfast-fp
é«éæµ®åå°æ°ç¹ã©ã€ãã©ãªãšãªã³ã¯ããŸãã ãã®ã©ã€ãã©ãªã¯ãIEEEã®äžéšãç·©åããŸã
Not-a-NumberïŒNANïŒã«å¯ŸããŠå ¥åããã§ãã¯ããããã®æµ®åå°æ°ç¹æšæºã®ã«ãŒã«
ããã©ãŒãã³ã¹ãžã®é¢å¿ã
-minline-plt
ç¥ãããŠããªãé¢æ°ãžã®é¢æ°åŒã³åºãã§PLTãšã³ããªã®ã€ã³ã©ã€ã³åãæå¹ã«ãã
ããŒã«ã«ã«ãã€ã³ãããŸãã ãªãã§ã¯å¹æããããŸãã -mfdpic.
-ãã«ãã³ã¢
ãã«ãã³ã¢Blackfinããã»ããµçšã®ã¹ã¿ã³ãã¢ãã³ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŸãã ãã®ãªãã·ã§ã³ã«ããã
䜿çšãããã«ãã³ã¢ããµããŒãããé©åãªéå§ãã¡ã€ã«ãšãªã³ã¯ã¹ã¯ãªãããããã³
ãã¯ãã__BFIN_MULTICOREãã ã§ã®ã¿äœ¿çšã§ããŸã -mcpu = bf561[-ã·ã¬ããžã§ã³].
ãã®ãªãã·ã§ã³ã¯ã -mcorea or -ãã³ã¬ããXNUMXã€ã®ã¢ããªã±ãŒã·ã§ã³ãéžæããŸã-
ã³ã¢ããšã®ããã°ã©ãã³ã°ã¢ãã«ã ãããªã -mcorea or -ãã³ã¬ã
ã·ã³ã°ã«ã¢ããªã±ãŒã·ã§ã³/ãã¥ã¢ã«ã³ã¢ããã°ã©ãã³ã°ã¢ãã«ã䜿çšãããŸãã ãã®ã¢ãã«ã§ã¯ãã¡ã€ã³
ã³ã¢Bã®é¢æ°ã¯ãcoreb_mainããšããååã«ããå¿ èŠããããŸãã
ãã®ãªãã·ã§ã³ã䜿çšããªãå Žåã¯ãã·ã³ã°ã«ã³ã¢ã¢ããªã±ãŒã·ã§ã³ããã°ã©ãã³ã°ã¢ãã«ã䜿çšãããŸãã
-mcorea
561ã€ã®ã¢ããªã±ãŒã·ã§ã³ããšã«XNUMXã€ã®ã¢ããªã±ãŒã·ã§ã³ã䜿çšããå Žåã¯ãBFXNUMXã®ã³ã¢Açšã®ã¹ã¿ã³ãã¢ãã³ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŸãã
ã³ã¢ããã°ã©ãã³ã°ã¢ãã«ã CoreããµããŒãããããã«ãé©åãªéå§ãã¡ã€ã«ãšãªã³ã¯ã¹ã¯ãªããã䜿çšãããŸã
Aããã¯ãã__BFIN_COREAããå®çŸ©ãããŠããŸãã ãã®ãªãã·ã§ã³ã¯ã§ã®ã¿äœ¿çšã§ããŸã
ãšçµã¿åãã㊠-ãã«ãã³ã¢.
-ãã³ã¬ã
561ã€ã®ã¢ããªã±ãŒã·ã§ã³ããšã«XNUMXã€ã®ã¢ããªã±ãŒã·ã§ã³ã䜿çšããå Žåã¯ãBFXNUMXã®ã³ã¢Bçšã®ã¹ã¿ã³ãã¢ãã³ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŸãã
ã³ã¢ããã°ã©ãã³ã°ã¢ãã«ã CoreããµããŒãããããã«ãé©åãªéå§ãã¡ã€ã«ãšãªã³ã¯ã¹ã¯ãªããã䜿çšãããŸã
Bãããã³ãã¯ãã__BFIN_COREBããå®çŸ©ãããŠããŸãã ãã®ãªãã·ã§ã³ã䜿çšããå Žåããcoreb_mainã
ãã¡ã€ã³ãã®ä»£ããã«äœ¿çšããå¿ èŠããããŸãã ãã®ãªãã·ã§ã³ã¯ããšçµã¿åãããŠã®ã¿äœ¿çšã§ããŸã
-ãã«ãã³ã¢.
-msdram
SDRAMçšã®ã¹ã¿ã³ãã¢ãã³ã¢ããªã±ãŒã·ã§ã³ãæ§ç¯ããŸãã é©åãªéå§ãã¡ã€ã«ãšãªã³ã¯ã¹ã¯ãªããã䜿çšãããŸã
ã¢ããªã±ãŒã·ã§ã³ãSDRAMã«é 眮ãããã¯ãã__BFIN_SDRAMããå®çŸ©ããŸãã The
ããŒããŒã¯ãã¢ããªã±ãŒã·ã§ã³ãããŒãããåã«SDRAMãåæåããå¿ èŠããããŸãã
-micplb
ICPLBãå®è¡æã«æå¹ã«ãªã£ãŠãããšæ³å®ããŸãã ããã¯ç¹å®ã®ç°åžžã«åœ±é¿ãåãŒããŸã
åé¿çã Linuxã¿ãŒã²ããã®å Žåãããã©ã«ãã§ã¯ICPLBãæå¹ã«ãªã£ãŠãããšæ³å®ããŠããŸãã çºã«
ã¹ã¿ã³ãã¢ãã³ã¢ããªã±ãŒã·ã§ã³ã®ããã©ã«ãã¯ãªãã§ãã
C6X ãªãã·ã§ã³
-XNUMXæ=å
ããã¯ãã¿ãŒã²ããã¢ãŒããã¯ãã£ã®ååãæå®ããŸãã GCCã¯ãã®ååã䜿çšããŠæ±ºå®ããŸã
ã¢ã»ã³ããªã³ãŒããçæãããšãã«çºè¡ã§ããåœä»€ã®çš®é¡ã 蚱容ããã
ååã¯æ¬¡ã®ãšããã§ãã c62x, c64x, c64x +, c67x, c67x +, c674x.
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã ãããããã©ã«ãã§ãã
-msim
ã·ãã¥ã¬ãŒã¿ã«é©ããã¹ã¿ãŒãã¢ãããã¡ã€ã«ãšãªã³ã«ã¹ã¯ãªãããéžæããŸãã
-msdata = default
å°ããªã°ããŒãã« ããŒã¿ãšéçããŒã¿ã .neardata ãæãã»ã¯ã·ã§ã³
ãB14ããç»é²ããŸãã åæåãããŠããªãå°ããªã°ããŒãã«ããã³éçããŒã¿ã .bss ã»ã¯ã·ã§ã³ã
ã«é£æ¥ããŠãã .neardata ã»ã¯ã·ã§ã³ã å°ããªèªã¿åãå°çšããŒã¿ã .rodata
ã»ã¯ã·ã§ã³ã 倧ããªããŒã¿ã«äœ¿çšããã察å¿ããã»ã¯ã·ã§ã³ã¯æ¬¡ã®ãšããã§ãã .fardata, ãé ã
ãš .const.
-msdata = all
å°ããªãªããžã§ã¯ãã ãã§ãªãããã¹ãŠã®ããŒã¿ãå°ããªããŒã¿çšã«äºçŽãããã»ã¯ã·ã§ã³ã«é 眮ãã
ãããã«ã¢ã¯ã»ã¹ããã«ã¯ããB14ãã¬ãžã¹ã¿ã«é¢é£ããã¢ãã¬ã¹æå®ã䜿çšããŸãã
-msdata = none
å°ããªããŒã¿çšã«äºçŽãããŠããã»ã¯ã·ã§ã³ã䜿çšããã絶察ã¢ãã¬ã¹ã䜿çšããŠ
ãã¹ãŠã®ããŒã¿ã«ã¢ã¯ã»ã¹ããŸãã åæåããããã¹ãŠã®ã°ããŒãã«ããã³éçããŒã¿ã .fardata ã»ã¯ã·ã§ã³ã
ããã³ãã¹ãŠã®åæåãããŠããªãããŒã¿ ãé ã ã»ã¯ã·ã§ã³ã ãã¹ãŠã®å®æ°ããŒã¿ã .const
ã®ã»ã¯ã·ã§ã³ããç¡æã§ããŠã³ããŒãã§ããŸãã
CRIS ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãCRISããŒãçšã«ç¹å¥ã«å®çŸ©ãããŠããŸãã
-XNUMXæ=ã¢ãŒããã¯ãã£ã¿ã€ã
-mcpu =ã¢ãŒããã¯ãã£ã¿ã€ã
æå®ãããã¢ãŒããã¯ãã£ã®ã³ãŒããçæããŸãã ã®éžæè¢ ã¢ãŒããã¯ãã£ã¿ã€ã ã
v3, v8 ãš v10 ããããETRAX4ãETRAX 100ãããã³ETRAX100LXçšã ããã©ã«ã㯠v0
cris-axis-linux-gnuãé€ããŠãããã©ã«ã㯠v10.
-mtune =ã¢ãŒããã¯ãã£ã¿ã€ã
ã«èª¿æŽãã ã¢ãŒããã¯ãã£ã¿ã€ã çæãããã³ãŒãã«è©²åœãããã¹ãŠã®ãã®ïŒãã ãã
ABIãšå©çšå¯èœãªäžé£ã®æ瀺ã ã®éžæè¢ ã¢ãŒããã¯ãã£ã¿ã€ã ã
ãšåã -XNUMXæ=ã¢ãŒããã¯ãã£ã¿ã€ã.
-mmax-stack-frame =n
é¢æ°ã®ã¹ã¿ãã¯ãã¬ãŒã ãè¶ éãããšãã«èŠåããŸã n ãã€ã
-metrax4
-metrax100
ãªãã·ã§ã³ -metrax4 ãš -metrax100 ã®å矩èªã§ã -march = v3 ãš -march = v8
ã
-mmul-ãã°-åé¿ç
-mno-mul-bug-åé¿ç
CPUã¢ãã«ã®ãmulsãããã³ãmuluãåœä»€ã®ãã°ãåé¿ããŸãã
é©çšãããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ã¢ã¯ãã£ãã«ãªã£ãŠããŸãã
-mpdebug
ã¢ã»ã³ããªã³ãŒãã§CRISåºæã®è©³çŽ°ãªãããã°é¢é£æ å ±ãæå¹ã«ããŸãã ãã
ãªãã·ã§ã³ã«ã¯ãããªãã«ããå¹æããããŸã #NO_APP ãã©ãŒããããããã³ãŒãã€ã³ãžã±ãŒã¿ãŒ
ã¢ã»ã³ããªãã¡ã€ã«ã®å é ã«ããã¢ã»ã³ãã©ã
-mcc-init
åã®åœä»€ããã®æ¡ä»¶ã³ãŒãã®çµæã䜿çšããªãã§ãã ããã åžžã«æ¯èŒãçºè¡ãã
æ¡ä»¶ã³ãŒãã䜿çšããåã«ãæ瀺ããã¹ãããŠãã ããã
-mno-å¯äœçš
ãã¹ãã¢ãã¬ãã·ã³ã°ã¢ãŒã以å€ã®ã¢ãã¬ãã·ã³ã°ã¢ãŒãã§ã¯ãå¯äœçšã®ããåœä»€ãåºåããªãã§ãã ããã
ã€ã³ã¯ãªã¡ã³ãã
-mstack-align
-mno-stack-align
-mdata-align
-mno-data-align
-mconst-align
-mno-const-align
ãããã®ãªãã·ã§ã³ïŒNO- ãªãã·ã§ã³ïŒã¹ã¿ãã¯ãã¬ãŒã ã®é 眮ïŒé 眮ã®åé€ïŒã
åäžããŒã¿ã¢ã¯ã»ã¹ã®æ倧ãµã€ãºã«åãããŠèª¿æŽãããåã ã®ããŒã¿ãšå®æ°
éžæããCPUã¢ãã«çšã ããã©ã«ãã§ã¯ã32ãããã¢ã©ã€ã¡ã³ãã調æŽããŸãã ABI
æ§é ã¬ã€ã¢ãŠããªã©ã®è©³çŽ°ã¯ããããã®ãªãã·ã§ã³ã®åœ±é¿ãåããŸããã
-m32ããã
-m16ããã
-m8ããã
äžèšã®stack-data-ããã³const-alignãªãã·ã§ã³ãšåæ§ã«ããããã®ãªãã·ã§ã³ã¯
ã¹ã¿ãã¯ãã¬ãŒã ãæžã蟌ã¿å¯èœãªããŒã¿ãããã³å®æ°ã¯ãã¹ãŠ32ãããã16ãããããŸãã¯8ãããã§æŽåãããŸãã
ããã©ã«ãã¯32ãããã¢ã©ã€ã¡ã³ãã§ãã
-mno-ããããŒã°-ãšãããŒã°
-mprologue-ãšãããŒã°
é£çµ¡å -mno-ããããŒã°-ãšãããŒã°ãèšå®ããéåžžã®é¢æ°ããããŒã°ãšãšãããŒã°
ã¹ã¿ãã¯ãã¬ãŒã ã¯çç¥ããããªã¿ãŒã³åœä»€ãŸãã¯ãªã¿ãŒã³ã·ãŒã±ã³ã¹ã¯çç¥ãããŸãã
ã³ãŒãã§çæãããŸãã ãã®ãªãã·ã§ã³ã¯ãç®èŠæ€æ»ãšäžç·ã«ã®ã¿äœ¿çšããŠãã ããã
ã³ã³ãã€ã«ãããã³ãŒãïŒåŒã³åºãä¿åãããã¬ãžã¹ã¿ãŒãå¿ èŠãªå ŽåãèŠåããšã©ãŒã¯çæãããŸãã
ä¿åããããããŒã«ã«å€æ°ã®ã¹ãã¬ãŒãžãå²ãåœãŠãå¿ èŠããããŸãã
-mno-gotplt
-mgotplt
é£çµ¡å -fpic ãš -fPICãããŒãããåœä»€ã·ãŒã±ã³ã¹ãçæããªãïŒçæããªãïŒ
ïŒä»ã®åŸæ¥ã®ïŒã§ã¯ãªããGOTã®PLTéšåããã®é¢æ°ã®ã¢ãã¬ã¹
ã¢ãŒããã¯ãã£ïŒPLTãžã®åŒã³åºãã ããã©ã«ã㯠-mgotplt.
-ã¡ã«ã
cris-axis-elfããã³cris-axis-linux-gnuã§ã®ã¿èªèãããã¬ã¬ã·ãŒno-opãªãã·ã§ã³
ã¿ãŒã²ããã
-mlinux
åŸæ¥ã®no-opãªãã·ã§ã³ã¯ãcris-axis-linux-gnuã¿ãŒã²ããã§ã®ã¿èªèãããŸãã
-ã·ã
ãã®ãªãã·ã§ã³ã¯ãcris-axis-elfã§èªèãããå ¥åºåãšãªã³ã¯ããããã«èª¿æŽãããŸãã
ã·ãã¥ã¬ãŒã¿ã©ã€ãã©ãªã®é¢æ°ã ã³ãŒããåæåãããããŒã¿ãããã³ãŒãã§åæåãããããŒã¿
é£ç¶ããŠå²ãåœãŠãããŸãã
-sim2
ããã -ã·ã ããã ãããªã³ã«ãŒãªãã·ã§ã³ãæž¡ããŠãåæåãããããŒã¿ã0x40000000ããã³ãŒãã«é 眮ããŸã-
0x80000000ã§ããŒã¿ãåæåããŸããã
CR16 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãCR16ããŒãçšã«ç¹å¥ã«å®çŸ©ãããŠããŸãã
-mmac
ç©ååœä»€ã®äœ¿çšãæå¹ã«ããŸãã ããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ãŠããŸãã
-mcr16cplus
-mcr16c
CR16CãŸãã¯CR16C+ã¢ãŒããã¯ãã£ã®ã³ãŒããçæããŸãã CR16C+ã¢ãŒããã¯ãã£ãããã©ã«ãã§ãã
-msim
ã·ãã¥ã¬ãŒã¿ãšäºææ§ã®ããã©ã€ãã©ãªlibsim.aããªã³ã¯ããŸãã ELFã«é©çšå¯èœ
ã³ã³ãã€ã©ã®ã¿ã
-ãã³ã32
æŽæ°åã32ãããå¹ ãšããŠéžæããŸãã
-mbit-ops
ãããæäœçšã®ãsbitã/ãcbitãåœä»€ãçæããŸãã
-mdata-model =
ããŒã¿ã¢ãã«ãéžæããŸãã ã®éžæè¢ ã è¿ã, é ã or ããã£ã¢ã . ããã£ã¢ã ããã©ã«ãã§ãã
ããããªããã é ã ã§ç¡å¹ã§ã -mcr16cãCR16Cã¢ãŒããã¯ãã£ã¯ã
é ãããŒã¿ã¢ãã«ã
ããŒãŠã£ã³ ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãDarwinãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãå®è¡ããŠãããã¹ãŠã®ã¢ãŒããã¯ãã£ã«å¯ŸããŠå®çŸ©ãããŠããŸãã
Darwinã®FSFGCCã¯ãããã¡ããããªããžã§ã¯ããã¡ã€ã«ãäœæããŸããã ã®ãªããžã§ã¯ããã¡ã€ã«ãäœæããŸã
GCCãã¿ãŒã²ãããšããŠæ§ç¯ãããåäžã®ã¢ãŒããã¯ãã£ã ããŒãŠã£ã³ã®Appleã®GCCã¯ã倪ã£ãããã®ãäœæããŸã
è€æ°ã®å Žåã¯ãã¡ã€ã« -ã¢ãŒã ãªãã·ã§ã³ã䜿çšãããŸãã ããã¯ãã³ã³ãã€ã©ãŸãã¯ãªã³ã«ãå®è¡ããããšã«ãã£ãŠè¡ãããŸãã
è€æ°åãçµæãäžç·ã«çµåããŸã ãªã.
äœæããããã¡ã€ã«ã®ãµãã¿ã€ãïŒ ppc7400 or ppc970 or i686ïŒã«ãã£ãŠæ±ºå®ãããŸã
GCCãã¿ãŒã²ããã«ããŠããISAãæå®ãããã©ã°ã -mcpu or -è¡é²ãéžæããŸãã
-force_cpusubtype_ALL ãªãã·ã§ã³ã䜿çšããŠããããªãŒããŒã©ã€ãã§ããŸãã
ããŒãŠã£ã³ããŒã«ã¯ãISAã®äžäžèŽãæ瀺ãããå Žåã®åäœãç°ãªããŸãã The
ã¢ã»ã³ãã©ã asãã®ãµãã¿ã€ãã«æå¹ãªåœä»€ã®äœ¿çšã®ã¿ãèš±å¯ããŸã
çæããŠãããã¡ã€ã«ã§ããããã64ãããåœä»€ã ppc750 ãªããžã§ã¯ããã¡ã€ã«ã The
å ±æã©ã€ãã©ãªã®ãªã³ã«ãŒã / usr / bin / libtoolã倱æããèŠæ±ãããå Žåã¯ãšã©ãŒãåºåããŸã
å ¥åãã¡ã€ã«ãããå¶éã®å°ãªããµãã¿ã€ãã§å ±æã©ã€ãã©ãªãäœæããŸãïŒ
ã€ã³ã¹ã¿ã³ã¹ãå ¥ããããšããŠããŸã ppc970 ã®ãªããžã§ã¯ããã¡ã€ã« ppc7400 å³æžé€šïŒã ã®ãªã³ã«ãŒ
å®è¡å¯èœãã¡ã€ã«ã ldãå®è¡å¯èœãã¡ã€ã«ã«ãã®ããããã®æãå¶éçãªãµãã¿ã€ããéãã«äžããŸã
å ¥åãã¡ã€ã«ã
-FDIR
ãã¬ãŒã ã¯ãŒã¯ãã£ã¬ã¯ããªãè¿œå ããŸã DIR æ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ãã®å é ã«
ããããŒãã¡ã€ã«çšã ãããã®ãã£ã¬ã¯ããªã¯ãã«ãã£ãŠæå®ããããã£ã¬ã¯ããªãšã€ã³ã¿ãŒãªãŒããããŸã -I
ãªãã·ã§ã³ã§ãå·Šããå³ã®é åºã§ã¹ãã£ã³ãããŸãã
ãã¬ãŒã ã¯ãŒã¯ãã£ã¬ã¯ããªã¯ããã¬ãŒã ã¯ãŒã¯ãå«ããã£ã¬ã¯ããªã§ãã ãã¬ãŒã ã¯ãŒã¯ã¯
ã®ãããã£ã¬ã¯ã㪠ããã ããã³ ãã©ã€ããŒãããã㌠ãã®äžã«çŽæ¥å«ãŸããŠãããã£ã¬ã¯ããª
ã§çµãã ããã¬ãŒã ã¯ãŒã¯ã ãã¬ãŒã ã¯ãŒã¯ã®ååã¯ããã®ãã£ã¬ã¯ããªã®ååã§ãã
ã ããã¬ãŒã ã¯ãŒã¯ã ãã¬ãŒã ã¯ãŒã¯ã«é¢é£ä»ããããŠããããããŒã¯ããããXNUMXã€ã®ãã¡ã®XNUMXã€ã«ãããŸãã
ãã£ã¬ã¯ããªã ããã æåã«æ€çŽ¢ãããŸãã ãµããã¬ãŒã ã¯ãŒã¯ã¯ãã¬ãŒã ã¯ãŒã¯ã§ã
ãã¬ãŒã ã¯ãŒã¯å ã«ãããã£ã¬ã¯ã㪠ãã¬ãŒã ã¯ãŒã¯ ãã£ã¬ã¯ããªã ãµããã¬ãŒã ã¯ãŒã¯ãå«ã
ããããŒã¯ããµããã¬ãŒã ã¯ãŒã¯ãå«ããã¬ãŒã ã¯ãŒã¯ã®ããããŒã«ã®ã¿è¡šç€ºã§ããŸãã
å åŒãµããã¬ãŒã ã¯ãŒã¯ããããŒå ã XNUMXã€ã®ãµããã¬ãŒã ã¯ãŒã¯ã¯ã
åããã¬ãŒã ã¯ãŒã¯ã ãµããã¬ãŒã ã¯ãŒã¯ã¯ããã¬ãŒã ã¯ãŒã¯ãšåãååã§ãã£ãŠã¯ãªããŸããã a
ããã«éåããå ŽåãèŠåãçºè¡ãããŸãã çŸåšããµããã¬ãŒã ã¯ãŒã¯ã¯æã€ããšãã§ããŸãã
ãµããã¬ãŒã ã¯ãŒã¯; å°æ¥çã«ã¯ãããããµããŒãããããã«ã¡ã«ããºã ãæ¡åŒµãããå¯èœæ§ããããŸãã The
æšæºãã¬ãŒã ã¯ãŒã¯ã¯ã§èŠã€ããããšãã§ããŸã /ã·ã¹ãã /ã©ã€ãã©ãª/ãã¬ãŒã ã¯ãŒã¯ ãš
/ã©ã€ãã©ãª/ãã¬ãŒã ã¯ãŒã¯ã ã€ã³ã¯ã«ãŒãã®äŸã¯ã#include "ã
ã³ã©ãã¬ãŒ ãã¬ãŒã ã¯ãŒã¯ ãã¬ãŒã ã¯ãŒã¯ã®ååã瀺ãã header.h ã«ãããŸã
ãã©ã€ããŒãããã㌠or ããã ãã£ã¬ã¯ããªã«ãããŸãã
-iframeworkDIR
ããã -F ãã ãããã£ã¬ã¯ããªã¯ã·ã¹ãã ãã£ã¬ã¯ããªãšããŠæ±ãããŸãã äž»ãªéã
ãã®é -iframework ãš -F ãã㯠-iframework ã³ã³ãã€ã©ã¯èŠåããŸãã
çµç±ã§èŠã€ãã£ãããããŒãã¡ã€ã«ã«å«ãŸããæ§æã«ã€ã㊠DIRã ãã®ãªãã·ã§ã³ã¯æå¹ã§ã
Cãã¡ããªãŒã®èšèªã®ã¿ã
-çªã£èŸŒãã
䜿çšãããŠããã·ã³ãã«ã®ãããã°æ å ±ãåºåããŸãã ã¹ã¿ããããã°åœ¢åŒã®å Žåã
ããã«ããã -feliminate-æªäœ¿çšã®ãããã°ã·ã³ãã«ã ããã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
-gfull
ãã¹ãŠã®ã·ã³ãã«ãšã¿ã€ãã®ãããã°æ å ±ãåºåããŸãã
-mmacosx-version-min =ããŒãžã§ã³
ãã®å®è¡å¯èœãã¡ã€ã«ãå®è¡ãããMacOSXã®æãå€ãããŒãžã§ã³ã¯ ããŒãžã§ã³ã å žåçãª
ã®å€ ããŒãžã§ã³ 10.1ã10.2ãããã³10.3.9ãå«ã¿ãŸãã
ã³ã³ãã€ã©ãããã©ã«ãã§ã·ã¹ãã ã®ããããŒã䜿çšããããã«æ§ç¯ãããŠããå Žåãããã©ã«ãã§ã¯
ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ãå®è¡ãããŠããã·ã¹ãã ããŒãžã§ã³ã§ãããã以å€ã®å Žåã¯ã
ããã©ã«ãã§ã¯ãåãæ°ã®ã·ã¹ãã ããã³ã³ãŒãããŒã¹ãšäºææ§ã®ããéžæãè¡ããŸã
å¯èœã
-mkernel
ã«ãŒãã«éçºã¢ãŒããæå¹ã«ããŸãã The -mkernel ãªãã·ã§ã³ã»ãã -éç, -fno-common,
-fno-use-cxa-atexit, -fno-äŸå€, -fno-éåŒã³åºãäŸå€, -fapple-kext,
-fno-匱ã ãš -fno-rtti 該åœããå Žåã ãã®ã¢ãŒããèšå®ããŸã -mno-altivec,
-msoft-float, -fno-builtin ãš -mlong-æ PowerPCã¿ãŒã²ããã®å Žåã
-mone-byte-bool
ã®ããã©ã«ããäžæžãããŸã ããŒã« ãã®ããã sizeof(ããŒã«å€)==1ã ããã©ã«ãã§ã¯ sizeof(ããŒã«å€) is 4
Darwin/PowerPC çšã«ã³ã³ãã€ã«ããå Žåãš 1 Darwin/x86 çšã«ã³ã³ãã€ã«ããå Žåããã®ãªãã·ã§ã³
x86 ã«ã¯åœ±é¿ããŸããã
èŠåïŒ ãã® -mone-byte-bool ã¹ã€ããã䜿çšãããšãGCCã¯ãã€ããªã§ã¯ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ããããŸãã ãã®ã¹ã€ããã䜿çšããã«ã¯ã
ã·ã¹ãã ã©ã€ãã©ãªãå«ããããã°ã©ã å ã®ä»ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ãåã³ã³ãã€ã«ããŸãã ããã䜿ã£ãŠ
ããã©ã«ã以å€ã®ããŒã¿ã¢ãã«ã«æºæ ããããã«åãæ¿ããŸãã
-mfix ãšç¶ç¶
-ä¿®æ£ããŠç¶è¡
-findirect-ããŒã¿
GDBã«æ¬¡ã®ããšãèš±å¯ãããªã©ãè¿ éãªã¿ãŒã³ã¢ã©ãŠã³ãéçºã«é©ããã³ãŒããçæããŸã
".o" ãã¡ã€ã«ãå®è¡äžã®ããã°ã©ã ã«åçã«ããŒãããŸãã -findirect-ããŒã¿ ãš
-ä¿®æ£ããŠç¶è¡ äžäœäºææ§ã®ããã«æäŸãããŠããŸãã
-all_load
éçã¢ãŒã«ã€ãã©ã€ãã©ãªã®ãã¹ãŠã®ã¡ã³ããŒãããŒãããŸãã ç·ãåç §ããŠãã ãã ldïŒ1ïŒè©³çŽ°ã«ã€ããŠã¯ã
-arch_errors_fatal
ééã£ãã¢ãŒããã¯ãã£ãæã€ãã¡ã€ã«ã«é¢ä¿ãããšã©ãŒãèŽåœçã«ããŸãã
-bind_at_load
ãã€ãããã¯ãªã³ã«ããã¹ãŠããã€ã³ãããããã«åºåãã¡ã€ã«ã«ããŒã¯ãä»ããŸã
ãã¡ã€ã«ãããŒããŸãã¯èµ·åããããšãã®æªå®çŸ©ã®åç §ã
-ãã³ãã«
Mach-oãã³ãã«åœ¢åŒã®ãã¡ã€ã«ãäœæããŸãã ç·ãåç §ããŠãã ãã ldïŒ1ïŒè©³çŽ°ã«ã€ããŠã¯ã
-ãã³ãã«_ããŒã㌠å®è¡ãã¡ã€ã«
ãã®ãªãã·ã§ã³ã¯ã å®è¡ãã¡ã€ã« ãã«ãåºåãã¡ã€ã«ãèªã¿èŸŒãŸããŸã
ãªã³ã¯ãããŠããŸãã ç·ãåç §ããŠãã ãã ldïŒ1ïŒè©³çŽ°ã«ã€ããŠã¯ã
-ãã€ãããã¯ãªã
ãã®ãªãã·ã§ã³ãæž¡ããšãGCCã¯å®è¡å¯èœãã¡ã€ã«ã§ã¯ãªããã€ãããã¯ã©ã€ãã©ãªãçæããŸãã
ããŒãŠã£ã³ã䜿çšãããªã³ã¯ ãªãããŒã«
-force_cpusubtype_ALL
ããã«ãããGCCã®åºåãã¡ã€ã«ã« å šãŠ ãµãã¿ã€ããã«ãã£ãŠå¶åŸ¡ããããã®ã®ä»£ããã«
ã -mcpu or -è¡é² ãªãã·ã§ã³ãéžæããŸãã
-allowable_client ã¯ã©ã€ã¢ã³ãå
-ã¯ã©ã€ã¢ã³ãå
-compatibility_version
-çŸè¡ç
-ããã_ã¹ããªãã
-äŸåé¢ä¿ãã¡ã€ã«
-dylib_file
-dylinker_install_name
-åç
-exported_symbols_list
-ãã¡ã€ã«ãªã¹ã
- flat_namespace
-force_ flat_namespace
-headerpad_max_install_names
-image_base
-åæå
-ã€ã³ã¹ããŒã«å
-keep_private_externs
-multi_module
-multiply_define
-multiply_define_unused
-noall_load
-no_dead_strip_inits_and_terms
-nofixprebinding
-nomultidefs
-noprebind
-nosegãªã³ã¯ç·šé
-pagezero_size
-äºåãã€ã³ã
-prebind_all_twolevel_modules
-private_bundle
-read_only_relocs
-sectalign
-sectobjectsymbols
-ãªãããŒã
-seg1addr
-sectcreate
-sectobjectsymbols
-ã»ã¯ã¿ãŒããŒ
-segaddr
-segs_read_only_addr
-segs_read_write_addr
-seg_addr_table
-seg_addr_table_filename
-seglinkedit
-segprot
-segs_read_only_addr
-segs_read_write_addr
-single_module
-éç
-ãµãã©ã€ãã©ãª
-ãµãå
-twolevel_namespace
-å
-æªå®çŸ©
-unexported_symbols_list
-weak_reference_mismatches
-Whatsloaded
ãããã®ãªãã·ã§ã³ã¯Darwinãªã³ã«ãŒã«æž¡ãããŸãã ããŒãŠã£ã³ãªã³ã«ãŒã®ããã¥ã¢ã«ããŒãžã§ã¯ã
ãããã詳现ã«ç€ºããŸãã
12æ ã¢ã«ãã¡ ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãDECAlphaå®è£ çšã«å®çŸ©ãããŠããŸãã
-mno-ãœãããããŒã
-msoft-float
æµ®åå°æ°ç¹ã®ããŒããŠã§ã¢æµ®åå°æ°ç¹åœä»€ã䜿çšããïŒäœ¿çšããªãïŒ
ãªãã¬ãŒã·ã§ã³ã ã〠-msoft-float ãæå®ãããŠããå Žåã libgcc.a å®è¡ããããã«äœ¿çšãããŸã
æµ®åå°æ°ç¹æŒç®ã ãããããšãã¥ã¬ãŒãããã«ãŒãã³ã«çœ®ãæããããªãéã
æµ®åå°æ°ç¹æŒç®ããŸãã¯ãã®ãããªãšãã¥ã¬ãŒã·ã§ã³ãåŒã³åºããããªæ¹æ³ã§ã³ã³ãã€ã«ããã
ã«ãŒãã³ã®å Žåããããã®ã«ãŒãã³ã¯æµ®åå°æ°ç¹æŒç®ãçºè¡ããŸãã ã³ã³ãã€ã«ããå Žå
æµ®åå°æ°ç¹æŒç®ã®ãªãAlphaã®å Žåãã©ã€ãã©ãªããã«ããããŠããããšã確èªããå¿ èŠããããŸã
ããããåŒã³åºããªãããã«ã
æµ®åå°æ°ç¹æŒç®ã䜿çšããªãAlphaå®è£ ã«ã¯ã次ã®ãã®ãå¿ èŠã§ããããšã«æ³šæããŠãã ããã
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã
-MFP-REG
-mno-fp-regs
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã»ããã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸãã -mno-fp-regs
å«æãã -msoft-floatã æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã»ããã䜿çšããªãå Žåã¯ãæµ®åå°æ°ç¹
ãªãã©ã³ãã¯ãæŽæ°ããã³æµ®åå°æ°ç¹ã§ãããã®ããã«æŽæ°ã¬ãžã¹ã¿ã«æž¡ãããŸã
çµæã¯$f0ã§ã¯ãªã$0ã§æž¡ãããŸãã ããã¯éæšæºã®åŒã³åºãã·ãŒã±ã³ã¹ã§ããããã
ã³ã³ãã€ã«ãããã³ãŒãã«ãã£ãŠåŒã³åºãããæµ®åå°æ°ç¹åŒæ°ãŸãã¯æ»ãå€ãæã€é¢æ°
ã -mno-fp-regs ãŸãããã®ãªãã·ã§ã³ã䜿çšããŠã³ã³ãã€ã«ããå¿ èŠããããŸãã
ãã®ãªãã·ã§ã³ã®äžè¬çãªäœ¿çšæ³ã¯ã䜿çšããªãã«ãŒãã«ãæ§ç¯ããããšã§ãã
ä¿åããã³åŸ©å ã§ã¯ãªããæµ®åå°æ°ç¹ã¬ãžã¹ã¿ãŒã
-ãã£ãŒ
Alphaã¢ãŒããã¯ãã£ã¯ãæ倧ã«æé©åãããæµ®åå°æ°ç¹ããŒããŠã§ã¢ãå®è£ ããŸã
ããã©ãŒãã³ã¹ã ããã¯ãIEEEæµ®åå°æ°ç¹æšæºã«ã»ãŒæºæ ããŠããŸãã ã§ãã
å®å šã«æºæ ããã«ã¯ããœãããŠã§ã¢ã«ããæ¯æŽãå¿ èŠã§ãã ãã®ãªãã·ã§ã³ã¯ã³ãŒããçæããŸã
å®å šã«IEEEæºæ ã®ã³ãŒã 以äžã¯é€ã ãã® äžæ£ç¢ºãªãã©ã° ç¶æãããŸããïŒä»¥äžãåç §ïŒã
ãã®ãªãã·ã§ã³ããªã³ã«ãããšãããªããã»ããµãã¯ãã_IEEE_FPãã
ã³ã³ãã€ã«ã çµæã®ã³ãŒãã¯å¹çãæªããªããŸãããæ£ãããµããŒãã§ããŸã
éæ£èŠåæ°ãšãéæ£èŠåæ°ããã©ã¹/ãã€ãã¹ãªã©ã®äŸå€çãªIEEEå€
ç¡é倧ã ä»ã®Alphaã³ã³ãã€ã©ã¯ãã®ãªãã·ã§ã³ãåŒã³åºããŸã -ieee_with_no_inexact.
-mieee-with-äžæ£ç¢º
ãã㯠-ãã£ãŒ çæãããã³ãŒããIEEEãç¶æããããšãé€ã㊠äžæ£ç¢ºãªãã©ã°.
ãã®ãªãã·ã§ã³ããªã³ã«ãããšãçæãããã³ãŒãã¯å®å šã«æºæ ããIEEEãå®è£ ããŸãã
ç®æ°ã ã_IEEE_FPãã«å ããŠãã_IEEE_FP_EXACTãã¯ããªããã»ããµãã¯ããšããŠå®çŸ©ãããŠããŸãã
äžéšã®Alphaå®è£ ã§ã¯ãçµæã®ã³ãŒãã®å®è¡é床ãå€§å¹ ã«äœäžããå ŽåããããŸãã
ããã©ã«ãã§çæãããã³ãŒãã ã«äŸåããã³ãŒãã¯ã»ãšãã©ãªãã®ã§
äžæ£ç¢ºãªãã©ã°ãéåžžã¯ãã®ãªãã·ã§ã³ãæå®ããªãã§ãã ããã ä»ã®Alphaã³ã³ãã€ã©ã¯
ãã®ãªãã·ã§ã³ -ieee_with_inexact.
-mfp-trap-mode =ãã©ããã¢ãŒã
ãã®ãªãã·ã§ã³ã¯ãæå¹ã«ããæµ®åå°æ°ç¹é¢é£ã®ãã©ãããå¶åŸ¡ããŸãã ãã®ä»ã®ã¢ã«ãã¡
ã³ã³ãã€ã©ã¯ãã®ãªãã·ã§ã³ãåŒã³åºããŸã -fptm ãã©ããã¢ãŒãã ãã©ããã¢ãŒãã¯XNUMXã€ã®ãã¡ã®XNUMXã€ã«èšå®ã§ããŸã
å€ïŒ
n ããã¯ããã©ã«ãã®ïŒéåžžã®ïŒèšå®ã§ãã æå¹ã«ãªã£ãŠãããã©ããã¯
ãœãããŠã§ã¢ã§ç¡å¹ã«ã§ããªããã®ïŒãŒãé€ç®ãã©ãããªã©ïŒã
u ã«ãã£ãŠæå¹ã«ããããã©ããã«å ã㊠nãã¢ã³ããŒãããŒãã©ãããæå¹ã«ãªããŸãã
su ããã uããã ããåœä»€ã¯ãœãããŠã§ã¢ã®å®äºã«å¯ŸããŠå®å šã§ãããšããŒã¯ãããŠããŸãïŒãåç §ïŒ
詳现ã«ã€ããŠã¯ãAlphaã¢ãŒããã¯ãã£ã®ããã¥ã¢ã«ãåç §ããŠãã ããïŒã
ãªã³ ããã suããã ããäžæ£ç¢ºãªãã©ãããæå¹ã«ãªã£ãŠããŸãã
-mfp-rounding-mode =äžžãã¢ãŒã
IEEEäžžãã¢ãŒããéžæããŸãã ä»ã®Alphaã³ã³ãã€ã©ã¯ãã®ãªãã·ã§ã³ãåŒã³åºããŸã -fprm
äžžãã¢ãŒããéžæããŸãã äžžãã¢ãŒã 次ã®ããããã«ãªããŸãã
n éåžžã®IEEEäžžãã¢ãŒãã æµ®åå°æ°ç¹æ°ã¯ãæãè¿ãæ°å€ã«äžžããããŸã
åç¹ã®å Žåã¯ããã·ã³çªå·ãŸãã¯å¶æ°ãã·ã³çªå·ã«åãã£ãŠã
m ãã€ãã¹ç¡é倧ã«åãã£ãŠäžžããŸãã
c åãå»ãŸããäžžãã¢ãŒãã æµ®åå°æ°ç¹æ°ã¯ãŒãã«åãã£ãŠäžžããããŸãã
d åçäžžãã¢ãŒãã æµ®åå°æ°ç¹å¶åŸ¡ã¬ãžã¹ã¿ã®ãã£ãŒã«ãïŒFPCRãåç §ããŠãã ãã
Alphaã¢ãŒããã¯ãã£ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ïŒã¯ãæå¹ãªäžžãã¢ãŒããå¶åŸ¡ããŸãã C
ã©ã€ãã©ãªã¯ããã©ã¹ç¡é倧ã«äžžããããã«ãã®ã¬ãžã¹ã¿ãåæåããŸãã ãããã£ãŠã
ããã°ã©ã ãå€æŽããªãéã FPCR, d ãã©ã¹æ¹åã®ã©ãŠã³ãã«å¯Ÿå¿
ç¡éã
-mtrap-precision =ãã©ãã粟床
Alphaã¢ãŒããã¯ãã£ã§ã¯ãæµ®åå°æ°ç¹ãã©ããã¯äžæ£ç¢ºã§ãã ããã¯ã
ãœãããŠã§ã¢æ¯æŽãããŒãã£ã³ã°ãã©ãããšããã°ã©ã ããå埩ããããšã¯äžå¯èœã§ã
éåžžãå®è¡ãçµäºããå¿ èŠããããŸãã GCCã¯ãæ¯æŽã§ããã³ãŒããçæã§ããŸã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ãã©ãããã³ãã©ãŒã¯ãåå ãšãªã£ãæ£ç¢ºãªå Žæãç¹å®ããŸãã
æµ®åå°æ°ç¹ãã©ããã ã¢ããªã±ãŒã·ã§ã³ã®èŠä»¶ã«å¿ããŠãç°ãªã
粟床ã®ã¬ãã«ãéžæã§ããŸãã
p ããã°ã©ã ã®ç²ŸåºŠã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ããããã©ãããã³ãã©ãŒã®ã¿ãå®è¡ã§ããããšãæå³ããŸã
æµ®åå°æ°ç¹äŸå€ã®åå ãšãªã£ãããã°ã©ã ãç¹å®ããŸãã
f é¢æ°ã®ç²ŸåºŠã ãã©ãããã³ãã©ãŒã¯ãåå ãšãªã£ãé¢æ°ãç¹å®ã§ããŸãã
æµ®åå°æ°ç¹äŸå€ã
i åœä»€ç²ŸåºŠã ãã©ãããã³ãã©ãŒã¯ã次ã®ãããªæ£ç¢ºãªåœä»€ãå€å¥ã§ããŸãã
æµ®åå°æ°ç¹äŸå€ãçºçããŸããã
ä»ã®Alphaã³ã³ãã€ã©ã¯ããšåŒã°ããåçã®ãªãã·ã§ã³ãæäŸããŸã -scope_safe ãš
-åé_å®å š.
-mieee-æºæ
ãã®ãªãã·ã§ã³ã¯ãçæãããã³ãŒããIEEEæºæ ãšããŠããŒã¯ããŸãã ãã®ãªãã·ã§ã³ã¯äœ¿çšããªãã§ãã ãã
æå®ããªãéã -mtrap-precision = i ãããŠã©ã¡ãã -mfp-trap-mode = su or
-mfp-trap-mode = suiã ãã®å¯äžã®å¹æã¯ãã©ã€ã³ãæŸåºããããšã§ã .eflag 48 é¢æ°å
çæãããã¢ã»ã³ããªãã¡ã€ã«ã®ããããŒã°ã
-mbuild-å®æ°
éåžžãGCCã¯32ããããŸãã¯64ãããã®æŽæ°å®æ°ã調ã¹ãŠããããæ§ç¯ã§ãããã©ããã確èªããŸã
XNUMXã€ãŸãã¯XNUMXã€ã®åœä»€ã®å°ããªå®æ°ããã ã§ããªãå Žåã¯ã
ãªãã©ã«ãšããŠå®æ°ã§ãããå®è¡æã«ããŒã¿ã»ã°ã¡ã³ãããããŒãããã³ãŒããçæããŸãã
ãã®ãªãã·ã§ã³ã䜿çšããŠãGCCã«æ§ç¯ãèŠæ±ããŸã ã ããšãã³ãŒãã䜿çšããæŽæ°å®æ°
ããå€ãã®åœä»€ãå¿ èŠã§ãïŒæ倧ã¯XNUMXã€ã§ãïŒã
éåžžããã®ãªãã·ã§ã³ã䜿çšããŠãå ±æã©ã€ãã©ãªã®åçããŒããŒãæ§ç¯ããŸãã ããèªäœ
å ±æã©ã€ãã©ãªã®å Žåãå€æ°ãèŠã€ããåã«ã¡ã¢ãªå ã«åé 眮ããå¿ èŠããããŸãã
ç¬èªã®ããŒã¿ã»ã°ã¡ã³ãã®å®æ°ã
-mbwx
-mno-bwx
-mcix
-mno-cix
-mfix
-mno-ä¿®æ£
-mmax
-mno-max
ãªãã·ã§ã³ã®BWXãCIXãFIXãããã³MAXã䜿çšããããã«GCCãã³ãŒããçæããå¿ èŠããããã©ããã瀺ããŸã
åœä»€ã»ããã ããã©ã«ãã§ã¯ãCPUã§ãµããŒããããŠããåœä»€ã»ããã䜿çšããŸã
çµç±ã§æå®ãããã¿ã€ã -mcpu = ãªãã·ã§ã³ãŸãã¯GCCãæ§ç¯ãããCPUã®ãªãã·ã§ã³ïŒãªãå ŽåïŒ
æå®ã
-mfloat-vax
-mfloat-ieee
代ããã«VAXFããã³Gæµ®åå°æ°ç¹æŒç®ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸã
IEEEã®å粟床ããã³å粟床ã
-mexplicit-relocs
-mno-explicit-relocs
å€ãAlphaã¢ã»ã³ãã©ã¯ãçµç±ãã以å€ã«ã·ã³ãã«ã®åé 眮ãçæããæ¹æ³ãæäŸããŠããŸããã§ãã
ã¢ã»ã³ãã©ãã¯ãã ãããã®ãã¯ãã䜿çšãããšãæé©ãªåœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã§ããªããªããŸãã
ããŒãžã§ã³2.12以éã®GNUbinutilsã¯ãã³ã³ãã€ã©ã次ã®ããšãå®è¡ã§ããããã«ããæ°ããæ§æããµããŒãããŠããŸãã
ã©ã®åé 眮ãã©ã®åœä»€ã«é©çšããããæ瀺çã«ããŒã¯ããŸãã ãã®ãªãã·ã§ã³ã¯
GCCã¯ã¢ã»ã³ãã©ã®æ©èœãæ€åºããããããããã°ã«æã圹ç«ã¡ãŸãã
ãæ§ç¯ãããããã«å¿ããŠããã©ã«ããèšå®ãããŸãã
-msmall-ããŒã¿
-mlarge-ããŒã¿
æ¥æ -mexplicit-relocs ãæå¹ã§ããå ŽåãéçããŒã¿ã«ã¯æ¬¡ã®æ¹æ³ã§ã¢ã¯ã»ã¹ããŸã gpçžå¯Ÿ
移転ã ã〠-msmall-ããŒã¿ ã䜿çšãããå Žåã8ãã€ã以äžã®ãªããžã§ã¯ããé 眮ãããŸã
a å°ãã ããŒã¿ ãšãªã¢ ïŒã.sdataãããã³ã.sbssãã»ã¯ã·ã§ã³ïŒããã³16ããããä»ããŠã¢ã¯ã»ã¹ãããŸã
$gpã¬ãžã¹ã¿ããã®åé 眮ã ããã«ãããå°ããªããŒã¿é åã®ãµã€ãºã次ã®ããã«å¶éãããŸãã
64KBã§ãããåäžã®åœä»€ãä»ããŠå€æ°ã«çŽæ¥ã¢ã¯ã»ã¹ã§ããŸãã
ããã©ã«ã㯠-mlarge-ããŒã¿ã ãã®ãªãã·ã§ã³ã䜿çšãããšãããŒã¿é åã¯ããäžã«å¶éãããŸã
2GBã 2GBãè¶ ããããŒã¿ãå¿ èŠãšããããã°ã©ã ã¯ããmallocããŸãã¯ãmmapãã䜿çšããŠ
ããã°ã©ã ã®ããŒã¿ã»ã°ã¡ã³ãã§ã¯ãªããããŒãã«ããŒã¿ãå²ãåœãŠãŸãã
å ±æã©ã€ãã©ãªã®ã³ãŒããçæããå Žåã -fpic å«æãã -msmall-ããŒã¿ ãš -fPIC
å«æãã -mlarge-ããŒã¿.
-msmall-text
-æ¡å€§ããã¹ã
æ¥æ -msmall-text ã䜿çšãããå Žåãã³ã³ãã€ã©ã¯ããã°ã©ã å šäœã®ã³ãŒããæ³å®ããŸã
ïŒãŸãã¯å ±æã©ã€ãã©ãªïŒã¯4MBã«åãŸããããåå²åœä»€ã§å°éå¯èœã§ãã
æ¥æ -msmall-ããŒã¿ ã䜿çšãããå Žåãã³ã³ãã€ã©ã¯ãã¹ãŠã®ããŒã«ã«ã·ã³ãã«ã
åã$gpå€ã§ãããããé¢æ°ã«å¿ èŠãªåœä»€ã®æ°ãæžããããšãã§ããŸã
4ãã1ã«åŒã³åºããŸãã
ããã©ã«ã㯠-æ¡å€§ããã¹ã.
-mcpu =cpu_type
ãã·ã³ã¿ã€ãã®åœä»€ã»ãããšåœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã
cpu_typeã 次ã®ãããããæå®ã§ããŸã EV ã¹ã¿ã€ã«åãŸãã¯å¯Ÿå¿ãããããçªå·ã
GCCã¯ãEV4ãEV5ãããã³EV6ãã¡ããªã®ããã»ããµãš
æå®ããããã»ããµããã®åœä»€ã»ããã®ããã©ã«ãå€ãéžæããŸãã ããã
ããã»ããµã¿ã€ããæå®ããªãå ŽåãGCCã¯ããã©ã«ãã§ããã»ããµã®
ã³ã³ãã€ã©ãæ§ç¯ãããŸããã
ãµããŒããããŠããå€ cpu_type ã
ev4
ev45
21064
EV4ãšããŠã¹ã±ãžã¥ãŒã«ãããåœä»€ã»ããæ¡åŒµã¯ãããŸããã
ev5
21164
EV5ãšããŠã¹ã±ãžã¥ãŒã«ãããåœä»€ã»ããæ¡åŒµã¯ãããŸããã
ev56
21164a
EV5ãšããŠã¹ã±ãžã¥ãŒã«ããBWXæ¡åŒµããµããŒãããŸãã
PCA56
21164pc
21164PC
EV5ãšããŠã¹ã±ãžã¥ãŒã«ããBWXããã³MAXæ¡åŒµæ©èœããµããŒãããŸãã
ev6
21264
EV6ãšããŠã¹ã±ãžã¥ãŒã«ããBWXãFIXãããã³MAXæ¡åŒµæ©èœããµããŒãããŸãã
ev67
21264a
EV6ãšããŠã¹ã±ãžã¥ãŒã«ããBWXãCIXãFIXãããã³MAXæ¡åŒµæ©èœããµããŒãããŸãã
ãã€ãã£ãããŒã«ãã§ãŒã³ã䟡å€ããµããŒãããŸã ãã€ãã£ããæé©ãªã¢ãŒããã¯ãã£ãéžæããŸã
ãã¹ãããã»ããµã®ãªãã·ã§ã³ã -mcpu = native GCCãèªèããªãå Žåã¯å¹æããããŸãã
ããã»ããµã
-mtune =cpu_type
ãã·ã³ã¿ã€ãã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ã®ã¿ãèšå®ããŸã cpu_typeãéžæããŸãã
åœä»€ã»ããã¯å€æŽãããŸããã
ãã€ãã£ãããŒã«ãã§ãŒã³ã䟡å€ããµããŒãããŸã ãã€ãã£ããæé©ãªã¢ãŒããã¯ãã£ãéžæããŸã
ãã¹ãããã»ããµã®ãªãã·ã§ã³ã -mtune = native GCCãèªèããªãå Žåã¯å¹æããããŸãã
ããã»ããµã
-mmemory-latency =æé
次ã®ããã«ãã¹ã±ãžã¥ãŒã©ãäžè¬çãªã¡ã¢ãªåç §ã«å¯ŸããŠæ³å®ããã¬ã€ãã³ã·ãèšå®ããŸãã
ã¢ããªã±ãŒã·ã§ã³ã ãã®æ°ã¯ã䜿çšãããã¡ã¢ãªã¢ã¯ã»ã¹ãã¿ãŒã³ã«å€§ããäŸåããŸã
ã¢ããªã±ãŒã·ã§ã³ãšãã·ã³ã®å€éšãã£ãã·ã¥ã®ãµã€ãºã«ãã£ãŠç°ãªããŸãã
ã®æå¹ãªãªãã·ã§ã³ æé ã
æ°
ã¯ããã¯ãµã€ã¯ã«ãè¡šãXNUMXé²æ°ã
L1
L2
L3
ã¡ã€ã³
ã³ã³ãã€ã©ã«ã¯ããäžè¬çãªãEV4ããã³ã®ã¯ããã¯ãµã€ã¯ã«æ°ã®èŠç©ãããå«ãŸããŠããŸãã
ã¬ãã«5ã1ãããã³2ãã£ãã·ã¥çšã®EV3ããŒããŠã§ã¢ïŒDcacheãScacheãããã³
BcacheïŒãããã³ã¡ã€ã³ã¡ã¢ãªãžã L3ã¯EV5ã§ã®ã¿æå¹ã§ããããšã«æ³šæããŠãã ããã
FR30 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãFR30ããŒãçšã«ç¹å¥ã«å®çŸ©ãããŠããŸãã
-msmall-ã¢ãã«
å°ããªã¢ãã¬ã¹ç©ºéã¢ãã«ã䜿çšããŸãã ããã«ãããããå°ããªã³ãŒããçæãããå¯èœæ§ããããŸããã
ãã¹ãŠã®ã·ã³ããªãã¯å€ãšã¢ãã¬ã¹ã20ãããç¯å²ã«åãŸãããã«ããŸãã
-mno-lsim
ã©ã³ã¿ã€ã ãµããŒããæäŸãããŠããããããå«ããå¿ èŠã¯ãªããšæ³å®ããŸãã
ã·ãã¥ã¬ãŒã¿ã©ã€ãã©ãªïŒlibsim.aïŒãªã³ã«ãŒã³ãã³ãã©ã€ã³ã
FRV ãªãã·ã§ã³
-mgpr-32
æåã®32åã®æ±çšã¬ãžã¹ã¿ã®ã¿ã䜿çšããŠãã ããã
-mgpr-64
64åãã¹ãŠã®æ±çšã¬ãžã¹ã¿ã䜿çšããŸãã
-MFPR-32
æåã®32åã®æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã®ã¿ã䜿çšããŠãã ããã
-MFPR-64
64åã®æµ®åå°æ°ç¹ã¬ãžã¹ã¿ãã¹ãŠã䜿çšããŸãã
-mhard-float
æµ®åå°æ°ç¹æŒç®ã«ã¯ããŒããŠã§ã¢åœä»€ã䜿çšããŠãã ããã
-msoft-float
æµ®åå°æ°ç¹æŒç®ã«ã¯ã©ã€ãã©ãªã«ãŒãã³ã䜿çšããŸãã
-malloc-cc
æ¡ä»¶ã³ãŒãã¬ãžã¹ã¿ãåçã«å²ãåœãŠãŸãã
-mfixed-cc
æ¡ä»¶ã³ãŒãã¬ãžã¹ã¿ãåçã«å²ãåœãŠãããšããããicc0ããš
ãfcc0ãã
-mdword
ããã«ã¯ãŒãinsnsã䜿çšããããã«ABIãå€æŽããŸãã
-mno-dword
ããã«ã¯ãŒãåœä»€ã¯äœ¿çšããªãã§ãã ããã
-mdouble
æµ®åå°æ°ç¹ã®doubleåœä»€ã䜿çšããŸãã
-mno-double
æµ®åå°æ°ç¹ã®doubleåœä»€ã¯äœ¿çšããªãã§ãã ããã
-ã¡ãã£ã¢
ã¡ãã£ã¢ã®æ瀺ã䜿çšããŠãã ããã
-mno-ã¡ãã£ã¢
ã¡ãã£ã¢ã®æ瀺ã䜿çšããªãã§ãã ããã
-ã ã ã©ãã
ä¹ç®ããã³å ç®/æžç®ã®åœä»€ã䜿çšããŸãã
-mno-ã ã©ãã
ä¹ç®ããã³å ç®/æžç®ã®åœä»€ã¯äœ¿çšããªãã§ãã ããã
-mfdpic
FDPIC ABIãéžæããŸããããã¯ãé¢æ°èšè¿°åã䜿çšããŠãžã®ãã€ã³ã¿ãŒãè¡šããŸãã
æ©èœã PIC / PIEé¢é£ã®ãªãã·ã§ã³ããªãå Žåã¯ã -fPIE -fpic or
-fpieãGOTãšã³ããªãšå°ããªããŒã¿ãGOTãã12ãããã®ç¯å²å ã«ããããšãåæãšããŠããŸã
ããŒã¹ã¢ãã¬ã¹; ãš -fPIC or -fPIEãGOTãªãã»ããã¯32ãããã§èšç®ãããŸãã ãšãšãã«
bfinãšã«ã ã¿ãŒã²ããããã®ãªãã·ã§ã³ã¯ -msim.
-minline-plt
ç¥ãããŠããªãé¢æ°ãžã®é¢æ°åŒã³åºãã§PLTãšã³ããªã®ã€ã³ã©ã€ã³åãæå¹ã«ãã
ããŒã«ã«ã«ãã€ã³ãããŸãã ãªãã§ã¯å¹æããããŸãã -mfdpicã 次ã®å Žåãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
é床ã®æé©åãšå ±æã©ã€ãã©ãªã®ã³ã³ãã€ã«ïŒã€ãŸãã -fPIC or -fpicïŒããŸãã¯
次ã®ãããªæé©åãªãã·ã§ã³ã®å Žå -O3 以äžãã³ãã³ãã©ã€ã³ã«ååšããŸãã
-mTLS
ã¹ã¬ããããŒã«ã«ã³ãŒããçæãããšãã¯ã倧ããªTLSã»ã°ã¡ã³ããæ³å®ããŸãã
-mtls
ã¹ã¬ããããŒã«ã«ã³ãŒããçæãããšãã¯ã倧ããªTLSã»ã°ã¡ã³ããæ³å®ããªãã§ãã ããã
-mgprel-ro
ã§ããããšãããã£ãŠããããŒã¿ã«å¯ŸããŠãFDPICABIã§ãGPRELãåé 眮ã®äœ¿çšãæå¹ã«ããŸãã
èªã¿åãå°çšã»ã¯ã·ã§ã³ã ãé€ããŠãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã -fpic or -fpieïŒ ããã§ã
ã°ããŒãã«ãªãã»ããããŒãã«ãå°ããããã®ã«åœ¹ç«ã€å Žåãããã1ã€ã®åœä»€ã4ã€ãšäº€æããŸãã
-fPIC or -fPIEã3ã€ã®åœä»€ã4ã€ãšäº€æãããã®ãã¡ã®XNUMXã€ã¯è€æ°ã®åœä»€ã§å ±æãããå ŽåããããŸã
ã·ã³ãã«ã§ãããåç §ãããã·ã³ãã«ã®GOTãšã³ããªã®å¿ èŠæ§ãåé¿ããããã
åå©ããå¯èœæ§ãé«ããªããŸãã ããã§ãªãå Žåã¯ã -mno-gprel-ro ç¡å¹ã«ããããã«äœ¿çšã§ããŸãã
-multilib-ã©ã€ãã©ãª-pic
ïŒFDã§ã¯ãªãã©ã€ãã©ãªïŒpicã©ã€ãã©ãªãšãªã³ã¯ããŸãã ããã¯ã«ãã£ãŠæ瀺ãããŠããŸã -mlibrary-picã åãããã«
ã®ããã« -fPIC ãš -fpic ç¡ã -mfdpicã æ瀺çã«äœ¿çšããå¿ èŠã¯ãããŸããã
-mlinked-fp
ã¹ã¿ãã¯ãã¬ãŒã ã®å Žåã¯åžžã«ãã¬ãŒã ãã€ã³ã¿ãäœæãããšããEABIã®èŠä»¶ã«åŸã£ãŠãã ãã
å²ãåœãŠãããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããã次ã®æ¹æ³ã§ç¡å¹ã«ã§ããŸãã
-mno-linked-fp.
-mlong-calls
éæ¥ã¢ãã¬ã¹æå®ã䜿çšããŠãçŸåšã®ã³ã³ãã€ã«åäœã®å€éšã§é¢æ°ãåŒã³åºããŸãã ãã
é¢æ°ã32ãããã¢ãã¬ã¹ç©ºéå ã®ã©ãã«ã§ãé 眮ã§ããããã«ããŸãã
-æªæ§ã©ãã«
åã®ãã±ããã«NOPãæ¿å ¥ããŠãã©ãã«ã8ãã€ãå¢çã«æããŠã¿ãŠãã ããã
ãã®ãªãã·ã§ã³ã¯ãVLIWãããã³ã°ãæå¹ã«ãªã£ãŠããå Žåã«ã®ã¿å¹æããããŸãã æ°ãããã®ã¯äœæããŸãã
ãã±ãã; æ¢åã®NOPã«NOPãè¿œå ããã ãã§ãã
-mlibrary-pic
äœçœ®ã«äŸåããªãEABIã³ãŒããçæããŸãã
-mac-4
æåã®XNUMXã€ã®ã¡ãã£ã¢ã¢ãã¥ã ã¬ãŒã¿ã¬ãžã¹ã¿ã®ã¿ã䜿çšããŠãã ããã
-mac-8
XNUMXã€ã®ã¡ãã£ã¢ã¢ãã¥ã ã¬ãŒã¿ã¬ãžã¹ã¿ãã¹ãŠã䜿çšããŸãã
-mpack
VLIWåœä»€ãããã¯ããŸãã
-mno-pack
VLIWåœä»€ãããã¯ããªãã§ãã ããã
-mno-eflags
e_flagsã§ABIã¹ã€ãããããŒã¯ããªãã§ãã ããã
-mcond-移å
æ¡ä»¶ä»ã移ååœä»€ã®äœ¿çšãæå¹ã«ããŸãïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-cond-move
æ¡ä»¶ä»ã移ååœä»€ã®äœ¿çšãç¡å¹ã«ããŸãã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mscc
æ¡ä»¶ä»ãã»ããåœä»€ã®äœ¿çšãæå¹ã«ããŸãïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-scc
æ¡ä»¶ä»ãã»ããåœä»€ã®äœ¿çšãç¡å¹ã«ããŸãã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mcond-exec
æ¡ä»¶ä»ãå®è¡ã®äœ¿çšãæå¹ã«ããŸãïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-cond-exec
æ¡ä»¶ä»ãå®è¡ã®äœ¿çšãç¡å¹ã«ããŸãã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mvliw-ãã©ã³ã
ãã¹ãå®è¡ããŠããã©ã³ããVLIWåœä»€ã«ããã¯ããŸãïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-vliw-ãã©ã³ã
ãã¹ãå®è¡ããŠãã©ã³ããVLIWåœä»€ã«ããã¯ããªãã§ãã ããã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mmulti-cond-exec
ã&&ããšã||ãã®æé©åãæå¹ã«ããŸãæ¡ä»¶ä»ãå®è¡ïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-multi-cond-exec
ã&&ããšã||ãã®æé©åãç¡å¹ã«ããŸãæ¡ä»¶ä»ãå®è¡ã§ã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mnested-cond-exec
ãã¹ããããæ¡ä»¶ä»ãå®è¡ã®æé©åãæå¹ã«ããŸãïŒããã©ã«ãïŒã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-mno-nested-cond-exec
ãã¹ããããæ¡ä»¶ä»ãå®è¡ã®æé©åãç¡å¹ã«ããŸãã
ãã®ã¹ã€ããã¯äž»ã«ã³ã³ãã€ã©ã®ãããã°çšã§ããã
å°æ¥ã®ããŒãžã§ã³ã
-moptimize-ã¡ã³ããŒããŒ
ãã®ã¹ã€ããã¯ãã³ã³ãã€ã©ãçæããã³ãŒãããåé·ãªãã¡ã¢ãªãåœä»€ãåé€ããŸãã
ããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠããŸãã
-mno-optimize-memberbar
ãã®ã¹ã€ããã¯ãåé·ãªãã¡ã³ããŒãåœä»€ã®èªååé€ãç¡å¹ã«ããŸãã
çæãããã³ãŒãã
-mtomcat-çµ±èš
ã¬ã¹ã«Tomcatçµ±èšãåºåãããŸãã
-mcpu =CPU
ã³ãŒããçæããããã»ããµã¿ã€ããéžæããŸãã å¯èœãªå€ã¯æ¬¡ã®ãšããã§ã frv, fr550,
éç«, fr500, fr450, fr405, fr400, fr300 ãš ã·ã³ãã«ãª.
GNU / Linuxã® ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯GNU/Linuxã¿ãŒã²ããçšã«å®çŸ©ãããŠããŸãã
-mglibc
GNUCã©ã€ãã©ãªã䜿çšããŸãã ããã¯ããé€ãããã©ã«ãã§ãã *-*-linux- * uclibc * ãš
*-*-linux- * android * ã¿ãŒã²ããã
-ã ã¯ãªã
uClibcCã©ã€ãã©ãªã䜿çšããŸãã ãããããã©ã«ãã§ã *-*-linux- * uclibc * ã¿ãŒã²ããã
-ãã€ãªããã¯
BionicCã©ã€ãã©ãªã䜿çšããŸãã ãããããã©ã«ãã§ã *-*-linux- * android * ã¿ãŒã²ããã
-ãã³ã¢ã³ããã€ã
Androidãã©ãããã©ãŒã ãšäºææ§ã®ããã³ãŒããã³ã³ãã€ã«ããŸãã ãããããã©ã«ãã§ã
*-*-linux- * android * ã¿ãŒã²ããã
ã³ã³ãã€ã«æã«ããã®ãªãã·ã§ã³ã¯æå¹ã«ãªããŸã -ãã€ãªããã¯, -fPIC, -fno-äŸå€ ãš -fno-rtti by
ããã©ã«ãã ãªã³ã¯ãããšãããã®ãªãã·ã§ã³ã¯GCCãã©ã€ããŒã«Androidåºæã®ãªãã·ã§ã³ãæž¡ããŸã
ãªã³ã«ãŒã«ã æåŸã«ããã®ãªãã·ã§ã³ã«ãããããªããã»ããµãã¯ãã__ANDROID__ãã¯æ¬¡ã®ããã«ãªããŸãã
å®çŸ©ãããã
-tno-android-cc
ã®ã³ã³ãã€ã«å¹æãç¡å¹ã«ãã -ãã³ã¢ã³ããã€ããã€ãŸããæå¹ã«ããªãã§ãã ãã -ãã€ãªããã¯, -fPIC,
-fno-äŸå€ ãš -fno-rtti ããã©ã«ãã§ã¯
-tno-android-ld
ã®ãªã³ã¯å¹æãç¡å¹ã«ãã -ãã³ã¢ã³ããã€ãã€ãŸããæšæºã®Linuxãªã³ã¯ãªãã·ã§ã³ã
ãªã³ã«ã
H8 / 300 ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãH8/300å®è£ çšã«å®çŸ©ãããŠããŸãã
-mãªã©ãã¯ã¹
å¯èœã§ããã°ããªã³ã¯æã«äžéšã®ã¢ãã¬ã¹åç §ãçãããŸãã ãªã³ã«ãŒãªãã·ã§ã³ã䜿çšããŸã
-ãªã©ãã¯ã¹.
-mh H8/300Hã®ã³ãŒããçæããŸãã
-MS H8Sã®ã³ãŒããçæããŸãã
-å éåžžã¢ãŒãã§H8Sããã³H8/300Hã®ã³ãŒããçæããŸãã ãã®ã¹ã€ããã䜿çšããå¿ èŠããããŸã
ã©ã¡ãããš -mh or -MS.
-ms2600
H8S/2600ã®ã³ãŒããçæããŸãã ãã®ã¹ã€ããã¯ã -MS.
-ã¡ã¯ã¹ã«
æ¡åŒµã¬ãžã¹ã¿ã¯ãã¢ãã¿ã§é¢æ°ãå®è¡ããåã«ã¹ã¿ãã¯ã«æ ŒçŽãããŸã
å±æ§ã ããã©ã«ãã®ãªãã·ã§ã³ã¯ -ã¡ã¯ã¹ã«ã ãã®ãªãã·ã§ã³ã¯ãH8Sã¿ãŒã²ããã«ã®ã¿æå¹ã§ãã
-mno-exr
æ¡åŒµã¬ãžã¹ã¿ã¯ãã¢ãã¿ã§é¢æ°ãå®è¡ããåã«ã¹ã¿ãã¯ã«æ ŒçŽãããŸããã
å±æ§ã ããã©ã«ãã®ãªãã·ã§ã³ã¯ -mno-exrã ãã®ãªãã·ã§ã³ã¯ãH8Sã¿ãŒã²ããã«ã®ã¿æå¹ã§ãã
-ãã³ã32
ããã©ã«ãã§ãintãããŒã¿ã32ãããã«ããŸãã
-æªæ§-300
H8 / 300Hããã³H8Sã§ã¯ãH8/300ãšåãäœçœ®åããèŠåã䜿çšããŸãã ããã©ã«ã
H8 / 300Hããã³H8Sã®å Žåããã³ã°ãšãããŒãã4ãã€ãå¢çã«æããŸãã
-æªæ§-300 ãããã2ãã€ãå¢çã«æããŸãã ãã®ãªãã·ã§ã³ã¯å¹æããããŸãã
H8/300ã§ã
HPPA ãªãã·ã§ã³
ããŒãã³ -m HPPAãã¡ããªãŒã®ã³ã³ãã¥ãŒã¿ãŒã«ã¯ã次ã®ãªãã·ã§ã³ãå®çŸ©ãããŠããŸãã
-XNUMXæ=ã¢ãŒããã¯ãã£ã¿ã€ã
æå®ãããã¢ãŒããã¯ãã£ã®ã³ãŒããçæããŸãã ã®éžæè¢ ã¢ãŒããã¯ãã£ã¿ã€ã ã
1.0 PA 1.0ã®å Žåã 1.1 PA 1.1ã®å Žåãããã³ 2.0 PA2.0ããã»ããµçšã åç §ãã
/usr/lib/sched.models HP-UXã·ã¹ãã ã§é©åãªã¢ãŒããã¯ãã£ãªãã·ã§ã³ã決å®ãã
ããªãã®ãã·ã³ã®ããã«ã çªå·ã®å°ããã¢ãŒããã¯ãã£çšã«ã³ã³ãã€ã«ãããã³ãŒãã¯ãé«ãçªå·ã§å®è¡ãããŸã
çªå·ä»ãã®ã¢ãŒããã¯ãã£ã§ããããã®éã§ã¯ãããŸããã
-mpa-risc-1-0
-mpa-risc-1-1
-mpa-risc-2-0
ã®åçŸ©èª -1.0æ=XNUMX, -1.1æ=XNUMX, -2.0æ=XNUMX ã
-mãžã£ã³ãã€ã³ãã£ã¬ã€
å€æŽããããšã«ãããé¢æ°åŒã³åºãã®é 延ã¹ããããç¡æ¡ä»¶ãžã£ã³ãåœä»€ã§åããŸã
æ¡ä»¶ä»ããžã£ã³ãã®ã¿ãŒã²ãããšãªãé¢æ°åŒã³åºãã®æ»ããã€ã³ã¿ãŒã
-mdisable-fpregs
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ããããªãæ¹æ³ã§ã䜿çšãããªãããã«ããŸãã ããã¯
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã®é 延ã³ã³ããã¹ãã¹ã€ããã³ã°ãå®è¡ããã«ãŒãã«ã®ã³ã³ãã€ã«ã ããã
ãã®ãªãã·ã§ã³ã䜿çšããŠãã³ã³ãã€ã©ã§ããæµ®åå°æ°ç¹æŒç®ãå®è¡ããããšããŸãã
äžæ¢ããŸãã
-mdisable-ã€ã³ããã¯ã¹äœæ
ã³ã³ãã€ã©ãã€ã³ããã¯ã¹ã¢ãã¬ã¹ã¢ãŒãã䜿çšããªãããã«ããŸãã ããã¯ããªãåé¿ããŸã
MACHã§MIGã§çæãããã³ãŒããã³ã³ãã€ã«ãããšãã®ãããŸããªåé¡ã
-mno-space-regs
ã¿ãŒã²ããã«ã¹ããŒã¹ã¬ãžã¹ã¿ããªããšæ³å®ããã³ãŒããçæããŸãã ããã«ãããGCCã¯
ããé«éãªéæ¥åŒã³åºããçæããã¹ã±ãŒãªã³ã°ãããŠããªãã€ã³ããã¯ã¹ã¢ãã¬ã¹ã¢ãŒãã䜿çšããŸãã
ãã®ãããªã³ãŒãã¯ãã¬ãã«0ã®PAã·ã¹ãã ããã³ã«ãŒãã«ã«é©ããŠããŸãã
-mfast-éæ¥åŒã³åºã
åŒã³åºããã¹ããŒã¹ã®å¢çãè¶ããªãããšãåæãšããã³ãŒããçæããŸãã ããã«ãããGCCã¯
ããé«éãªéæ¥åŒã³åºããå®è¡ããã³ãŒããçºè¡ããŸãã
ãã®ãªãã·ã§ã³ã¯ãå ±æã©ã€ãã©ãªãŸãã¯ãã¹ããããé¢æ°ãååšããå Žåã¯æ©èœããŸããã
-mfixed-range =ã¬ãžã¹ã¿ç¯å²
æå®ãããã¬ãžã¹ã¿ç¯å²ãåºå®ã¬ãžã¹ã¿ãšããŠæ±ãã³ãŒããçæããŸãã åºå®ã¬ãžã¹ã¿
ã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã䜿çšã§ããªããã®ã§ãã ããã¯ãã«ãŒãã«ãã³ã³ãã€ã«ãããšãã«åœ¹ç«ã¡ãŸã
ã³ãŒãã ã¬ãžã¹ã¿ç¯å²ã¯ãããã·ã¥ã§åºåãããXNUMXã€ã®ã¬ãžã¹ã¿ãšããŠæå®ãããŸãã å€æ°
ã¬ãžã¹ã¿ç¯å²ã¯ãã³ã³ãã§åºåã£ãŠæå®ã§ããŸãã
-mlong-ããŒãã¹ãã¢
HP-UX 3ã§å¿ èŠã«ãªãå Žåãããããã«ã10åœä»€ã®ããŒãããã³ã¹ãã¢ã·ãŒã±ã³ã¹ãçæããŸã
ãªã³ã«ã ããã¯ã +k HPã³ã³ãã€ã©ã®ãªãã·ã§ã³ã
-ããŒã¿ãã«ã©ã³ã¿ã€ã
ELFã·ã¹ãã çšã«HPãææ¡ããããŒã¿ãã«åŒã³åºãèŠçŽã䜿çšããŠãã ããã
-ã¡ã¬ã¬ã¹
GASã®ã¿ãç解ããã¢ã»ã³ãã©ãã£ã¬ã¯ãã£ãã®äœ¿çšãæå¹ã«ããŸãã
-mschedule =CPUã¿ã€ã
ãã·ã³ã¿ã€ãã®å¶çŽã«åŸã£ãŠã³ãŒããã¹ã±ãžã¥ãŒã«ããŸã CPUã¿ã€ãã éžæè¢
for CPUã¿ã€ã ã 700 7100, 7100LC, 7200, 7300 ãš 8000ã åç §ãã
/usr/lib/sched.models HP-UXã·ã¹ãã ã§ãé©åãªã¹ã±ãžã¥ãŒãªã³ã°ãªãã·ã§ã³ã決å®ãã
ããªãã®ãã·ã³ã ããã©ã«ãã®ã¹ã±ãžã¥ãŒã«ã¯ 8000.
-mlinker-opt
HP-UXãªã³ã«ãŒã§æé©åãã¹ãæå¹ã«ããŸãã ããã«ããã·ã³ããªãã¯ãããã°ãè¡ãããããšã«æ³šæããŠãã ãã
ç¡çã ãã ãŸããHP-UX8ããã³HP-UX9ãªã³ã«ãŒã§ãã°ãçºçããŸãã
äžéšã®ããã°ã©ã ããªã³ã¯ãããšãåœã®ãšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŸãã
-msoft-float
æµ®åå°æ°ç¹ã®ã©ã€ãã©ãªåŒã³åºããå«ãåºåãçæããŸãã èŠåïŒ å¿ èŠæ¡ä»¶
ã©ã€ãã©ãªã¯ããã¹ãŠã®HPPAã¿ãŒã²ããã§äœ¿çšã§ããããã§ã¯ãããŸããã éåžžã
ãã·ã³ã®éåžžã®Cã³ã³ãã€ã©ã䜿çšãããŸããããããã¯ãã¹ã§çŽæ¥å®è¡ããããšã¯ã§ããŸããã
ã³ã³ãã€ã«ã é©åãªã©ã€ãã©ãªãæäŸããã«ã¯ãç¬èªã®æé ãè¡ãå¿ èŠããããŸã
ã¯ãã¹ã³ã³ãã€ã«ã®ããã®é¢æ°ã
-msoft-float åºåãã¡ã€ã«ã®åŒã³åºãèŠçŽãå€æŽããŸãã ãããã£ãŠãããã¯
ã³ã³ãã€ã«ããå Žåã«äŸ¿å©ã§ã ã ãã®ãªãã·ã§ã³ã䜿çšããããã°ã©ã ã®ç¹ã«ãããªãã¯ããå¿ èŠããããŸã
ã³ã³ãã€ã« libgcc.aãGCCã«ä»å±ããã©ã€ãã©ãª -msoft-float ãã®ããã«
åäœããããã«ã
-msio
ãµãŒããŒIOã®äºåå®çŸ©ã_SIOããçæããŸãã ããã©ã«ã㯠-mwsioã ããã«ããã
ã¯ãŒã¯ã¹ããŒã·ã§ã³IOã®äºåå®çŸ©ãã__ hp9000s700ããã__ hp9000s700__ããããã³ã_WSIOãã
ãããã®ãªãã·ã§ã³ã¯ãHP-UXããã³HI-UXã§äœ¿çšã§ããŸãã
-mgnu-ld
GNUã«åºæã®ãªãã·ã§ã³ã䜿çšãã ldã ããã¯åæ Œã§ã -å ±æ ããž ld å ±æãæ§ç¯ãããšã
å³æžé€šã ããã¯ãGCCãæ瀺çãŸãã¯æé»çã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
GNUãªã³ã«ãŒã ãã®ãªãã·ã§ã³ã¯ã©ã¡ãã«ã圱é¿ããŸãã ld ãšåŒã°ããŸãã ããã¯äœãå€ããã ãã§ã
ãã©ã¡ãŒã¿ãããã«æž¡ãããŸã ldãéžæããŸãã ld ãšåŒã°ããããšã¯ã«ãã£ãŠæ±ºå®ãããŸã
--with-ld æ§æãªãã·ã§ã³ãGCCã®ããã°ã©ã æ€çŽ¢ãã¹ããããŠæåŸã«ãŠãŒã¶ãŒã® ãã¹.
GCCã§äœ¿çšããããªã³ã«ãŒã¯ã which `gcc -print-prog-name = ld`ã ãã®
ãªãã·ã§ã³ã¯ã64ãããHP-UX GCCã§ã®ã¿äœ¿çšã§ããŸããã€ãŸãã
hppa * 64 *-*-hpux *.
-mhp-ld
HPã«åºæã®ãªãã·ã§ã³ã䜿çšãã ldã ããã¯åæ Œã§ã -b ããž ld å ±æã©ã€ãã©ãªãæ§ç¯ãããšã
ãšãã¹ +åãå ¥ãã åã®äžäžèŽ ããž ld ãã¹ãŠã®ãªã³ã¯ã§ã GCCã
HPãªã³ã«ãŒã䜿çšããŠãæ瀺çãŸãã¯æé»çã«æ§æãããŸãã ãã®ãªãã·ã§ã³ã¯åœ±é¿ããŸãã
which ld ãšåŒã°ããŸãã æž¡ããããã©ã¡ãŒã¿ãå€æŽããã ãã§ã ldãéžæããŸãã ld
ãšåŒã°ããããšã¯ã«ãã£ãŠæ±ºå®ãããŸã --with-ld æ§æãªãã·ã§ã³ãGCCã®ããã°ã©ã æ€çŽ¢
ãã¹ããããŠæåŸã«ãŠãŒã¶ãŒã® ãã¹ã GCCã§äœ¿çšããããªã³ã«ãŒã¯ã
which `gcc -print-prog-name = ld`ã ãã®ãªãã·ã§ã³ã¯ã64ãããHP-UXã§ã®ã¿äœ¿çšã§ããŸã
GCCãã€ãŸã hppa * 64 *-*-hpux *.
-mlong-calls
é·ãåŒã³åºãã·ãŒã±ã³ã¹ã䜿çšããã³ãŒããçæããŸãã ããã«ãããé話ãåžžã«å¯èœã«ãªããŸã
ãªã³ã«ãŒã§çæãããã¹ã¿ãã«å°éããŸãã ããã©ã«ãã§ã¯ã次ã®å Žåã«ã®ã¿é·ãåŒã³åºããçæãããŸãã
åŒã³åºããµã€ãããé¢æ°ãŸãã¯å€æãŠãããã®å é ãŸã§ã®è·é¢ã
å Žåã«ãã£ãŠã¯ã䜿çšãããŠãããã©ã³ãã¿ã€ãã«ãã£ãŠèšå®ãããäºåå®çŸ©ãããå¶éãè¶ ããŠããŸãã The
éåžžã®é話ã®å¶éã¯ãPA7,600,000ã§ãããã240,000ãã€ããš2.0ãã€ãã§ãã
ããã³PA1.Xã¢ãŒããã¯ãã£ã Sibcallã¯åžžã«240,000ãã€ãã«å¶éãããŠããŸãã
è·é¢ã¯ãé¢æ°ã®æåãã枬å®ãããŸãã
-æ©èœ-ã»ã¯ã·ã§ã³ ãªãã·ã§ã³ããŸãã¯äœ¿çšããå Žå -ã¡ã¬ã¬ã¹ ãš -mno-ããŒã¿ãã«-ã©ã³ã¿ã€ã ãªãã·ã§ã³
HP-UXã§SOMãªã³ã«ãŒã䜿çšããŠäžç·ã«ã
éåžžããã®ãªãã·ã§ã³ã䜿çšãããšããã©ãŒãã³ã¹ãäœäžããããããã®ãªãã·ã§ã³ã䜿çšããããšã¯æãŸãããããŸããã ã§ãã
ããã¯ã倧èŠæš¡ãªã¢ããªã±ãŒã·ã§ã³ã§ãç¹ã«éšåçãªãªã³ã¯ã䜿çšããŠ
ã¢ããªã±ãŒã·ã§ã³ããã«ãããŸãã
䜿çšãããé·ãåŒã³åºãã®ã¿ã€ãã¯ãã¢ã»ã³ãã©ãŒãšãªã³ã«ãŒã®æ©èœã«ãã£ãŠç°ãªããŸãã
çæãããã³ãŒãã®ã¿ã€ãã é·ããµããŒãããã·ã¹ãã ãžã®åœ±é¿
絶察åŒã³åºããããã³é·ãpicã·ã³ãã«å·®åãŸãã¯pcçžå¯ŸåŒã³åºãã¯
æ¯èŒçå°ããã ãã ããéæ¥åŒã³åºãã¯ãPICã³ãŒãã®32ãããELFã·ã¹ãã ã§äœ¿çšãããŸã
ãããŠããã¯ããªãé·ãã§ãã
-munix =unix-std
ã³ã³ãã€ã©ã®äºåå®çŸ©ãçæããæå®ãããUNIXæšæºã®éå§ãã¡ã€ã«ãéžæããŸãã
ã®éžæè¢ unix-std ã 93, 95 ãš 98. 93 ãã¹ãŠã®HP-UXããŒãžã§ã³ã§ãµããŒããããŠããŸãã
95 HP-UX10.10以éã§äœ¿çšã§ããŸãã 98 HP-UX11.11以éã§äœ¿çšã§ããŸãã
ããã©ã«ãå€ã¯ 93 HP-UX 10.00ã®å Žåã 95 HP-UX 10.10ãã11.00ãŸã§ãããã³ 98
HP-UX11.11以éã®å Žåã
-munix = 93 GCC3.3ããã³3.4ââãšåãäºåå®çŸ©ãæäŸããŸãã -munix = 95 ã¯ã倧éªã§
ãXOPEN_UNIXããšã_XOPEN_SOURCE_EXTENDEDãã®è¿œå ã®äºåå®çŸ©ãããã³ã¹ã¿ãŒããã¡ã€ã«
unix95.o. -munix = 98 ã_XOPEN_UNIXãã®è¿œå ã®äºåå®çŸ©ãæäŸããŸãã
"_XOPEN_SOURCE_EXTENDED"ã "_ INCLUDE__STDC_A1_SOURCE"ããã³"_INCLUDE_XOPEN_SOURCE_500"ã
ããã³startfile unix98.o.
ããã¯ã éèŠ ãã®ãªãã·ã§ã³ã¯ãããŸããŸãªã©ã€ãã©ãªã®ã€ã³ã¿ãŒãã§ã€ã¹ãå€æŽããããšã«æ³šæããŠãã ãã
ã«ãŒãã³ã ãŸããCã©ã€ãã©ãªã®åäœã«ã圱é¿ããŸãã ãããã£ãŠã 極端ãª
ãã®ãªãã·ã§ã³ã®äœ¿çšã«ã¯æ³šæãå¿ èŠã§ãã
è€æ°ã®UNIXæšæºã§åäœããããšãç®çãšããã©ã€ãã©ãªã³ãŒãã¯ããã¹ãããå¿ èŠããããŸãã
å€æ°ã®èšå®ãšåŸ©å __xpg4_extended_mask é©åã«ã ã»ãšãã©ã® GNU ãœãããŠã§ã¢
ãã®æ©èœã¯æäŸããŠããŸããã
-nolibdld
次ã®å Žåã«libdld.slãæ€çŽ¢ããããã®ãªã³ã¯ãªãã·ã§ã³ã®çæãæå¶ããŸãã -éç ãªãã·ã§ã³ããã
HP-UX10以éã§æå®ãããŠããŸãã
-éç
libcã§ã®setlocaleã®HP-UXå®è£ ã¯ãlibdld.slã«äŸåããŠããŸãã ããã«ã¯
libdld.slã®ã¢ãŒã«ã€ãããŒãžã§ã³ã§ã¯ãããŸããã ãããã£ãŠã -éç ãªãã·ã§ã³ãæå®ãããŠããã
ãã®äŸåé¢ä¿ã解決ããã«ã¯ãç¹å¥ãªãªã³ã¯ãªãã·ã§ã³ãå¿ èŠã§ãã
HP-UX 10以éã§ã¯ãGCCãã©ã€ããŒã¯ãªã³ã¯ã«å¿ èŠãªãªãã·ã§ã³ãè¿œå ããŸã
libdld.slã®å Žå -éç ãªãã·ã§ã³ãæå®ãããŠããŸãã ããã«ãããçµæã®ãã€ããªã¯æ¬¡ã®ããã«ãªããŸãã
ãã€ãããã¯ã§ããããšã 64ãããããŒãã§ã¯ããªã³ã«ã¯ããã©ã«ãã§åçãã€ããªãçæããŸãã
ãšã«ããã The -nolibdld ãªãã·ã§ã³ã䜿çšããŠãGCCãã©ã€ããŒãè¿œå ãããªãããã«ããããšãã§ããŸã
ãããã®ãªã³ã¯ãªãã·ã§ã³ã
-ã¹ã¬ãã
ãã«ãã¹ã¬ããã®ãµããŒããè¿œå ããŸã DCE 糞 HP-UXã®ã©ã€ãã©ãªã ãã®ãªãã·ã§ã³
ããªããã»ããµãšãªã³ã«ã®äž¡æ¹ã«ãã©ã°ãèšå®ããŸãã
ã€ã³ãã« 386 ãš AMD x86-64 ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãi386 ããã³ x86-64 ãã¡ããªãŒã®ã³ã³ãã¥ãŒã¿ãŒçšã«å®çŸ©ãããŠããŸãã
-XNUMXæ=CPUã¿ã€ã
ãã·ã³ã¿ã€ãã®åœä»€ãçæãã CPUã¿ã€ãã ãšã¯å¯Ÿç §çã« -mtune =CPUã¿ã€ã,
ããã¯ãçæãããã³ãŒããæå®ããããã®ã«åãããŠèª¿æŽããã ãã§ãã CPUã¿ã€ã, -XNUMXæ=CPUã¿ã€ã
GCCããXNUMXã€ä»¥å€ã®ããã»ããµã§ã¯ãŸã£ããå®è¡ãããªãå¯èœæ§ã®ããã³ãŒããçæã§ããããã«ããŸã
瀺ãããŠããŸãã æå®ãã -XNUMXæ=CPUã¿ã€ã å«æãã -mtune =CPUã¿ã€ã.
ã®éžæè¢ CPUã¿ã€ã ã«ã¯æ¬¡ã®å€ããããŸã:
ãã€ãã£ã
ããã«ãããã³ã³ãã€ã«æã«ã³ãŒããçæããCPUãéžæããã
ã³ã³ãã€ã«ãã·ã³ã®ããã»ããµã¿ã€ãã 䜿çšãã -march=ãã€ãã£ã ãã¹ãŠãæå¹ã«ããŸã
ããŒã«ã«ãã·ã³ã§ãµããŒããããŠããåœä»€ãµãã»ããïŒãããã£ãŠãçµæãå®è¡ãããªãå¯èœæ§ããããŸã
å¥ã®ãã·ã³ã§ïŒã 䜿çšãã -mtune = native ããŒã«ã«çšã«æé©åãããã³ãŒããçæããŸã
éžæããåœä»€ã»ããã®å¶çŽäžã«ãããã·ã³ã
i386
ãªãªãžãã«ã®Inteli386CPUã
i486
Inteli486CPUã ïŒãã®ãããã«ã¯ã¹ã±ãžã¥ãŒãªã³ã°ã¯å®è£ ãããŠããŸãããïŒ
i586
ãã³ãã£ã¢ã
MMXããµããŒãããŠããªãIntelPentiumCPUã
ãã³ãã£ã¢ã -mmx
Intel Pentium MMX CPUãMMXåœä»€ã»ããããµããŒãããPentiumã³ã¢ã«åºã¥ããŠããŸãã
ãã³ãã£ã¢ã ãã
IntelPentiumProCPUã
i686
ãšäžç·ã«äœ¿çšããå Žå -è¡é²ãPentium Proåœä»€ã»ããã䜿çšãããŠãããããã³ãŒãã¯å®è¡ãããŸã
ãã¹ãŠã®i686ãã¡ããªãŒãããã äžç·ã«äœ¿çšããå Žå -ã ãã¥ãŒã³ãããã¯ãšåãæå³ãæã£ãŠããŸã
ãžã§ããªãã¯.
ãã³ãã£ã¢ã 2
Intel Pentium II CPUãMMXåœä»€ã»ããããµããŒãããPentiumProã³ã¢ã«åºã¥ããŠããŸãã
ãã³ãã£ã¢ã 3
ãã³ãã£ã¢ã 3m
Intel Pentium III CPUãMMXããã³SSEåœä»€ã»ãããåããPentiumProã³ã¢ã«åºã¥ã
ãµããŒãã
ãã³ãã£ã¢ã -m
Intel Pentium M; MMXãSSEãSSE2ãæèŒããIntel PentiumIIICPUã®äœé»åããŒãžã§ã³
åœä»€ã»ããã®ãµããŒãã CentrinoããŒãããã¯ã§äœ¿çšãããŸãã
ãã³ãã£ã¢ã 4
ãã³ãã£ã¢ã 4m
MMXãSSEãããã³SSE4åœä»€ã»ããããµããŒãããIntel Pentium2CPUã
ãã¬ã¹ã³ãã
MMXãSSEãSSE4ãããã³SSE2åœä»€ãåããIntel Pentium3CPUã®æ¹è¯ç
ãµããŒããèšå®ããŸãã
ãã³ã
4ãããæ¡åŒµæ©èœãMMXãSSEãSSE64ãããã³
SSE3åœä»€ã»ããã®ãµããŒãã
core2
2ãããæ¡åŒµæ©èœãåããIntelCore64 CPUãMMXãSSEãSSE2ãSSE3ãSSSE3
åœä»€ã»ããã®ãµããŒãã
ããã¬ã
64ãããæ¡åŒµæ©èœãåããIntelNehalemCPUãMMXãSSEãSSE2ãSSE3ãSSSE3ãSSE4.1ã
SSE4.2ããã³POPCNTåœä»€ã»ããã®ãµããŒãã
ãŠã§ã¹ãã¡ã¢
64ãããæ¡åŒµæ©èœãåããIntelWestmereCPUãMMXãSSEãSSE2ãSSE3ãSSSE3ãSSE4.1ã
SSE4.2ãPOPCNTãAESãããã³PCLMULåœä»€ã»ããã®ãµããŒãã
ãµã³ãã£ããªããž
64ãããæ¡åŒµæ©èœãåããIntelSandyBridge CPUãMMXãSSEãSSE2ãSSE3ãSSSE3ã
SSE4.1ãSSE4.2ãPOPCNTãAVXãAESãããã³PCLMULåœä»€ã»ããã®ãµããŒãã
ã¢ã€ããŒããªããž
64ãããæ¡åŒµæ©èœãåããIntelIvyBridge CPUãMMXãSSEãSSE2ãSSE3ãSSSE3ãSSE4.1ã
SSE4.2ãPOPCNTãAVXãAESãPCLMULãFSGSBASEãRDRNDãããã³F16Cåœä»€ã»ãã
ãµããŒãã
ãã¹ãŠã§ã«
64ãããæ¡åŒµæ©èœãåããIntelHaswellCPUãMOVBEãMMXãSSEãSSE2ãSSE3ãSSSE3ã
SSE4.1ãSSE4.2ãPOPCNTãAVXãAVX2ãAESãPCLMULãFSGSBASEãRDRNDãFMAãBMIãBMI2
ããã³F16Cåœä»€ã»ããã®ãµããŒãã
Broadwell
64ãããæ¡åŒµæ©èœãåããIntelBroadwellCPUãMOVBEãMMXãSSEãSSE2ãSSE3ãSSSE3ã
SSE4.1ãSSE4.2ãPOPCNTãAVXãAVX2ãAESãPCLMULãFSGSBASEãRDRNDãFMAãBMIãBMI2ã
F16CãRDSEEDãADCXãããã³PREFETCHWåœä»€ã»ããã®ãµããŒãã
ãã³ãã«
64ãããæ¡åŒµæ©èœãåããIntelBonnellCPUãMOVBEãMMXãSSEãSSE2ãSSE3ãSSSE3
åœä»€ã»ããã®ãµããŒãã
ã·ã«ããŒã¢ã³ã
64ãããæ¡åŒµæ©èœãåããIntelSilvermontCPUãMOVBEãMMXãSSEãSSE2ãSSE3ãSSSE3ã
SSE4.1ãSSE4.2ãPOPCNTãAESãPCLMULãããã³RDRNDåœä»€ã»ããã®ãµããŒãã
k6 MMXåœä»€ã»ããããµããŒãããAMDK6CPUã
k6-2
k6-3
MMXããã³6DNowãæèŒããAMDK3CPUã®æ¹è¯çïŒ åœä»€ã»ããã®ãµããŒãã
ã¢ã¹ãã³
ã¢ã¹ãã³ã»ãããŒã
AMD Athlon CPUãMMXã3dNOWïŒãæ¡åŒµ3DNowïŒ ããã³SSEããªãã§ããåœä»€
ãµããŒãã
ã¢ã¹ãã³-4
ã¢ã¹ãã³-XP
ã¢ã¹ãã³MP
MMXã3DNowïŒãæ¡åŒµ3DNowïŒãåããæ¹è¯ãããAMD Athlon CPU ããã³å®å šãªSSEåœä»€
ãµããŒããèšå®ããŸãã
k8
ãªãããã³
ã¢ã¹ãã³64
ã¢ã¹ãã³FX
x8-86åœä»€ã»ããããµããŒãããAMDK64ã³ã¢ã«åºã¥ãããã»ããµã
AMD OpteronãAthlon 64ãããã³Athlon64FXããã»ããµã ïŒããã¯MMXãã¹ãŒããŒã»ããããŸãã
SSEãSSE2ã3DNowïŒãæ¡åŒµ3DNowïŒ ããã³64ãããåœä»€ã»ããæ¡åŒµãïŒ
k8-sse3
ãªãããã³-sse3
athlon64-sse3
SSE8åœä»€ã»ããããµããŒãããAMDK3ã³ã¢ã®æ¹è¯çã
ã¢ã ãã¡ã 10
ãã«ã»ãã
x10-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ã«åºã¥ãCPUã ïŒãã
ã¹ãŒããŒã»ããMMXãSSEãSSE2ãSSE3ãSSE4Aã3DNowïŒãæ¡åŒµ3DNowïŒãABMã64ããã
åœä»€ã»ããæ¡åŒµãïŒ
BDver1
x15-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ã«åºã¥ãCPUã ïŒãã
ã¹ãŒããŒã»ããFMA4ãAVXãXOPãLWPãAESãPCL_MULãCX16ãMMXãSSEãSSE2ãSSE3ãSSE4Aã
SSSE3ãSSE4.1ãSSE4.2ãABMãããã³64ãããåœä»€ã»ããæ¡åŒµãïŒ
BDver2
x15-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ããŒã¹ã®CPUã ïŒãã
ã¹ãŒããŒã»ããBMIãTBMãF16CãFMAãFMA4ãAVXãXOPãLWPãAESãPCL_MULãCX16ãMMXãSSEã
SSE2ãSSE3ãSSE4AãSSSE3ãSSE4.1ãSSE4.2ãABMããã³64ãããåœä»€ã»ãã
æ¡åŒµæ©èœãïŒ
BDver3
x15-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ããŒã¹ã®CPUã ïŒãã
ã¹ãŒããŒã»ããBMIãTBMãF16CãFMAãFMA4ãFSGSBASEãAVXãXOPãLWPãAESãPCL_MULãCX16ã
MMXãSSEãSSE2ãSSE3ãSSE4AãSSSE3ãSSE4.1ãSSE4.2ãABMããã³64ãããåœä»€ã»ãã
æ¡åŒµæ©èœ
BDver4
x15-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ããŒã¹ã®CPUã ïŒãã
ã¹ãŒããŒã»ããBMIãBMI2ãTBMãF16CãFMAãFMA4ãFSGSBASEãAVXãAVX2ãXOPãLWPãAESã
PCL_MULãCX16ãMOVBEãMMXãSSEãSSE2ãSSE3ãSSE4AãSSSE3ãSSE4.1ãSSE4.2ãABMããã³
64ãããåœä»€ã»ããæ¡åŒµã
btver1
x14-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ã«åºã¥ãCPUã ïŒãã
ã¹ãŒããŒã»ããMMXãSSEãSSE2ãSSE3ãSSSE3ãSSE4AãCX16ãABMããã³64ãããåœä»€ã»ãã
æ¡åŒµæ©èœãïŒ
btver2
x16-86åœä»€ã»ããããµããŒãããAMDãã¡ããªãŒ64hã³ã¢ã«åºã¥ãCPUã ãã
MOVBEãF16CãBMIãAVXãPCL_MULãAESãSSE4.2ãSSE4.1ãCX16ãABMãSSE4Aã
SSSE3ãSSE3ãSSE2ãSSEãMMXãããã³64ãããåœä»€ã»ããæ¡åŒµã
ãŠã£ã³ããã-C6
IDT WinChip C6 CPUãè¿œå ã®MMXåœä»€ã»ããã䜿çšããŠi486ãšåãããã«åŠçãããŸã
ãµããŒãã
ãŠã£ã³ããã2
IDT WinChip 2 CPUãè¿œå ã®MMXãš486DNowãåããi3ãšåãããã«åŠçãããŸãïŒ
åœä»€ã»ããã®ãµããŒãã
c3 MMXããã³3DNowãæèŒããVIAC3CPUïŒ åœä»€ã»ããã®ãµããŒãã ïŒã¹ã±ãžã¥ãŒã«ã¯ãããŸãã
ãã®ãããã«å®è£ ãããŠããŸããïŒ
c3-2
VIA C3-2ïŒNehemiah / C5XLïŒCPUãMMXããã³SSEåœä»€ã»ããããµããŒãã ïŒããã
ãã®ãããã«ã¯ã¹ã±ãžã¥ãŒãªã³ã°ãå®è£ ãããŠããŸããïŒ
ãžãªãŒã
MMXããã³3DNowãæèŒããAMDGeodeçµã¿èŸŒã¿ããã»ããµïŒ åœä»€ã»ããã®ãµããŒãã
-mtune =CPUã¿ã€ã
ã«èª¿æŽãã CPUã¿ã€ã ABIãé€ããçæãããã³ãŒãã«è©²åœãããã¹ãŠã®ãã®
ããã³å©çšå¯èœãªåœä»€ã®ã»ããã ç¹å®ã®ãã®ãéžãã§ããé CPUã¿ã€ã ã¹ã±ãžã¥ãŒã«
ãã®ç¹å®ã®ãããã«é©åãªãã®ãã³ã³ãã€ã©ã¯ã³ãŒããçæããŸãã
ã䜿çšããªãéããããã©ã«ãã®ãã·ã³ã¿ã€ãã§ã¯å®è¡ã§ããŸãã -XNUMXæ=CPUã¿ã€ã ãªãã·ã§ã³ãéžæããŸãã
ããšãã°ãGCCãi686-pc-linux-gnuçšã«æ§æãããŠããå Žåã -mtune = pentium4 çæ
Pentium 4çšã«èª¿æŽãããŠããããi686ãã·ã³ã§å®è¡ãããã³ãŒãã
ã®éžæè¢ CPUã¿ã€ã ãšåãã§ã -è¡é²ã å ããŠã -ã ãã¥ãŒã³ 2ããµããŒã
ã®ããã®è¿œå ã®éžæè¢ CPUã¿ã€ã:
ãžã§ããªãã¯
æãäžè¬çãªIA32/AMD64/EM64Tããã»ããµçšã«æé©åãããã³ãŒããçæããŸãã ããããããã
ã³ãŒããå®è¡ãããCPUãç¥ã£ãŠããå Žåã¯ã察å¿ããCPUã䜿çšããå¿ èŠããããŸã
-ã ãã¥ãŒã³ or -è¡é² ãªãã·ã§ã³ã®ä»£ããã« -mtune = genericã ããããããªããç¥ããªãå Žå
ã¢ããªã±ãŒã·ã§ã³ã®CPUãŠãŒã¶ãŒãæ£ç¢ºã«äœãæã£ãŠãããããããŠããã䜿çšããå¿ èŠããããŸã
ãªãã·ã§ã³ãéžæããŸãã
æ°ããããã»ããµãåžå Žã«å°å ¥ããããšããã®ãªãã·ã§ã³ã®åäœ
å€æŽãããŸãã ãããã£ãŠãæ°ããããŒãžã§ã³ã®GCCã«ã¢ããã°ã¬ãŒãããå Žåã¯ãã³ãŒãçæ
ãã®ãªãã·ã§ã³ã§å¶åŸ¡ãããã®ã¯ãæãå€ãããã»ããµãåæ ããããã«å€æŽãããŸã
GCCã®ããŒãžã§ã³ããªãªãŒã¹ãããæç¹ã§äžè¬çã§ãã
ãªã -march = generic ãªãã·ã§ã³ã®ãã -è¡é² åœä»€ã»ããã瀺ããŸã
ã³ã³ãã€ã©ã¯äœ¿çšã§ãããã¹ãŠã«é©çšã§ããæ±çšåœä»€ã»ããã¯ãããŸãã
ããã»ããµã å¯Ÿç §çã«ã -ã ãã¥ãŒã³ ããã»ããµã瀺ããŸãïŒãŸãã¯ããã®å Žåã¯ã
ã³ãŒããæé©åãããŠããããã»ããµã®ã³ã¬ã¯ã·ã§ã³ïŒã
ã€ã³ãã«
Haswellã§ããææ°ã®Intelããã»ããµçšã«æé©åãããã³ãŒããçæãã
ãã®ããŒãžã§ã³ã®GCCã®å Žåã¯Silvermontã ã³ãŒããã€ã³ã¹ããŒã«ãããŠããCPUãããã£ãŠããå Žå
ãå®è¡ããããã察å¿ããã䜿çšããå¿ èŠããããŸã -ã ãã¥ãŒã³ or -è¡é² ãªãã·ã§ã³ã®ä»£ããã«
-mtune = intelã ãã ããã¢ããªã±ãŒã·ã§ã³ã®ããã©ãŒãã³ã¹ãäž¡æ¹ã®Haswellã§åäžããããå Žå
ããã³Silvermontã®å Žåã¯ããã®ãªãã·ã§ã³ã䜿çšããå¿ èŠããããŸãã
æ°ããIntelããã»ããµãåžå Žã«å°å ¥ããããšããã®åäœã¯
ãªãã·ã§ã³ãå€æŽãããŸãã ãããã£ãŠãæ°ããããŒãžã§ã³ã®GCCã«ã¢ããã°ã¬ãŒãããå Žåã¯ã次ã®ããã«ã³ãŒãã£ã³ã°ããŠãã ããã
ãã®ãªãã·ã§ã³ã§å¶åŸ¡ãããäžä»£ã¯ãææ°ã®Intelãåæ ããããã«å€æŽãããŸã
GCCã®ããŒãžã§ã³ããªãªãŒã¹ãããæç¹ã®ããã»ããµã
ãªã -march = intel ãªãã·ã§ã³ã®ãã -è¡é² åœä»€ã»ããã瀺ããŸã
ã³ã³ãã€ã©ã¯äœ¿çšã§ãããã¹ãŠã«é©çšã§ããå ±éã®åœä»€ã»ããã¯ãããŸãã
ããã»ããµã å¯Ÿç §çã«ã -ã ãã¥ãŒã³ ããã»ããµã瀺ããŸãïŒãŸãã¯ããã®å Žåã¯ã
ã³ãŒããæé©åãããŠããããã»ããµã®ã³ã¬ã¯ã·ã§ã³ïŒã
-mcpu =CPUã¿ã€ã
éæšå¥šã®åçŸ©èª -ã ãã¥ãŒã³.
-mfpmath =åäœ
éžæãããŠãããã®æµ®åå°æ°ç¹æŒç®ãçæããŸã åäœã ã®éžæè¢ åäœ ã«ã¯æ¬¡ã®å€ããããŸã:
387 倧éšåã®ãããã«ååšããæšæºã®387æµ®åå°æ°ç¹ã³ããã»ããµã䜿çšããŸã
ãã以å€ã®å Žåã¯ãšãã¥ã¬ãŒãããŸãã ãã®ãªãã·ã§ã³ã§ã³ã³ãã€ã«ãããã³ãŒãã¯ãã»ãšãã©ãã¹ãŠã®å Žæã§å®è¡ãããŸãã
äžæçãªçµæã¯ã粟床ã§ã¯ãªã80ãããã®ç²ŸåºŠã§èšç®ãããŸã
ã¿ã€ãã«ãã£ãŠæå®ãããã»ãšãã©ã®å Žåãšæ¯èŒããŠãããã«ç°ãªãçµæã«ãªããŸã
ä»ã®ãããã èŠã -ãããŒãã¹ã㢠詳现ã«ã€ããŠã¯ã
ããã¯ãi386 ã³ã³ãã€ã©ã®ããã©ã«ãã®éžæã§ãã
SSE SSEåœä»€ã»ããã«ååšããã¹ã«ã©ãŒæµ®åå°æ°ç¹åœä»€ã䜿çšããŸãã ãã
åœä»€ã»ããã¯ãPentium III以éã®ããããããã³AMDã©ã€ã³ã§ãµããŒããããŠããŸã
Athlon-4ãAthlon XPãAthlonMPãããã«ããã SSEã®ä»¥åã®ããŒãžã§ã³
åœä»€ã»ããã¯å粟床æŒç®ã®ã¿ããµããŒãããŠãããããdoubleãš
æ¡åŒµç²ŸåºŠæŒç®ã¯åŒãç¶ã387ã䜿çšããŠå®è¡ãããŸããæ°ããããŒãžã§ã³ãååšããŸã
Pentium4ããã³AMDx86-64ãããã§ã®ã¿ãå粟床æŒç®ããµããŒãããŸãã
i386 ã³ã³ãã€ã©ã®å Žåã¯ã次ã䜿çšããå¿ èŠããããŸã -XNUMXæ=CPUã¿ã€ã, -mse or -msse2 ã«åãæ¿ãã
SSEæ¡åŒµæ©èœãæå¹ã«ããŠããã®ãªãã·ã§ã³ãæå¹ã«ããŸãã x86-64ã³ã³ãã€ã©ã®å Žåã
ãããã®æ¡åŒµæ©èœã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
çµæã®ã³ãŒãã¯ãã»ãšãã©ã®å Žåãããªãé«éã«ãªãã¯ãã§ãã
387ã³ãŒãã®æ°å€çäžå®å®æ§ã®åé¡ãåé¿ããŸãããæ¢åã®ã³ãŒããå£ãå¯èœæ§ããããŸã
äžæçãªãã®ã80ãããã§ããããšãæåŸ ããã³ãŒãã
ããã¯ãx86-64ã³ã³ãã€ã©ã®ããã©ã«ãã®éžæã§ãã
sseã387
sse + 387
äž¡èšèªã§
äž¡æ¹ã®åœä»€ã»ãããåæã«å©çšããŠã¿ãŠãã ããã ããã«ãããå¹æçã«XNUMXåã«ãªããŸã
䜿çšå¯èœãªã¬ãžã¹ã¿ã®éãããã³387ã®åå¥ã®å®è¡ãŠããããåããããã
å®è¡ãªãœãŒã¹ãSSEããŸãã ãã®ãªãã·ã§ã³ã¯ãŸã 䜿çšãããŠããããã泚æããŠäœ¿çšããŠãã ãã
GCCã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã¯åå¥ã«ã¢ãã«åãããªããããå®éšç
æ©èœãŠããããè¯å¥œã§ãããããããã©ãŒãã³ã¹ãäžå®å®ã«ãªããŸãã
-masm =æ¹èš
éžæãããã®ã䜿çšããŠã¢ã»ã³ããªåœä»€ãåºåãã æ¹èš. ãµããŒããããŠããéžæè¢ã¯ ã€ã³ãã« or
ãž ïŒããã©ã«ãïŒã ããŒãŠã£ã³ã¯æ¯æããªã ã€ã³ãã«.
-mieee-fp
-mno-ieee-fp
ã³ã³ãã€ã©ãIEEEæµ®åå°æ°ç¹æ¯èŒã䜿çšãããã©ãããå¶åŸ¡ããŸãã ãããã¯
æ¯èŒã®çµæãé åºä»ããããŠããªãå Žåãæ£ããåŠçããŸãã
-msoft-float
æµ®åå°æ°ç¹ã®ã©ã€ãã©ãªåŒã³åºããå«ãåºåãçæããŸãã
èŠåïŒ å¿ èŠãªã©ã€ãã©ãªã¯GCCã®äžéšã§ã¯ãããŸããã éåžžã
ãã·ã³ã®éåžžã®Cã³ã³ãã€ã©ã䜿çšãããŸããããããã¯ãã¹ã§çŽæ¥å®è¡ããããšã¯ã§ããŸããã
ã³ã³ãã€ã«ã é©åãªã©ã€ãã©ãªãæäŸããã«ã¯ãç¬èªã®æé ãè¡ãå¿ èŠããããŸã
ã¯ãã¹ã³ã³ãã€ã«ã®ããã®é¢æ°ã
é¢æ°ãæµ®åå°æ°ç¹ãè¿ããã·ã³ã§ã¯ã80387ã¬ãžã¹ã¿ã«ãªããŸã
ã¹ã¿ãã¯ãäžéšã®æµ®åå°æ°ç¹ãªãã³ãŒãã¯ã -msoft-float 䜿çšãããŠããã
-mno-fp-ret-in-387
é¢æ°ã®æ»ãå€ã«FPUã¬ãžã¹ã¿ã䜿çšããªãã§ãã ããã
éåžžã®åŒã³åºãèŠçŽã«ã¯ããfloatãåãšãdoubleãåã®é¢æ°ã®æ»ãå€ããããŸãã
FPUããªãå Žåã§ããFPUã¬ãžã¹ã¿ã«ãããŸãã ã¢ã€ãã¢ã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã
FPUããšãã¥ã¬ãŒãããå¿ èŠããããŸãã
ãªãã·ã§ã³ -mno-fp-ret-in-387 ãã®ãããªå€ã¯éåžžã®CPUã§è¿ãããŸã
代ããã«ç»é²ããŸãã
-mno-ãã¡ã³ã·ãŒ-æ°åŠ-387
äžéšã®387ãšãã¥ã¬ãŒã¿ã¯ããsinãããcosããããã³ãsqrtãåœä»€ããµããŒãããŠããŸããã
387.ãããã®åœä»€ãçæãããªãããã«ããã«ã¯ããã®ãªãã·ã§ã³ãæå®ããŸãã ãã®ãªãã·ã§ã³ã¯
FreeBSDãOpenBSDãããã³ NetBSD ã®ããã©ã«ãã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ãªãŒããŒã©ã€ããããŸãã -è¡é²
ã¿ãŒã²ããCPUã«ã¯åžžã«FPUããããããåœä»€ã¯å¿ èŠãªãããšã瀺ããŸã
ãšãã¥ã¬ãŒã·ã§ã³ã ã䜿çšããªãéãããããã®åœä»€ã¯çæãããŸããã
-funsafe-æ°åŠã®æé©å ã¹ã€ããã
-æªæ§-ããã«
-mno-align-double
GCCããdoubleãããlong doubleããããã³ãlonglongãå€æ°ãæŽåãããã©ãããå¶åŸ¡ããŸãã
XNUMXã¯ãŒãã®å¢çãŸãã¯XNUMXã¯ãŒãã®å¢çã ãdoubleãå€æ°ãXNUMXã¯ãŒãã«æãã
å¢çã¯ãPentiumäžã§ããããé«éã«å®è¡ãããã³ãŒããçæããŸãããããå€ãã®è²»çšãããããŸã
ã¡ã¢ãªã
x86-64ã§ã¯ã -æªæ§-ããã« ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
èŠåïŒ ããªãã䜿çšããå Žå -æªæ§-ããã« ã¹ã€ãããäžèšã®ã¿ã€ããå«ãæ§é
å ¬éãããŠããã¢ããªã±ãŒã·ã§ã³ã®ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ä»æ§ãšã¯ç°ãªãæ¹æ³ã§é 眮ãããŸã
386 çšã§ãããXNUMX ãªãã§ã³ã³ãã€ã«ãããã³ãŒãã®æ§é äœãšã¯ãã€ããªäºæã§ã¯ãããŸããã
ãã®ã¹ã€ããã
-m96bit-long-double
-m128bit-long-double
ãããã®ã¹ã€ããã¯ããlong doubleãã¿ã€ãã®ãµã€ãºãå¶åŸ¡ããŸãã i386 ã¢ããªã±ãŒã·ã§ã³ ãã€ããª
ã€ã³ã¿ãŒãã§ã€ã¹ã¯ãµã€ãºã96ãããã«æå®ããŠããããã -m96bit-long-double ã®ããã©ã«ãã§ã
32ãããã¢ãŒãã
çŸä»£ã®ã¢ãŒããã¯ãã£ïŒPentium以éïŒã¯ãããã³ã°ããã«ãã8ã«æããããšã奜ã¿ãŸãã
ãŸãã¯16ãã€ãå¢çã ABIã«æºæ ããã¢ã¬ã€ãŸãã¯æ§é ã§ã¯ãããã¯ããã§ã¯ãããŸãã
å¯èœã ãããã£ãŠãæå®ãã -m128bit-long-double ãlongdoubleãã16ãã€ãã«æããŸã
ãlongdoubleãã«è¿œå ã®32ããããŒããããã£ã³ã°ããããšã«ããå¢çã
x86-64ã³ã³ãã€ã©ã§ã¯ã -m128bit-long-double ABIãšããŠã®ããã©ã«ãã®éžæã§ã
ãlongdoubleãã16ãã€ãå¢çã«æŽåãããããšãæå®ããŸãã
ãããã®ãªãã·ã§ã³ã¯ã©ã¡ãããx87æšæºãè¶ ãã粟床ãå®çŸããŠããªãããšã«æ³šæããŠãã ããã
ããã³ã°ããã«ãã®å Žåã¯80ãããã
èŠåïŒ ã¿ãŒã²ããABIã®ããã©ã«ãå€ãäžæžããããšããµã€ãºãå€æŽãããŸã
ãlongdoubleãå€æ°ãå«ãæ§é äœãšé åã®
ãlongdoubleããåãé¢æ°ã®é¢æ°åŒã³åºãèŠçŽã ãããã£ãŠã圌ãã¯ããã§ã¯ãããŸãã
ãã®ã¹ã€ãããªãã§ã³ã³ãã€ã«ãããã³ãŒããšãã€ããªäºæã
-mlong-double-64
-mlong-double-80
-mlong-double-128
ãããã®ã¹ã€ããã¯ãããã³ã°ããã«ãã¿ã€ãã®ãµã€ãºãå¶åŸ¡ããŸãã 64ãããã®ãµã€ãºã¯
ãdoubleãã¿ã€ããšåçã®ãlongdoubleãã¿ã€ãã ããã¯32ãããã®ããã©ã«ãã§ã
ãã€ãªããã¯Cã©ã€ãã©ãªã 128ãããã®ãµã€ãºã¯ããlongdoubleãã¿ã€ãã
ã__float128ãã¿ã€ãã ããã¯ã64ãããã®BionicCã©ã€ãã©ãªã®ããã©ã«ãã§ãã
èŠåïŒ ã¿ãŒã²ããABIã®ããã©ã«ãå€ãäžæžããããšããµã€ãºãå€æŽãããŸã
ãlongdoubleãå€æ°ãå«ãæ§é äœãšé åã®
ãlongdoubleããåãé¢æ°ã®é¢æ°åŒã³åºãèŠçŽã ãããã£ãŠã圌ãã¯ããã§ã¯ãããŸãã
ãã®ã¹ã€ãããªãã§ã³ã³ãã€ã«ãããã³ãŒããšãã€ããªäºæã
-mlarge-data-threshold =ãããå€
æ¥æ -mcmodel = medium ãæå®ãããŠããå ŽåãããŒã¿ãªããžã§ã¯ãã ãããå€ ã«é 眮ãããŸã
倧ããªããŒã¿ã»ã¯ã·ã§ã³ã ãã®å€ã¯ãã«ãªã³ã¯ãããŠãããã¹ãŠã®ãªããžã§ã¯ãã§åãã§ããå¿ èŠããããŸã
ãã€ããªã§ãããã©ã«ãã¯65535ã§ãã
-mrtd
å¥ã®é¢æ°åŒã³åºãèŠçŽã䜿çšããŸãããã®èŠåã§ã¯ãåºå®ã®é¢æ°ã䜿çšããŸã
åŒæ°ã®æ°ã¯ãretãã§è¿ãããŸã numã åŒæ°ããããããåœä»€
åž°ããªããã ããã«ãããåŒã³åºãå ã«XNUMXã€ã®åœä»€ãä¿åããå¿ èŠããªãããã
ããã«åŒæ°ããããããŸãã
ãã®åŒã³åºãã·ãŒã±ã³ã¹ã§åã ã®é¢æ°ãåŒã³åºãããããã«æå®ã§ããŸãã
é¢æ°å±æ§ æšæºã³ãŒã«. ãªãŒããŒã©ã€ãããããšãã§ããŸã -mrtd ãªãã·ã§ã³ã䜿çšããŠ
é¢æ°å±æ§ cdecl.
èŠåïŒ ãã®åŒã³åºãèŠçŽã¯ãUnixã§é垞䜿çšãããèŠçŽãšäºææ§ããããŸããã
ãããã£ãŠãUnixã³ã³ãã€ã©ã§ã³ã³ãã€ã«ãããã©ã€ãã©ãªãåŒã³åºãå¿ èŠãããå Žåã¯äœ¿çšã§ããŸããã
ãŸããå€æ°ãåããã¹ãŠã®é¢æ°ã®é¢æ°ãããã¿ã€ããæäŸããå¿ èŠããããŸã
åŒæ°ã®æ°ïŒãprintfããå«ãïŒã ããããªããšã誀ã£ãã³ãŒããçæãããŸã
ãããã®é¢æ°ã®åŒã³åºãã
ããã«ãé¢æ°ã®æ°ãå€ããããšãã³ãŒããå€§å¹ ã«äžæ£ç¢ºã«ãªããŸãã
åŒæ°ã ïŒéåžžãäœåãªåŒæ°ã¯ç¡å®³ã«ç¡èŠãããŸããïŒ
-mregparm =NUM
æŽæ°åŒæ°ãæž¡ãããã«äœ¿çšãããã¬ãžã¹ã¿ã®æ°ãå¶åŸ¡ããŸãã ããã©ã«ãã§ã¯ã
ã¬ãžã¹ã¿ã¯åŒæ°ãæž¡ãããã«äœ¿çšãããæ倧3ã€ã®ã¬ãžã¹ã¿ã䜿çšã§ããŸãã ããªãã¯ã§ãã
é¢æ°å±æ§ã䜿çšããŠãç¹å®ã®é¢æ°ã®ãã®åäœãå¶åŸ¡ããŸã regparm.
èŠåïŒ ãã®ã¹ã€ããã䜿çšããå Žåãããã³ NUM ããŒã以å€ã®å Žåããã¹ãŠã®ã¢ãžã¥ãŒã«ããã«ãããå¿ èŠããããŸã
ã©ã€ãã©ãªãå«ããåãå€ã§ã ããã«ã¯ãã·ã¹ãã ã©ã€ãã©ãªãš
ã¹ã¿ãŒãã¢ããã¢ãžã¥ãŒã«ã
-msseregparm
floatåŒæ°ãšdoubleåŒæ°ãããã³æ»ãå€ã«ã¯ãSSEã¬ãžã¹ã¿ã®åãæž¡ãèŠåã䜿çšããŠãã ããã
é¢æ°å±æ§ã䜿çšããŠãç¹å®ã®é¢æ°ã®ãã®åäœãå¶åŸ¡ã§ããŸã
ã»ã¬ã°ãã«ã .
èŠåïŒ ãã®ã¹ã€ããã䜿çšããå Žåã¯ãåãå€ã§ãã¹ãŠã®ã¢ãžã¥ãŒã«ããã«ãããå¿ èŠããããŸãã
ã©ã€ãã©ãªãå«ã¿ãŸãã ããã«ã¯ãã·ã¹ãã ã©ã€ãã©ãªãšã¹ã¿ãŒãã¢ããã¢ãžã¥ãŒã«ãå«ãŸããŸãã
-mvect8-ret-in-mem
MMXã¬ãžã¹ã¿ã®ä»£ããã«ã¡ã¢ãªå ã®8ãã€ãã®ãã¯ãã«ãè¿ããŸãã ãããããã©ã«ãã§ã
Solaris @ tie {} 8ããã³9ãšVxWorksã¯ãSunStudioã³ã³ãã€ã©ã®ABIãšäžèŽããŸãã
ããŒãžã§ã³12ããã以éã®ã³ã³ãã€ã©ããŒãžã§ã³ïŒStudio 12 Update @ tie {} 1以éïŒã¯æ¬¡ã®ãšããã§ãã
ä»ã®x86ã¿ãŒã²ããã§äœ¿çšãããABIãããã¯Solaris@tie{}10以éã®ããã©ã«ãã§ãã
ã®ã¿ ã«ãã£ãŠçæãããæ¢åã®ã³ãŒããšã®äºææ§ãç¶æããå¿ èŠãããå Žåã¯ããã®ãªãã·ã§ã³ã䜿çšããŠãã ãã
ãããã®ä»¥åã®ã³ã³ãã€ã©ããŒãžã§ã³ãŸãã¯å€ãããŒãžã§ã³ã®GCCã
-mpc32
-mpc64
-mpc80
80387æµ®åå°æ°ç¹ç²ŸåºŠã32ã64ããŸãã¯80ãããã«èšå®ããŸãã ã〠-mpc32 æå®ãããŠããã
æµ®åå°æ°ç¹æŒç®ã®çµæã®ä»®æ°ã¯24ãããã«äžžããããŸã
ïŒå粟床ïŒ; -mpc64 æµ®åå°æ°ç¹ã®çµæã®ä»®æ°ãäžžããŸã
53ãããïŒå粟床ïŒãžã®æŒç®ãš -mpc80 çµæã®ä»®æ°ãäžžããŸã
æµ®åå°æ°ç¹æŒç®ã®64ãããïŒæ¡åŒµå粟床ïŒãžã®å€æã
ããã©ã«ãã ãã®ãªãã·ã§ã³ã䜿çšãããšãããé«ç²ŸåºŠã®æµ®åå°æ°ç¹æŒç®ãå¯èœã«ãªããŸãã
FPUå¶åŸ¡ã¯ãŒããæ瀺çã«èšå®ããªããšãããã°ã©ããŒã¯äœ¿çšã§ããŸããã
æµ®åå°æ°ç¹æŒç®ã®äžžããããã©ã«ãã®80ãããæªæºã«èšå®ãããšã
äžéšã®ããã°ã©ã ã2ïŒ ä»¥äžé«éåããŸãã äžéšã®æ°åŠã©ã€ãã©ãªã¯ã
æ¡åŒµç²ŸåºŠïŒ80ãããïŒæµ®åå°æ°ç¹æŒç®ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã ã«ãŒãã³
ãã®ãããªã©ã€ãã©ãªã§ã¯ãéåžžã粟床ãå€§å¹ ã«äœäžããå¯èœæ§ããããŸãã
ãã®ãªãã·ã§ã³ã䜿çšããŠç²ŸåºŠãã«èšå®ããå Žåããå£æ» çãªãã£ã³ã»ã«ããšåŒã°ããŸã
æ¡åŒµç²ŸåºŠæªæºã
-mstackrealign
å ¥å£ã§ã¹ã¿ãã¯ãå調æŽããŸãã Intel x86 ã§ã¯ã -mstackrealign ãªãã·ã§ã³ã¯ãçæããŸã
å¿ èŠã«å¿ããŠã©ã³ã¿ã€ã ã¹ã¿ãã¯ãå調æŽãã代æ¿ã®ããããŒã°ãšãšãããŒã°ã ãã
4ãã€ãã®ã¹ã¿ãã¯ã¢ã©ã€ã³ã¡ã³ããç¶æããã¬ã¬ã·ãŒã³ãŒããšã
SSEãšã®äºææ§ã®ããã«ã16ãã€ãã®ã¹ã¿ãã¯ã¢ã©ã€ã¡ã³ããç¶æããŸãã å±æ§ãåç §ããŠãã ãã
ãforce_align_arg_pointerããåã ã®é¢æ°ã«é©çšã§ããŸãã
-mpreferred-stack-boundary =NUM
ã¹ã¿ãã¯å¢çã2ã«æããŠç¶æããããšããŸãã NUM ãã€ãå¢çã ããã
-mpreferred-ã¹ã¿ãã¯å¢ç ãæå®ãããŠããªãå Žåãããã©ã«ãã¯4ïŒ16ãã€ããŸãã¯128ãããïŒã§ãã
èŠåïŒ SSEæ¡åŒµæ©èœãåããx86-64ã¢ãŒããã¯ãã£ã®ã³ãŒããçæããå Žå
ç¡å¹ã -mpreferred-stack-boundary = 3 ã¹ã¿ãã¯å¢çã®æŽåãç¶æããããã«äœ¿çšã§ããŸã
8ãã€ãå¢çãŸã§ã x86-64 ABIã«ã¯16ãã€ãã®ã¹ã¿ãã¯ã¢ã©ã€ã¡ã³ããå¿ èŠãªãããããã¯ABIã§ãã
äºææ§ããªããã¹ã¿ãã¯ã¹ããŒã¹ã
éèŠãªå¶éã ãã®ãªãã·ã§ã³ã¯ãé¢æ°ãã³ã³ãã€ã«ããããšãã«ééã£ãã³ãŒãã«ã€ãªãããŸã
16 ãã€ãã®ã¹ã¿ã㯠ã¢ã©ã€ã³ã¡ã³ã (æšæºã©ã€ãã©ãªã®é¢æ°ãªã©) ãåŒã³åºããã
äœçœ®åãããããŠããªãã¹ã¿ãã¯ã ãã®å ŽåãSSE åœä»€ã«ãã£ãŠã¡ã¢ãªã®ã¢ã©ã€ã¡ã³ãããããããšããããŸãã
ãã©ããã«ã¢ã¯ã»ã¹ããŸãã ãŸããå¯å€åŒæ°ã¯ 16 ãã€ãã«å¯ŸããŠæ£ããåŠçãããŸããã
æŽåããããªããžã§ã¯ã (x87 ã® long double ãš __int128 ãå«ã) ããééã£ãçµæã«ã€ãªãããŸãã
ãã¹ãŠã®ã¢ãžã¥ãŒã«ããã«ãããå¿ èŠããããŸã -mpreferred-stack-boundary = 3ããã¹ãŠã®ã©ã€ãã©ãªãå«ã¿ãŸãã
ããã«ã¯ãã·ã¹ãã ã©ã€ãã©ãªãšã¹ã¿ãŒãã¢ãã ã¢ãžã¥ãŒã«ãå«ãŸããŸãã
-mincoming-stack-boundary =NUM
å ¥ã£ãŠããã¹ã¿ãã¯ã2ã«æããããŠãããšä»®å®ããŸã NUM ãã€ãå¢çã ããã
-mincoming-ã¹ã¿ãã¯å¢ç æå®ãããŠããªããã«ãã£ãŠæå®ããããã®
-mpreferred-ã¹ã¿ãã¯å¢ç 䜿çšãããŠããã
Pentiumããã³PentiumProã§ã¯ããdoubleãããã³ãlongdoubleãã®å€ã次ã®ããã«èª¿æŽããå¿ èŠããããŸãã
8ãã€ãå¢çïŒãåç §ïŒ -æªæ§-ããã«ïŒãŸãã¯å®è¡æã®ããã©ãŒãã³ã¹ãå€§å¹ ã«äœäžãã
ããã«ãã£ã Pentium IIIã§ã¯ãã¹ããªãŒãã³ã°SIMDæ¡åŒµåœä»€ïŒSSEïŒããŒã¿åã__m128ãã
16ãã€ãã«ã¢ã©ã€ã³ãããŠããªãå Žåã¯æ£ããæ©èœããŸããã
ã¹ã¿ãã¯äžã§ãã®å€ãé©åã«é 眮ããã«ã¯ãã¹ã¿ãã¯ã®å¢çã次ã®ããã«ããå¿ èŠããããŸãã
ã¹ã¿ãã¯ã«æ ŒçŽãããŠããå€ã«å¿ èŠãªäœçœ®ã«é 眮ãããŸãã ããã«ããã¹ãŠã®æ©èœ
ã¹ã¿ãã¯ã®æŽåãç¶æããããã«çæããå¿ èŠããããŸãã ãããã£ãŠãé¢æ°ãåŒã³åºã
äœãæ¹ã§ã³ã³ãã€ã«ãããé¢æ°ãããããé«ãåªå ã¹ã¿ãã¯å¢çã§ã³ã³ãã€ã«ããã
åªå ã¹ã¿ãã¯å¢çã¯ãã¹ã¿ãã¯ã®äœçœ®ããããŠããå¯èœæ§ããããŸãã ããå§ãããŸã
ã³ãŒã«ããã¯ã䜿çšããã©ã€ãã©ãªã¯ãåžžã«ããã©ã«ãèšå®ã䜿çšããŸãã
ãã®äœåãªé 眮ã¯äœåãªã¹ã¿ãã¯ã¹ããŒã¹ãæ¶è²»ããäžè¬çã«ã³ãŒããå¢ãããŸã
ãµã€ãºã çµã¿èŸŒã¿ã·ã¹ãã ã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã«ãŒãã«ã¯ãåªå ã¢ã©ã€ã¡ã³ããã«æžããããå ŽåããããŸã
-mpreferred-stack-boundary = 2.
-ããŒã
-mno-mmx
-mse
-mno-sse
-msse2
-mno-sse2
-msse3
-mno-sse3
-mssse3
-mno-ssse3
-msse4.1
-mno-sse4.1
-msse4.2
-mno-sse4.2
-msse4
-mno-sse4
-mavx
-mno-avx
-mavx2
-mno-avx2
-mavx512f
-mno-avx512f
-mavx512pf
-mno-avx512pf
-mavx512er
-mno-avx512er
-mavx512cd
-mno-avx512cd
-ã ã·ã£
-ç¡ã®ç€Ÿ
-ã¡ã€ãº
-mno-aes
-mpclmul
-mno-pclmul
-mfsgsbase
-mno-fsgsbase
-mrdrnd
-mno-rdrdnd
-mf16c
-mno-f16c
-MFMA
-mno-fma
-mprefetchwt1
-mno-prefetchwt1
-msse4a
-mno-sse4a
-mfma4
-mno-fma4
-mxop
-mno-xop
-mlwp
-mno-lwp
-m3dnow
-mno-3dnow
-mpopcnt
-mno-popcnt
-ããã
-mno-abm
-mbmi
-mbmi2
-mno-bmi
-mno-bmi2
-mlzcnt
-mno-lzcnt
-mfxsr
-mxsave
-mxsaveopt
-mrtm
-MTBM
-mno-tbm
ãããã®ã¹ã€ããã¯ãMMXãSSEãSSE2ãSSE3ã
SSSE3ãSSE4.1ãAVXãAVX2ãAVX512FãAVX512PFãAVX512ERãAVX512CDãSHAãAESãPCLMULã
FSGSBASEãRDRNDãF16CãFMAãSSE4AãFMA4ãXOPãLWPãABMãBMIãBMI2ãFXSRãXSAVEã
XSAVEOPTãLZCNTãRTMããŸã㯠3DNow! æ¡åŒµåœä»€ã»ããã ãããã®æ¡åŒµåã
çµã¿èŸŒã¿é¢æ°ãšããŠå©çšå¯èœ: åç § X86 å èµ æ©èœã®è©³çŽ°ã«ã€ããŠã¯ã
ãããã®ã¹ã€ããã§æ©èœãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
æµ®åå°æ°ç¹ã³ãŒãããSSE/SSE2åœä»€ãèªåçã«çæããã«ã¯ïŒ
387ã®æ瀺ãŸã§ïŒããåç §ããŠãã ãã -mfpmath = sse.
GCCã¯ã次ã®å Žåã«SSExåœä»€ãæå¶ããŸã -mavx 䜿çšãããŠããã 代ããã«ãæ°ããAVXãçæããŸã
å¿ èŠã«å¿ããŠããã¹ãŠã®SSExåœä»€ã«å¯Ÿããåœä»€ãŸãã¯AVXã®åçæ§ã
ãããã®ãªãã·ã§ã³ã«ãããGCCã¯çæãããã³ãŒãã§ãããã®æ¡åŒµåœä»€ã䜿çšã§ããŸãã
ç¡ã -mfpmath = sseã ã©ã³ã¿ã€ã CPUæ€åºãå®è¡ããã¢ããªã±ãŒã·ã§ã³ã¯ãã³ã³ãã€ã«ããå¿ èŠããããŸã
é©åãªãã©ã°ã䜿çšããŠããµããŒããããŠããã¢ãŒããã¯ãã£ããšã«åå¥ã®ãã¡ã€ã«ã ã®
ç¹ã«ãCPUæ€åºã³ãŒããå«ããã¡ã€ã«ã¯ã
ãããã®ãªãã·ã§ã³ã
-mdump-tune-features
ãã®ãªãã·ã§ã³ã¯ãx86ããã©ãŒãã³ã¹ãã¥ãŒãã³ã°æ©èœã®ååããã³ãããããã«GCCã«æ瀺ããŸãã
ããã©ã«ãã®èšå®ã ååã¯ã§äœ¿çšããããšãã§ããŸã -mtune-ctrl =æ©èœãªã¹ã.
-mtune-ctrl =æ©èœãªã¹ã
ãã®ãªãã·ã§ã³ã¯ãx86ã³ãŒãçææ©èœã®ãã现ããå¶åŸ¡ãè¡ãããã«äœ¿çšãããŸãã
æ©èœãªã¹ã ã®ã³ã³ãåºåããªã¹ãã§ã ç°¡æœãª ååã ãåç §ããŠãã ãã
-mdump-tune-featuresã æå®ãããšã ç°¡æœãª ããã§ãªãå Žåã¯ãªã³ã«ãªããŸã
å é ã«ã^ããä»ããŸãããã以å€ã®å Žåã¯ãªãã«ãªããŸãã -mtune-ctrl =æ©èœãªã¹ã is
GCC éçºè ã䜿çšããããšãæå³ããŠããŸãã ããã䜿çšãããšãã³ãŒã ãã¹ãã«ããŒãããªãå¯èœæ§ããããŸãã
ã³ã³ãã€ã©ã® ICE ãŸãã¯å®è¡æãšã©ãŒãçºçããå¯èœæ§ããããŸãã
-mno-ããã©ã«ã
ãã®ãªãã·ã§ã³ã¯ãGCCã«ãã¹ãŠã®èª¿æŽå¯èœãªæ©èœããªãã«ããããã«æ瀺ããŸãã ãåç §ããŠãã ãã
-mtune-ctrl =æ©èœãªã¹ã ãš -mdump-tune-features.
-mcld
ãã®ãªãã·ã§ã³ã¯ãé¢æ°ã®ããããŒã°ã§ãcldãåœä»€ãçºè¡ããããã«GCCã«æ瀺ããŸã
æåååœä»€ã䜿çšããŸãã æåååœä»€ã¯ãéžæããDFãã©ã°ã«äŸåããŸã
èªåã€ã³ã¯ãªã¡ã³ãã¢ãŒããŸãã¯èªåãã¯ãªã¡ã³ãã¢ãŒãã®éã ABIãDFãã©ã°ãæå®ããŠããé
æ©èœå ¥åæã«ã¯ãªã¢ãããäžéšã®ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã¯ãã®ä»æ§ã«éåããŸãã
äŸå€ãã£ã¹ãããã£ã®DFãã©ã°ãã¯ãªã¢ããŸãã äŸå€ãã³ãã©ã¯æ¬¡ã®ããã«ãªããŸã
DFãã©ã°ãèšå®ãããç¶æ ã§åŒã³åºãããæååã®å Žåã«èª€ã£ãæ¹åã¢ãŒãã«ãªããŸã
æ瀺ã䜿çšãããŸãã ãã®ãªãã·ã§ã³ã¯ã32ãããx86ã¿ãŒã²ããã§ããã©ã«ãã§æå¹ã«ã§ããŸãã
ã§GCCãæ§æãã --enable-cld ãªãã·ã§ã³ãæ§æããŸãã ãcldãã®çæ
åœä»€ã¯ã§æå¶ããããšãã§ããŸã -mno-cld ãã®å Žåã®ã³ã³ãã€ã©ãªãã·ã§ã³ã
-mvzeroupper
ãã®ãªãã·ã§ã³ã¯ãGCCã«è»¢éåã«ãvzeroupperãåœä»€ãçºè¡ããããã«æ瀺ããŸãã
æ©èœããã®ãããŒãå¶åŸ¡ããŠãAVXããSSEãžã®ç§»è¡ããã«ãã£ãæå°éã«æããŸã
äžèŠãªãzeroupperãçµã¿èŸŒã¿é¢æ°ãåé€ããŸãã
-mprefer-avx128
ãã®ãªãã·ã§ã³ã¯ã128ãããAVXã®ä»£ããã«256ãããAVXåœä»€ã䜿çšããããã«GCCã«æ瀺ããŸã
èªåãã¯ãã«åã®æ瀺ã
-mcx16
ãã®ãªãã·ã§ã³ã«ãããGCCã¯ãCMPXCHG16Bãåœä»€ãçæã§ããŸãã ãCMPXCHG16Bãã¯
128ãããã®ããã«ã¯ã¯ããã¯ãŒãïŒãŸãã¯owordïŒããŒã¿åã§ã®ã¢ãããã¯æäœçšã ããã¯
è€æ°ã®ããã»ããµïŒãŸãã¯
ã³ã¢ïŒã ãã®åœä»€ã¯ãã¢ãããã¯çµã¿èŸŒã¿é¢æ°ã®äžéšãšããŠçæãããŸãããåç §ããŠãã ããã
__åæ ãã«ãã€ã³ or __ã¢ããã㯠ãã«ãã€ã³ 詳现ã«ã€ããŠã¯ã
-msahf
ãã®ãªãã·ã§ã³ã䜿çšãããšã64ãããã³ãŒãã§ãSAHFãåœä»€ãçæã§ããŸãã åæã®Intel
Pentium4G64ã¹ãããã®å°å ¥åã®Intel4ããµããŒãããPentium1CPU
2005 幎 XNUMX æã«ã¯ãã«ãã£ãŠãµããŒããããŠãã "LAHF" ããã³ "SAHF" åœä»€ãæ¬ ããŠããŸããã
AMD64ã ãããã¯ãããããç¹å®ã®ã¹ããŒã¿ã¹ãã©ã°ã®ããŒãããã³ã¹ãã¢åœä»€ã§ãã
64ãããã¢ãŒãã§ã¯ããSAHFãåœä»€ã䜿çšããŠãfmodãããdremããããã³
ãæ®ãã®ãçµã¿èŸŒã¿é¢æ°ã èŠã ãã®ä» ãã«ãã€ã³ 詳现ã«ã€ããŠã¯ã
-mmovbe
ãã®ãªãã·ã§ã³ã䜿çšãããšããmovbeãåœä»€ã䜿çšããŠã__builtin_bswap32ããå®è£ ã§ããŸãã
ããã³ã__builtin_bswap64ãã
-mcrc32
ãã®ãªãã·ã§ã³ã¯ãçµã¿èŸŒã¿é¢æ°ã__builtin_ia32_crc32qiããæå¹ã«ããŸãã
ã__builtin_ia32_crc32hiããã__ builtin_ia32_crc32siããã__builtin_ia32_crc32diããã
ãcrc32ããã·ã³åœä»€ãçæããŸãã
-mã¬ã·ã
ãã®ãªãã·ã§ã³ã«ããããRCPSSãããã³ãRSQRTSSãåœä»€ïŒããã³ãããã®ãã¯ãã«åïŒã®äœ¿çšãå¯èœã«ãªããŸã
ããªã¢ã³ããRCPPSãããã³ãRSQRTPSãïŒãè¿œå ããŠãã¥ãŒãã³ã©ããœã³ã¹ããããè¿œå
ã·ã³ã°ã«ã®å ŽåããDIVSSããšãSQRTSSãïŒããã³ãããã®ãã¯ãã«åãããããªã¢ã³ãïŒã®ä»£ããã«ç²ŸåºŠ
粟床ã®æµ®åå°æ°ç¹åŒæ°ã ãããã®åœä»€ã¯ã次ã®å Žåã«ã®ã¿çæãããŸã
-funsafe-æ°åŠã®æé©å ãšäžç·ã«æå¹ã«ãªããŸã -æéæ°åŠã®ã¿ ãš
-fno-ãã©ãã-æ°åŠã ã·ãŒã±ã³ã¹ã®ã¹ã«ãŒãããã¯
éçžäºåœä»€ã®ã¹ã«ãŒããããã·ãŒã±ã³ã¹ã®ç²ŸåºŠã¯æ¬¡ã®ããã«ãªããŸãã
æ倧2ulpæžå°ããŸãïŒã€ãŸãã1.0ã®éæ°ã¯0.99999994ã«çãããªããŸãïŒã
GCCã¯ã1.0f/sqrtfïŒããïŒ" ãã§ã«ãRSQRTSSãïŒãŸãã¯ãRSQRTPSãïŒã«é¢ããŠ
ã -ffast-æ°åŠ ïŒãŸãã¯äžèšã®ãªãã·ã§ã³ã®çµã¿åããïŒãããã³å¿ èŠãããŸãã -mã¬ã·ã.
ãŸããGCCã¯ãè¿œå ã®ãã¥ãŒãã³-ã©ããœã³ã¹ãããã䜿çšããŠäžèšã®ã·ãŒã±ã³ã¹ãåºåããããšã«æ³šæããŠãã ããã
ãã¯ãã«åãããå粟床é€ç®ãšãã¯ãã«åããã"sqrtfïŒããïŒ" ãã§ã« -ffast-æ°åŠ
ïŒãŸãã¯äžèšã®ãªãã·ã§ã³ã®çµã¿åããïŒãããã³å¿ èŠãããŸãã -mã¬ã·ã.
-mrecip =ãªãã
ãã®ãªãã·ã§ã³ã¯ã䜿çšã§ããçžäºæšå®åœä»€ãå¶åŸ¡ããŸãã ãªãã ã
ãªãã·ã§ã³ã®ã³ã³ãåºåããªã¹ããåã« ! ãªãã·ã§ã³ãå転ããã«ã¯ïŒ
ã ãã¹ãŠã®èŠç©ããæé ãæå¹ã«ããŸãã
ããã©ã«ã
ãšåçã®ããã©ã«ãã®åœä»€ãæå¹ã«ããŸã -mã¬ã·ã.
ãªã
ãšåçã®ãã¹ãŠã®èŠç©ããæé ãç¡å¹ã«ããŸã -mno-ã¬ã·ã.
divèŠçŽ ã¹ã«ã©ãŒé€ç®ã®è¿äŒŒãæå¹ã«ããŸãã
vec-div
ãã¯ãã«åãããé€ç®ã®è¿äŒŒãæå¹ã«ããŸãã
å¹³æ¹æ ¹
ã¹ã«ã©ãŒå¹³æ¹æ ¹ã®è¿äŒŒãæå¹ã«ããŸãã
vec-sqrt
ãã¯ãã«åãããå¹³æ¹æ ¹ã®è¿äŒŒãæå¹ã«ããŸãã
ããšãã°ã -mrecip = allãïŒsqrt ãã¹ãŠã®éæ°è¿äŒŒãæå¹ã«ãã
å¹³æ¹æ ¹ãé€ããŠã
-mveclibabi =type
å€éšã©ã€ãã©ãªã䜿çšããŠçµã¿èŸŒã¿é¢æ°ããã¯ãã«åããããã«äœ¿çšããABIã¿ã€ããæå®ããŸãã
ãµããŒããããŠããå€ type ã SVML Intelã®çããã¯ãã«æ°åŠã©ã€ãã©ãªãš aml
AMDæ°åŠã³ã¢ã©ã€ãã©ãªçšã ãã®ãªãã·ã§ã³ã䜿çšããã«ã¯ãäž¡æ¹ -ftree-ãã¯ãã«å ãš
-funsafe-æ°åŠã®æé©å æå¹ã«ããå¿ èŠããããSVMLãŸãã¯ACMLABIãšäºææ§ããã
ã©ã€ãã©ãªã¯ãªã³ã¯æã«æå®ããå¿ èŠããããŸãã
GCCã¯çŸåšããvmldExp2ãããvmldLn2ãããvmldLog102ãããvmldLog102ãã
"vmldPow2"ã "vmldTanh2"ã "vmldTan2"ã "vmldAtan2"ã "vmldAtanh2"ã "vmldCbrt2"ã
"vmldSinh2"ã "vmldSin2"ã "vmldAsinh2"ã "vmldAsin2"ã "vmldCosh2"ã "vmldCos2"ã
"vmldAcosh2"ã "vmldAcos2"ã "vmlsExp4"ã "vmlsLn4"ã "vmlsLog104"ã "vmlsLog104"ã
"vmlsPow4"ã "vmlsTanh4"ã "vmlsTan4"ã "vmlsAtan4"ã "vmlsAtanh4"ã "vmlsCbrt4"ã
"vmlsSinh4"ã "vmlsSin4"ã "vmlsAsinh4"ã "vmlsAsin4"ã "vmlsCosh4"ã "vmlsCos4"ã
察å¿ããé¢æ°åã®ãvmlsAcosh4ãããã³ãvmlsAcos4ã -mveclibabi = svml is
䜿çšæžã¿ãããã³ "__vrd2_sin"ã "__ vrd2_cos"ã "__ vrd2_exp"ã "__ vrd2_log"ã "__ vrd2_log2"ã
"__vrd2_log10"ã "__ vrs4_sinf"ã "__ vrs4_cosf"ã "__ vrs4_expf"ã "__ vrs4_logf"ã
察å¿ããé¢æ°åã®ã__vrs4_log2fããã__ vrs4_log10fããããã³ã__vrs4_powfã
ã〠-mveclibabi = acml 䜿çšãããŠããã
-mabi =å
æå®ãããåŒã³åºãèŠçŽã®ã³ãŒããçæããŸãã 蚱容å€ã¯ ã·ã¹ãã for
GNU / Linuxããã³ãã®ä»ã®ã·ã¹ãã ã§äœ¿çšãããABIãããã³ ms MicrosoftABIã®å Žåã The
ããã©ã«ãã§ã¯ãMicrosoftWindowsããã³SysVABIã察象ãšããå Žåã¯MicrosoftABIã䜿çšããŸã
ä»ã®ãã¹ãŠã®ã·ã¹ãã ã§ã ã䜿çšããŠãç¹å®ã®é¢æ°ã®ãã®åäœãå¶åŸ¡ã§ããŸãã
é¢æ°å±æ§ ms_abi/sysv_abi.
-mtls-dialect =type
ã䜿çšããŠã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžã«ã¢ã¯ã»ã¹ããããã®ã³ãŒããçæããŸã ã㌠or ããŒ2 ã³ã³ãã³ã·ã§ã³ã ããŒ
æ§ãããªããã©ã«ãã§ãã ããŒ2 ããå¹ççã§ãããã³ã³ãã€ã«ãšå®è¡ãè¿œå ãããå¯èœæ§ããããŸã
ãã¹ãŠã®ã·ã¹ãã ã§æºããããšãã§ããªãæéèŠä»¶ã
-mpush-args
-mno-push-args
PUSHæäœã䜿çšããŠãéä¿¡ãã©ã¡ãŒã¿ãŒãä¿ç®¡ããŸãã ãã®æ¹æ³ã¯çããéåžžã¯
SUB / MOVæäœã䜿çšããæ¹æ³ãšåããããé«éã§ãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã ããã€ãã®
ç¡å¹ã«ãããšãã¹ã±ãžã¥ãŒãªã³ã°ãæ¹åãããããã©ãŒãã³ã¹ãäœäžããå¯èœæ§ããããŸãã
äŸåé¢ä¿ã
-maccumulate-çºä¿¡åŒæ°
æå¹ã«ãããšãçºä¿¡åŒæ°ã«å¿ èŠãªã¹ããŒã¹ã®æ倧éã¯ã§èšç®ãããŸã
é¢æ°ããããŒã°ã ããã¯ãã»ãšãã©ã®ææ°ã®CPUã§ã¯ãåæžãããŠããããé«éã§ãã
äŸåé¢ä¿ãã¹ã±ãžã¥ãŒãªã³ã°ã®æ¹åãããã³åªå ã¹ã¿ãã¯æã®ã¹ã¿ãã¯äœ¿çšéã®åæž
å¢çã¯2ã«çãããããŸãããæ¬ ç¹ã¯ãã³ãŒããµã€ãºãèãã倧ãããªãããšã§ãã ãã
ã¹ã€ããã¯æå³ããŸã -mno-push-args.
-ããªã¹ã¬ãã
MinGWã§ã®ã¹ã¬ããã»ãŒããªäŸå€åŠçããµããŒãããŸãã ã¹ã¬ããã»ãŒãã«äŸåããããã°ã©ã
äŸå€åŠçã§ã¯ããã¹ãŠã®ã³ãŒããã³ã³ãã€ã«ããŠãªã³ã¯ããå¿ èŠããããŸã -ããªã¹ã¬ãã ãªãã·ã§ã³ã ãã€
ã³ã³ãã€ã«ã -ããªã¹ã¬ãã ã-D_MTããå®çŸ©ããŸãã ãªã³ã¯ã®éã¯å°çšã¹ã¬ããã§ãªã³ã¯ããŸã
ãã«ã㌠ã©ã€ãã©ãª -lmingwthrd ããã¯ãã¹ã¬ããããšã®äŸå€åŠçããŒã¿ãã¯ãªãŒã³ã¢ããããŸãã
-mno-align-stringops
ã€ã³ã©ã€ã³æååæäœã®å®å ãæããªãã§ãã ããã ãã®ã¹ã€ããã¯ã³ãŒããæžãããŸã
å®å ããã§ã«èª¿æŽãããŠããããGCCã®å Žåã¯ããµã€ãºã倧ãããªããããã©ãŒãã³ã¹ãåäžããŸãã
ããã«ã€ããŠç¥ããŸããã
-minline-all-stringops
ããã©ã«ãã§ã¯ãGCCã¯ãå®å ãã§ããããšãããã£ãŠããå Žåã«ã®ã¿æååæäœãã€ã³ã©ã€ã³åããŸãã
å°ãªããšã4ãã€ãã®å¢çã«æããããŸãã ããã«ãããããå€ãã®ã€ã³ã©ã€ã³åãå¯èœã«ãªããã³ãŒããå¢å ããŸã
ãµã€ãºã§ãããé«éã®ãmemcpyãããstrlenããããã³ã«äŸåããã³ãŒãã®ããã©ãŒãã³ã¹ãåäžããå¯èœæ§ããããŸã
çãé·ãã®å Žåã¯ãmemsetãã
-minline-stringops-åçã«
ãµã€ãºãäžæãªæååæäœã®å Žåã¯ãå°ããå Žåã¯ã€ã³ã©ã€ã³ã³ãŒãã§å®è¡æãã§ãã¯ã䜿çšããŸã
ãããã¯ãšã©ã€ãã©ãªã¯å€§ããªãããã¯ãå¿ èŠãšããŸãã
-mstringop-strategy =ALG
䜿çšããç¹å®ã®ã¢ã«ãŽãªãºã ã®å éšæ±ºå®ãã¥ãŒãªã¹ãã£ãã¯ããªãŒããŒã©ã€ãããŸã
æååæŒç®ã®ã€ã³ã©ã€ã³åã ã®èš±å®¹å€ ALG ã«ã¯æ¬¡ã®å€ããããŸã:
æ åœè ãã€ã
rep_4byte
rep_8byte
æå®ããããµã€ãºã®i386ãrepããã¬ãã£ãã¯ã¹ã䜿çšããŠå±éããŸãã
ãã€ãã«ãŒã
ã«ãŒã
unrolled_loop
ã€ã³ã©ã€ã³ã«ãŒãã«å±éããŸãã
libcall
åžžã«ã©ã€ãã©ãªåŒã³åºãã䜿çšããŠãã ããã
-mmemcpy-strategy =æŠç¥
å éšæ±ºå®ãã¥ãŒãªã¹ãã£ãã¯ããªãŒããŒã©ã€ãããŠãã__builtin_memcpyãã
ã€ã³ã©ã€ã³åãããã³ããŒæäœã®äºæ³ãµã€ãºãçºçãããšãã«äœ¿çšããã€ã³ã©ã€ã³ã¢ã«ãŽãªãºã
ç¥ãããŠããã æŠç¥ ã®ã³ã³ãåºåãã®ãªã¹ãã§ã ALG:æ倧ãµã€ãº:dest_align ããªãã¬ããã ALG
ã§æå®ãããŠããŸã -mstringop-æŠç¥, æ倧ãµã€ãº æ倧ãã€ããµã€ãºãæå®ããŸã
ã€ã³ã©ã€ã³ã¢ã«ãŽãªãºã ALG èš±å¯ãããŠããŸãã æåŸã®ããªãã¬ããã«ã€ããŠã¯ã æ倧ãµã€ãº ã-1ãã§ããå¿ èŠããããŸãã The
æ倧ãµã€ãº ãªã¹ãå ã®ããªãã¬ããã®ãã¡ãæé ã§æå®ããå¿ èŠããããŸãã The
ã®æå°ãã€ããµã€ãº ALG æåã®ããªãã¬ããã¯0ã§ããæ倧ãµã€ãº + 1"
åã®ç¯å²ã
-mmemset-strategy =æŠç¥
ãªãã·ã§ã³ã¯ã«äŒŒãŠããŸã -mmemcpy-strategy = ãããå¶åŸ¡ããããšã§ããããšãé€ããŠ
ã__builtin_memsetãæ¡åŒµã
-momit-ãªãŒããã¬ãŒã ãã€ã³ã¿ãŒ
ãªãŒãé¢æ°ã®ã¬ãžã¹ã¿ã«ãã¬ãŒã ãã€ã³ã¿ãä¿æããªãã§ãã ããã ããã«ããã
ãã¬ãŒã ãã€ã³ã¿ãä¿åãèšå®ã埩å ããè¿œå ã®ã¬ãžã¹ã¿ãäœæããæé
ãªãŒãæ©èœã§å©çšã§ããŸãã ãªãã·ã§ã³ -fomit-è-ãã¬ãŒã -ãã€ã³ã¿ ãã¬ãŒã ãåé€ããŸã
ãªãŒãé¢æ°ã®ãã€ã³ã¿ããããã°ãé£ãããªãå¯èœæ§ããããŸãã
-mtls-direct-seg-refs
-mno-tls-direct-seg-refs
TLSã»ã°ã¡ã³ãããã®ãªãã»ããã䜿çšããŠTLSå€æ°ã«ã¢ã¯ã»ã¹ã§ãããã©ãããå¶åŸ¡ããŸã
ã¬ãžã¹ã¿ïŒ32ãããã®å Žåã¯ïŒ gsã64ãããã®å Žåã¯ïŒ fsïŒããŸãã¯ã¹ã¬ããããŒã¹ãã€ã³ã¿ã
è¿œå ããã ãããæå¹ãã©ããã¯ããªãã¬ãŒãã£ã³ã°ã·ã¹ãã ãšãããæå¹ãã©ããã«ãã£ãŠç°ãªããŸãã
TLSé åå šäœãã«ããŒããããã«ã»ã°ã¡ã³ãããããããŸãã
GNU Cã©ã€ãã©ãªã䜿çšããã·ã¹ãã ã®å Žåãããã©ã«ãã¯ãªã³ã§ãã
-msse2avx
-mno-sse2avx
ã¢ã»ã³ãã©ãVEXãã¬ãã£ãã¯ã¹ã䜿çšããŠSSEåœä»€ããšã³ã³ãŒãããå¿ èŠãããããšãæå®ããŸãã ãªãã·ã§ã³
-mavx ããã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
- ãããã£ãŒ
-mno-ãã§ã³ããª
ãããã¡ã€ãªã³ã°ãã¢ã¯ãã£ããªå ŽåïŒ-pgïŒããããã¡ã€ãªã³ã°ã«ãŠã³ã¿ãŒã³ãŒã«ãããããŒã°ã®åã«çœ®ããŸãã
泚ïŒx86ã¢ãŒããã¯ãã£ãŒã§ã¯ãå±æ§ãms_hook_prologueãã¯
ã®ããã®ç¬é - ãããã£ãŒ ãš -pg.
-m8bit-idiv
-mno-8bit-idiv
Intel Atomãªã©ã®äžéšã®ããã»ããµã§ã¯ã8ãããã®ç¬Šå·ãªãæŽæ°é€ç®ã¯ãããã¯ããã«é«éã§ãã
32ããã/64ãããæŽæ°é€ç®ã ãã®ãªãã·ã§ã³ã¯ãå®è¡æãã§ãã¯ãçæããŸãã äž¡æ¹ã®å Žå
被é€æ°ãšé€æ°ã¯0ãã255ã®ç¯å²å ã§ã8ãããã®ç¬Šå·ãªãæŽæ°é€ç®ã¯
32ããã/64ãããæŽæ°é€ç®ã®ä»£ããã«äœ¿çšãããŸãã
-mavx256-split-unaligned-load
-mavx256-split-unaligned-store
32ãã€ãã®AVXã¢ã©ã€ã³ãããŠããªãããŒããšã¹ãã¢ãåå²ããŸãã
-mstack-protector-guard =ã¬ãŒã
ã§ã«ããªã¢ã䜿çšããŠã¹ã¿ãã¯ä¿è·ã³ãŒããçæããŸã ã¬ãŒãã ãµããŒããããŠããå Žæã¯ å šäœçãª
ã°ããŒãã«ã«ããªã¢ãŸã㯠TLS TLSãããã¯ã®ã¹ã¬ããããšã®ã«ããªã¢ã®å ŽåïŒããã©ã«ãïŒã ãã
ãªãã·ã§ã³ã¯æ¬¡ã®å Žåã«ã®ã¿æå¹ã§ã -fstack-ãããã¯ã¿ãŒ or -fstack-protector-all æå®ãããŠããŸãã
ããŒãã³ -m äžèšã«å ããŠã86ãããã®x64-64ããã»ããµã§ã¹ã€ããããµããŒããããŠããŸã
ç°å¢ã
-m32
-m64
-mx32
-m16
16ãããã32ãããããŸãã¯64ãããç°å¢ã®ã³ãŒããçæããŸãã The -m32 ãªãã·ã§ã³ã»ãããintãã
ãé·ããã32ããããžã®ãã€ã³ã¿åãããã³ä»»æã®i386ã·ã¹ãã ã§å®è¡ãããã³ãŒããçæããŸãã
ãã® -m64 ãªãã·ã§ã³ã¯ãintãã32ãããã«èšå®ãããlongããšãã€ã³ã¿åã64ãããã«èšå®ããŸãã
x86-64ã¢ãŒããã¯ãã£ã®ã³ãŒããçæããŸãã ããŒãŠã£ã³ã®å Žåã®ã¿ -m64 ãªãã·ã§ã³ã
ããªãã«ããŸã -fno-pic ãš -mdynamic-no-pic ãªãã·ã§ã³ã
ãã® -mx32 ãªãã·ã§ã³ã¯ããintãããlongããããã³ãã€ã³ã¿ãŒåã32ãããã«èšå®ããã³ãŒããçæããŸã
x86-64ã¢ãŒããã¯ãã£ã®å Žåã
ãã® -m16 ãªãã·ã§ã³ã¯ãšåãã§ã -m32ãããcode16gccããåºåããããšãé€ããŠ
ãã€ããªãå®è¡ã§ããããã«ããããã®ã¢ã»ã³ããªåºåã®å é ã«ããã¢ã»ã³ããªãã£ã¬ã¯ãã£ã
16ãããã¢ãŒãã§ã
-mno-ã¬ãããŸãŒã³
x86-64ã³ãŒãã«ã¯ãããããã¬ãããŸãŒã³ãã䜿çšããªãã§ãã ããã ã¬ãããŸãŒã³ã¯ã
x86-64 ABI; ã¹ã¿ãã¯ãã€ã³ã¿ã®äœçœ®ãè¶ ãã128ãã€ãã®é åã§ããã
ã·ã°ãã«ãã³ãã©ãŸãã¯å²ã蟌ã¿ãã³ãã©ã«ãã£ãŠå€æŽããããããäžæããŒã¿ã«äœ¿çšã§ããŸã
ã¹ã¿ãã¯ãã€ã³ã¿ã調æŽããã«ã æ -mno-ã¬ãããŸãŒã³ ãã®ã¬ãããŸãŒã³ãç¡å¹ã«ããŸãã
-mcmodel = small
ã¹ã¢ãŒã«ã³ãŒãã¢ãã«ã®ã³ãŒããçæããïŒããã°ã©ã ãšãã®ã·ã³ãã«ã¯ã§ãªã³ã¯ãããŠããå¿ èŠããããŸã
ã¢ãã¬ã¹ç©ºéã®äžäœ2GBã ãã€ã³ã¿ã¯64ãããã§ãã ããã°ã©ã ã¯ããããšãã§ããŸã
éçãŸãã¯åçã«ãªã³ã¯ãããŠããŸãã ããã¯ããã©ã«ãã®ã³ãŒãã¢ãã«ã§ãã
-mcmodel = kernel
ã«ãŒãã«ã³ãŒãã¢ãã«ã®ã³ãŒããçæããŸãã ã«ãŒãã«ã¯ããã€ãã¹2GBã§å®è¡ãããŸãã
ã¢ãã¬ã¹ç©ºéã ãã®ã¢ãã«ã¯ãLinuxã«ãŒãã«ã³ãŒãã«äœ¿çšããå¿ èŠããããŸãã
-mcmodel = medium
äžåã¢ãã«ã®ã³ãŒããçæããŸããããã°ã©ã ã¯ã
ã¢ãã¬ã¹ç©ºéã å°ããªèšå·ãããã«é 眮ãããŸãã ãµã€ãºã倧ããã·ã³ãã«
-mlarge-data-threshold 倧ããªããŒã¿ãŸãã¯BSSã»ã¯ã·ã§ã³ã«é 眮ãããå Žæãç¹å®ã§ããŸã
2GB以äžã ããã°ã©ã ã¯éçãŸãã¯åçã«ãªã³ã¯ã§ããŸãã
-mcmodel = large
ã©ãŒãžã¢ãã«ã®ã³ãŒããçæããŸãã ãã®ã¢ãã«ã¯ãäœæã«ã€ããŠã®ä»®å®ãè¡ããŸãã
ãšã»ã¯ã·ã§ã³ã®ãµã€ãºã
-maddress-mode = long
ãã³ã°ã¢ãã¬ã¹ã¢ãŒãã®ã³ãŒããçæããŸãã ããã¯64ãããããã³x32ã§ã®ã¿ãµããŒããããŸã
ç°å¢ã ããã¯ã64ãããç°å¢ã®ããã©ã«ãã®ã¢ãã¬ã¹ã¢ãŒãã§ãã
-maddress-mode = short
ã·ã§ãŒãã¢ãã¬ã¹ã¢ãŒãã®ã³ãŒããçæããŸãã ããã¯ã32ãããããã³x32ã§ã®ã¿ãµããŒããããŸã
ç°å¢ã ããã¯ã32ãããããã³x32ç°å¢ã®ããã©ã«ãã®ã¢ãã¬ã¹ã¢ãŒãã§ãã
i386 ãš x86-64 Windows ãªãã·ã§ã³
ãããã®è¿œå ãªãã·ã§ã³ã¯ãMicrosoftWindowsã¿ãŒã²ããã§äœ¿çšã§ããŸãã
-mconsole
ãã®ãªãã·ã§ã³ã¯ãæ瀺ããããšã«ãããã³ã³ãœãŒã«ã¢ããªã±ãŒã·ã§ã³ãçæããããšãæå®ããŸã
ã³ã³ãœãŒã«ã¢ããªã±ãŒã·ã§ã³ã«å¿ èŠãªPEããããŒãµãã·ã¹ãã ã¿ã€ããèšå®ãããªã³ã«ãŒã
ãã®ãªãã·ã§ã³ã¯Cygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšå¯èœã§ãããããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
ãããã®ã¿ãŒã²ããã
-mdll
ãã®ãªãã·ã§ã³ã¯ãCygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã DLLãæå®ããŸã---a
ãã€ãããã¯ãªã³ã¯ã©ã€ãã©ãª---çæãããå¿ èŠãªãã®ãéžæã§ããããã«ãªããŸã
ã©ã³ã¿ã€ã ã¹ã¿ãŒãã¢ãããªããžã§ã¯ããšãšã³ããªãã€ã³ãã
-mnop-fun-dllimport
ãã®ãªãã·ã§ã³ã¯ãCygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã ããã¯ã
ãdllimportãå±æ§ã¯ç¡èŠããå¿ èŠããããŸãã
-mã¹ã¬ãã
ãã®ãªãã·ã§ã³ã¯ãMinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã MinGWåºæã®ã¹ã¬ãããæå®ããŸã
ãµããŒãã䜿çšãããŸãã
-ãã¥ãã³ãŒã
ãã®ãªãã·ã§ã³ã¯ãMinGW-w64ã¿ãŒã²ããã§äœ¿çšã§ããŸãã ãUNICODEãããªããã»ããµãçºçããŸã
ãã¯ããäºåå®çŸ©ããUnicode察å¿ã®ã©ã³ã¿ã€ã èµ·åã³ãŒããéžæããŸãã
-mwin32
ãã®ãªãã·ã§ã³ã¯ãCygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã ããã¯å žåçãªããšãæå®ããŸã
Microsoft Windowsã®äºåå®çŸ©ããããã¯ãã¯ããªããã»ããµã§èšå®ãããŸãããèšå®ãããŸãã
ã©ã³ã¿ã€ã ã©ã€ãã©ãª/ã¹ã¿ãŒãã¢ããã³ãŒãã®éžæã«åœ±é¿ãäžããŸãã
-mwindows
ãã®ãªãã·ã§ã³ã¯ãCygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã GUIãæå®ããŸã
ã¢ããªã±ãŒã·ã§ã³ã¯ããªã³ã«ã«PEããããŒãèšå®ããããã«æ瀺ããããšã«ãã£ãŠçæãããŸã
ãµãã·ã¹ãã ã¿ã€ããé©åã«ã
-fno-set-stack-executable
ãã®ãªãã·ã§ã³ã¯ãMinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã ã®å®è¡å¯èœãã©ã°ãæå®ããŸã
ãã¹ããããé¢æ°ã§äœ¿çšãããã¹ã¿ãã¯ãèšå®ãããŠããŸããã ããã¯ãå®è¡äžã®ãã€ããªã«å¿ èŠã§ã
Microsoft Windowsã®ã«ãŒãã«ã¢ãŒãã§ã¯ãèšå®ã«äœ¿çšãããUser32APIããããŸã
å®è¡å¯èœç¹æš©ã¯äœ¿çšã§ããŸããã
-fwritable-relocated-rdata
ãã®ãªãã·ã§ã³ã¯ãMinGWããã³Cygwinã¿ãŒã²ããã§äœ¿çšã§ããŸãã ããã¯åé 眮ãããããšãæå®ããŸã-
èªã¿åãå°çšã»ã¯ã·ã§ã³ã®ããŒã¿ã¯ã.dataã»ã¯ã·ã§ã³ã«é 眮ãããŸãã ããã¯é«éœ¢è ã«å¿ èŠã§ã
ç䌌åé 眮ã®ããã®.rdataã»ã¯ã·ã§ã³ã®å€æŽããµããŒãããŠããªãã©ã³ã¿ã€ã ã
-mpe-aligned-commons
ãã®ãªãã·ã§ã³ã¯ãCygwinããã³MinGWã¿ãŒã²ããã§äœ¿çšã§ããŸãã ããã¯GNUã
COMMONå€æ°ã®æ£ããé 眮ãå¯èœã«ããPEãã¡ã€ã«åœ¢åŒã®æ¡åŒµ
ã³ãŒããçæãããšãã«äœ¿çšããå¿ èŠããããŸãã GCCã次ã®ããšãæ€åºãããšãããã©ã«ãã§æå¹ã«ãªããŸãã
æ§æäžã«èŠã€ãã£ãã¿ãŒã²ããã¢ã»ã³ãã©ãŒããã®æ©èœããµããŒãããŸãã
以äžãåç §ããŠãã ãã i386 ãš x86-64 ãªãã·ã§ã³ æšæºãªãã·ã§ã³ã®å Žåã
IA-64 ãªãã·ã§ã³
ãããã¯ã -m IntelIA-64ã¢ãŒããã¯ãã£çšã«å®çŸ©ããããªãã·ã§ã³ã
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã ããã¯HP-UXã®ããã©ã«ãã§ãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã ããã¯ãAIX5ããã³GNU/Linuxã®ããã©ã«ãã§ãã
-mgnu-as
-mno-gnu-as
GNUã¢ã»ã³ãã©ã®ã³ãŒããçæããïŒãŸãã¯çæããªãïŒã ãããããã©ã«ãã§ãã
-mgnu-ld
-mno-gnu-ld
GNUãªã³ã«ã®ã³ãŒããçæããïŒãŸãã¯çæããªãïŒã ãããããã©ã«ãã§ãã
-mno-pic
ã°ããŒãã«ãã€ã³ã¿ã¬ãžã¹ã¿ã䜿çšããªãã³ãŒããçæããŸãã çµæã¯äœçœ®ã§ã¯ãããŸãã
ç¬ç«ããã³ãŒãã§ãããIA-64ABIã«éåããŠããŸãã
-mvolatile-asm-åæ¢
-mno-volatile-asm-stop
æ®çºæ§asmã¹ããŒãã¡ã³ãã®çŽåãšçŽåŸã«ã¹ãããããããçæããŸãïŒãŸãã¯çæããŸããïŒã
-mã¬ãžã¹ã¿å
-mno ã¬ãžã¹ã¿å
çæããïŒãŸãã¯çæããªãïŒ in, LOC, ã§ã ã¹ã¿ãã¯ã¬ãžã¹ã¿ã®ã¬ãžã¹ã¿åã ãã
ã¢ã»ã³ãã©ã®åºåãèªã¿ããããªãå ŽåããããŸãã
-mno-sdata
-msdata
ã¹ã¢ãŒã«ããŒã¿ã»ã¯ã·ã§ã³ã䜿çšããæé©åãç¡å¹ïŒãŸãã¯æå¹ïŒã«ããŸãã ããã¯åœ¹ã«ç«ã€ãããããŸãã
ãªããã£ãã€ã¶ãŒã®ãã°ãåé¿ããããã
-må®æ°-gp
åäžã®å®æ°ã°ããŒãã«ãã€ã³ã¿å€ã䜿çšããã³ãŒããçæããŸãã ããã¯æ¬¡ã®å Žåã«äŸ¿å©ã§ã
ã«ãŒãã«ã³ãŒãã®ã³ã³ãã€ã«ã
-mauto-pic
èªå·±åé 眮å¯èœãªã³ãŒããçæããŸãã ããã¯ã -må®æ°-gpã ããã¯äŸ¿å©ã§ã
ãã¡ãŒã ãŠã§ã¢ã³ãŒããã³ã³ãã€ã«ãããšãã
-minline-float-divide-min-latency
æå°ã¬ã€ãã³ã·ãŒã䜿çšããŠæµ®åå°æ°ç¹å€ã®ã€ã³ã©ã€ã³é€ç®ã®ã³ãŒããçæãã
ã¢ã«ãŽãªãºã ã
-minline-float-divide-max-ã¹ã«ãŒããã
æ倧ã¹ã«ãŒãããã䜿çšããŠãæµ®åå°æ°ç¹å€ã®ã€ã³ã©ã€ã³é€ç®çšã®ã³ãŒããçæããŸã
ã¢ã«ãŽãªãºã ã
-mno-inline-float-divide
æµ®åå°æ°ç¹å€ã®é€ç®çšã®ã€ã³ã©ã€ã³ã³ãŒããçæããªãã§ãã ããã
-minline-int-divide-min-latency
æå°ã¬ã€ãã³ã·ãŒã䜿çšããŠæŽæ°å€ã®ã€ã³ã©ã€ã³é€ç®ã®ã³ãŒããçæãã
ã¢ã«ãŽãªãºã ã
-minline-int-divide-max-ã¹ã«ãŒããã
æ倧ã¹ã«ãŒãããã䜿çšããŠæŽæ°å€ã®ã€ã³ã©ã€ã³é€ç®çšã®ã³ãŒããçæãã
ã¢ã«ãŽãªãºã ã
-mno-inline-int-divide
æŽæ°å€ã®é€ç®çšã®ã€ã³ã©ã€ã³ã³ãŒããçæããªãã§ãã ããã
-minline-sqrt-min-latency
æå°é 延ã¢ã«ãŽãªãºã ã䜿çšããŠãã€ã³ã©ã€ã³å¹³æ¹æ ¹ã®ã³ãŒããçæããŸãã
-minline-sqrt-max-ã¹ã«ãŒããã
æ倧ã¹ã«ãŒãããã¢ã«ãŽãªãºã ã䜿çšããŠãã€ã³ã©ã€ã³å¹³æ¹æ ¹ã®ã³ãŒããçæããŸãã
-mno-ã€ã³ã©ã€ã³-sqrt
ãsqrtãã®ã€ã³ã©ã€ã³ã³ãŒããçæããªãã§ãã ããã
-æ··ä¹±-çã£ã
-mno-fusion-madd
èåãããä¹ç®/å ç®ãŸãã¯ä¹ç®/æžç®ã䜿çšããã³ãŒããçæããïŒçæããªãïŒ
æ瀺ã ããã©ã«ãã§ã¯ããããã®åœä»€ã䜿çšããŸãã
-mno-dwarf2-asm
-mdwarf2-asm
DWARF 2ã®è¡çªå·ã®ãããã°æ å ±çšã®ã¢ã»ã³ãã©ã³ãŒããçæããªãïŒãŸãã¯çæããªãïŒã
ããã¯ãGNUã¢ã»ã³ãã©ã䜿çšããªãå Žåã«åœ¹ç«ã€ããšããããŸãã
-ã»ãŒåæ¢ããã
-mno-early-stop-bits
ã¹ãããããããã次ã®åœä»€ã®çŽåãããåã«é 眮ã§ããããã«ããŸãã
ã¹ãããããããããªã¬ãŒããŸããã ããã«ãããåœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãæ¹åã§ããŸãããå¿ ããããããšã¯éããŸããã
ããããã
-mfixed-range =ã¬ãžã¹ã¿ç¯å²
æå®ãããã¬ãžã¹ã¿ç¯å²ãåºå®ã¬ãžã¹ã¿ãšããŠæ±ãã³ãŒããçæããŸãã åºå®ã¬ãžã¹ã¿
ã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã䜿çšã§ããªããã®ã§ãã ããã¯ãã«ãŒãã«ãã³ã³ãã€ã«ãããšãã«åœ¹ç«ã¡ãŸã
ã³ãŒãã ã¬ãžã¹ã¿ç¯å²ã¯ãããã·ã¥ã§åºåãããXNUMXã€ã®ã¬ãžã¹ã¿ãšããŠæå®ãããŸãã å€æ°
ã¬ãžã¹ã¿ç¯å²ã¯ãã³ã³ãã§åºåã£ãŠæå®ã§ããŸãã
-mtls-size =TLS ãµã€ãº
å³æTLSãªãã»ããã®ããããµã€ãºãæå®ããŸãã æå¹ãªå€ã¯14ã22ãããã³64ã§ãã
-mtune =CPUã¿ã€ã
ç¹å®ã®CPUã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ã調æŽããŸããæå¹ãªå€ã¯æ¬¡ã®ãšããã§ãã ã€ã¿ããŠã ,
ã€ã¿ããŠã 1, å·ã€ãã, ã€ã¿ããŠã 2, ãããã³ãªãŒ.
-ãã«ã32
-mlp64
32ããããŸãã¯64ãããç°å¢çšã®ã³ãŒããçæããŸãã 32ãããç°å¢ã¯intãèšå®ããŸãã
longããã³32ããããžã®ãã€ã³ã¿ã 64ãããç°å¢ã§ã¯ãintã32ãããããã³longã«èšå®ãããŸãã
64ããããžã®ãã€ã³ã¿ã ãããã¯HP-UXåºæã®ãã©ã°ã§ãã
-mno-sched-br-data-spec
-msched-br-ããŒã¿ä»æ§
ãªããŒãåã®ïŒDis / EnïŒå¯èœãªããŒã¿ææ©çã¹ã±ãžã¥ãŒãªã³ã°ã ããã«ããã
ãld.aãåœä»€ããã³å¯Ÿå¿ãããã§ãã¯åœä»€ïŒãld.cã/ãchk.aãïŒã The
ããã©ã«ãã¯ãç¡å¹ãã§ãã
-msched-ar-data-spec
-mno-sched-ar-data-spec
ãªããŒãåŸã®ïŒEn / DisïŒå¯èœãªããŒã¿ææ©çã¹ã±ãžã¥ãŒãªã³ã°ã ããã«ããã
ãld.aãåœä»€ããã³å¯Ÿå¿ãããã§ãã¯åœä»€ïŒãld.cã/ãchk.aãïŒã The
ããã©ã«ãã¯ãæå¹ãã§ãã
-mno-sched-control-spec
-msched-control-spec
ïŒDis / EnïŒå¯èœãªå¶åŸ¡ææ©çã¹ã±ãžã¥ãŒãªã³ã°ã ãã®æ©èœã¯ã
ãªãŒãžã§ã³ã¹ã±ãžã¥ãŒãªã³ã°ïŒã€ãŸãããªããŒãåïŒã ããã«ããããld.sããçæãããŸã
æ瀺ããã³å¯Ÿå¿ãããã§ãã¯æ瀺ãchk.sãã ããã©ã«ãã¯
ãç¡å¹ã«ãããã
-msched-br-in-data-spec
-mno-sched-br-in-data-spec
ããŒã¿ã«äŸåããåœä»€ã®ïŒEn / DisïŒå¯èœãªææ©çã¹ã±ãžã¥ãŒãªã³ã°
ãªããŒãåã®ææ©çããŒãã ããã¯ã§ã®ã¿æå¹ã§ã -msched-br-ããŒã¿ä»æ§
æå¹ã ããã©ã«ãã¯ãenableãã§ãã
-msched-ar-in-data-spec
-mno-sched-ar-in-data-spec
ããŒã¿ã«äŸåããåœä»€ã®ïŒEn / DisïŒå¯èœãªææ©çã¹ã±ãžã¥ãŒãªã³ã°
ãªããŒãåŸã®ææ©çããŒãã ããã¯ã§ã®ã¿æå¹ã§ã -msched-ar-data-spec
æå¹ã ããã©ã«ãã¯ãenableãã§ãã
-msched-in-control-spec
-mno-sched-in-control-spec
ã«äŸåããåœä»€ã®ïŒEn / DisïŒå¯èœãªææ©çã¹ã±ãžã¥ãŒãªã³ã°
ææ©çè² è·ãå¶åŸ¡ããŸãã ããã¯ã§ã®ã¿æå¹ã§ã -msched-control-spec æå¹ã«ãªããŸããã
ããã©ã«ãã¯ãenableãã§ãã
-mno-sched-prefer-non-data-spec-insns
-msched-prefer-non-data-spec-insns
æå¹ã«ãããšãããŒã¿ææ©çåœä»€ãã¹ã±ãžã¥ãŒã«ã«éžæãããŸãã
çŸæç¹ã§ä»ã®éžæè¢ã ããã«ãããããŒã¿æšæž¬ãããã«æŽ»çšã§ããŸã
ä¿å®çã ããã©ã«ãã¯ãç¡å¹ãã§ãã
-mno-sched-prefer-non-control-spec-insn
-msched-prefer-non-control-spec-insn
æå¹ã«ãããšãå¶åŸ¡ææ©çåœä»€ãã¹ã±ãžã¥ãŒã«ã«éžæãããã®ã¯ã
çŸæç¹ã§ã¯ä»ã®éžæè¢ã¯ãããŸããã ããã«ãããå¶åŸ¡ææ©ãå€ãå©çšãããŸã
ããä¿å®çã ããã©ã«ãã¯ãç¡å¹ãã§ãã
ã¯ãªãã£ã«ã«ãã¹ã®-mno-sched-count-spec-in-critical-path
ã¯ãªãã£ã«ã«ãã¹ã®-msched-count-spec-in-critical-path
æå¹ã«ãããšãææ©çãªäŸåé¢ä¿ãèšç®äžã«èæ ®ãããŸãã
æ瀺ã®åªå é äœã ããã«ãããæšæž¬ãããå°ã掻çšã§ããŸã
ä¿å®çã ããã©ã«ãã¯ãç¡å¹ãã§ãã
-msched-spec-ldc
åçŽãªããŒã¿æšæž¬ãã§ãã¯ã䜿çšããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
-msched-control-spec-ldc
ã³ã³ãããŒã«ã®æšæž¬ã«ã¯ç°¡åãªãã§ãã¯ã䜿çšããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
-msched-stop-bits-after-ever-cycle
ã¹ã±ãžã¥ãŒãªã³ã°æã«ããã¹ãŠã®ãµã€ã¯ã«ã®åŸã«ã¹ãããããããé 眮ããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã
-msched-fp-mem-deps-zero-cost
æµ®åå°æ°ç¹ã¹ãã¢ãšããŒãã次ã®å Žåã«ç«¶åãåŒãèµ·ããå¯èœæ§ã¯äœããšæ³å®ããŸãã
åãåœä»€ã°ã«ãŒãã«é 眮ãããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ç¡å¹ã«ãªã£ãŠããŸãã
-msel-sched-dont-check-control-spec
éžæçã¹ã±ãžã¥ãŒãªã³ã°ã§å¶åŸ¡ææ©ã®ãã§ãã¯ãçæããŸãã ãã®ãã©ã°ã¯
ããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ãŠããŸãã
-msched-max-memory-insns =ããã¯ã¹ã€ã³SNS
åœä»€ã°ã«ãŒãããšã®ã¡ã¢ãªinsnã®æ°ãå¶éããåªå 床ãäœãããŸã
åãåœä»€ã°ã«ãŒãã§ã¹ã±ãžã¥ãŒã«ããããšããŠããåŸç¶ã®ã¡ã¢ãªinsnã
ãã£ãã·ã¥ãã³ã¯ã®ç«¶åãé²ãããã«é »ç¹ã«åœ¹ç«ã¡ãŸãã ããã©ã«ãå€ã¯1ã§ãã
-msched-max-memory-insn-ããŒããªããã
ã§æå®ãããå¶éãäœæããŸã msched-max-memory-insn å³ããå¶éããã以äžã®çŠæ¢
åœä»€ã°ã«ãŒãã®ãã®æ°ããã ãã以å€ã®å Žåãå¶éã¯ããœããããã€ãŸã
å¶éã«éããå Žåã¯éã¡ã¢ãªæäœãåªå ãããŸãããã¡ã¢ãª
æäœã¯ãŸã ã¹ã±ãžã¥ãŒã«ãããŠããå¯èœæ§ããããŸãã
LM32 ãªãã·ã§ã³
ããŒãã³ -m LatticeMico32ã¢ãŒããã¯ãã£ã®ãªãã·ã§ã³ã¯æ¬¡ã®ããã«å®çŸ©ãããŠããŸãã
-mbarrel-shift-察å¿
ãã¬ã«ã·ãã¿åœä»€ãæå¹ã«ããŸãã
-mdivide察å¿
é€ç®ãšã¢ãžã¥ã©ã¹ã®åœä»€ãæå¹ã«ããŸãã
-mmultiply-察å¿
ä¹ç®åœä»€ãæå¹ã«ããŸãã
-msign-extend-enabled
笊å·æ¡åŒµåœä»€ãæå¹ã«ããŸãã
-ãã¥ãŒã¶ãŒå¯Ÿå¿
ãŠãŒã¶ãŒå®çŸ©ã®åœä»€ãæå¹ã«ããŸãã
M32C ãªãã·ã§ã³
-mcpu =å
ã³ãŒããçæããCPUãéžæããŸãã å ã®ããããã§ããå¯èœæ§ããããŸã r8c R8C/Tinyçš
ã·ãªãŒãºã m16c M16CïŒæ倧/ 60ïŒã·ãªãŒãºã®å Žåã m32cm M16C / 80ã·ãªãŒãºã®å ŽåããŸã㯠m32c
M32C/80ã·ãªãŒãºçšã
-msim
ããã°ã©ã ãã·ãã¥ã¬ãŒã¿ãŒã§å®è¡ãããããšãæå®ããŸãã ããã«ããã代æ¿ãçºçããŸã
ããšãã°ããã¡ã€ã«I/OããµããŒããããªã³ã¯å ã®ã©ã³ã¿ã€ã ã©ã€ãã©ãªã ããªãã¯ãããŸãã
å®éã®ããŒããŠã§ã¢ã§å®è¡ãããããã°ã©ã ãçæããå Žåã¯ããã®ãªãã·ã§ã³ã䜿çšããŠãã ããã 絶察ã§ã
å¿ èŠãªI/Oé¢æ°çšã«ç¬èªã®ã©ã³ã¿ã€ã ã©ã€ãã©ãªãæäŸããŸãã
-memregs =æ°
ã³ãŒãçæäžã«GCCã䜿çšããã¡ã¢ãªããŒã¹ã®ç䌌ã¬ãžã¹ã¿ã®æ°ãæå®ããŸãã
ãããã®ç䌌ã¬ãžã¹ã¿ã¯å®éã®ã¬ãžã¹ã¿ãšåãããã«äœ¿çšããããããäž¡è ã®éã«ã¯ãã¬ãŒããªãããããŸãã
ã³ãŒãã䜿çšå¯èœãªã¬ãžã¹ã¿ã«é©åãããGCCã®æ©èœãããã³ããã©ãŒãã³ã¹ã®äœäž
ã¬ãžã¹ã¿ã®ä»£ããã«ã¡ã¢ãªã䜿çšããŸãã ããã°ã©ã å ã®ãã¹ãŠã®ã¢ãžã¥ãŒã«ã¯
ãã®ãªãã·ã§ã³ãšåãå€ã§ã³ã³ãã€ã«ãããŸãã ãã®ãããããã䜿çšããŠã¯ãããŸãã
GCCã®ããã©ã«ãã®ã©ã³ã¿ã€ã ã©ã€ãã©ãªã®ãªãã·ã§ã³ã
M32R / D ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãã«ããµã¹M32R/Dã¢ãŒããã¯ãã£çšã«å®çŸ©ãããŠããŸãã
-m32r2
M32R/2ã®ã³ãŒããçæããŸãã
-m32rx
M32R/Xã®ã³ãŒããçæããŸãã
-m32r
M32Rã®ã³ãŒããçæããŸãã ãããããã©ã«ãã§ãã
-mmodel = small
ãã¹ãŠã®ãªããžã§ã¯ããã¡ã¢ãªã®äžäœ16MBã«ãããšæ³å®ããŸãïŒãã®ããããããã®ã¢ãã¬ã¹ã¯
ãld24ãåœä»€ã§ããŒããããŸãïŒããã¹ãŠã®ãµãã«ãŒãã³ã
ãblãåœä»€ã ãããããã©ã«ãã§ãã
ç¹å®ã®ãªããžã§ã¯ãã®ã¢ãã¬ã¹æå®å¯èœæ§ã¯ããmodelãå±æ§ã䜿çšããŠèšå®ã§ããŸãã
-mmodel =medium
ãªããžã§ã¯ãã32ãããã¢ãã¬ã¹ç©ºéã®ã©ãã«ãã£ãŠããããšä»®å®ããŸãïŒã³ã³ãã€ã©ãçæããŸãïŒ
ã¢ãã¬ã¹ãããŒãããããã®ãseth/add3ãåœä»€ïŒãããã³ãã¹ãŠã®ãµãã«ãŒãã³ã
ãblãåœä»€ã§å°éå¯èœã
-mmodel = large
ãªããžã§ã¯ãã32ãããã¢ãã¬ã¹ç©ºéã®ã©ãã«ãã£ãŠããããšä»®å®ããŸãïŒã³ã³ãã€ã©ãçæããŸãïŒ
ã¢ãã¬ã¹ãããŒãããããã®ãseth/add3ãåœä»€ïŒãããã³ãµãã«ãŒãã³ãããã§ã¯ãªãå¯èœæ§ããããšæ³å®
ãblãåœä»€ã§å°éå¯èœïŒã³ã³ãã€ã©ã¯ã¯ããã«é ãçæ
ãseth/add3 / jlãåœä»€ã·ãŒã±ã³ã¹ïŒã
-msdata = none
å°ããªããŒã¿é åã®äœ¿çšãç¡å¹ã«ããŸãã å€æ°ã¯æ¬¡ã®ããããã«å ¥ããããŸã .data, .bssãŸãã¯
.rodata ("section" å±æ§ãæå®ãããŠããªãå Žå)ã ãããããã©ã«ãã§ãã
å°ããªããŒã¿é åã¯ã»ã¯ã·ã§ã³ã§æ§æãããŠããŸã .sdata ãš .sbss. ãªããžã§ã¯ãã¯æ瀺çã«
ãããã®ã»ã¯ã·ã§ã³ã®ããããã䜿çšããŠããã»ã¯ã·ã§ã³ãå±æ§ã§å°ããªããŒã¿é åã«é 眮ããŸãã
-msdata = sdata
å°ããªã°ããŒãã«ããŒã¿ãšéçããŒã¿ãå°ããªããŒã¿é åã«é 眮ããŸãããç¹å¥ãªããŒã¿ã¯çæããªãã§ãã ãã
ããããåç §ããã³ãŒãã
-msdata = use
å°ããªã°ããŒãã«ããŒã¿ãšéçããŒã¿ãå°ããªããŒã¿é åã«é 眮ããç¹å¥ãªããŒã¿ãçæããŸã
ããããåç §ããããã®æ瀺ã
-G NUM
ã°ããŒãã«ãªããžã§ã¯ããšéçãªããžã§ã¯ãã以äžã«é 眮ããŸã NUM å°ããªããŒã¿ãžã®ãã€ããŸãã¯
éåžžã®ããŒã¿ãŸãã¯BSSã»ã¯ã·ã§ã³ã®ä»£ããã«BSSã»ã¯ã·ã§ã³ã ã®ããã©ã«ãå€ NUM is
8ã 㶠-msdata ãªãã·ã§ã³ã¯æ¬¡ã®ããããã«èšå®ããå¿ èŠããããŸã ããŒã¿ or ã€ãããŸã ãã®ãªãã·ã§ã³ã«ã¯
å¹æã
ãã¹ãŠã®ã¢ãžã¥ãŒã«ã¯åããã®ã§ã³ã³ãã€ã«ããå¿ èŠããããŸã -G NUM 䟡å€ã å¥ã®ã³ã³ãã€ã«
ã®å€ NUM åäœããå Žåãšåäœããªãå ŽåããããŸãã ããã§ãªãå Žåããªã³ã«ãŒã¯ãšã©ãŒãåºããŸã
ã¡ãã»ãŒãž---äžæ£ãªã³ãŒããçæãããŸããã
-mdebug
ã³ã³ãã€ã©ã®M32Råºæã®ã³ãŒãã«ã圹ç«ã€å¯èœæ§ã®ããçµ±èšã衚瀺ãããŸã
ããã°ã©ã ã®ãããã°ã§ã
-æªæ§ã«ãŒã
ãã¹ãŠã®ã«ãŒãã32ãã€ãå¢çã«æããŸãã
-mno-align-loops
ã«ãŒãã«å¯ŸããŠ32ãã€ãã®ã¢ã©ã€ã³ã¡ã³ãã匷å¶ããªãã§ãã ããã ãããããã©ã«ãã§ãã
-missue-rate =æ°
åé¡ æ° ãµã€ã¯ã«ããšã®åœä»€ã æ° 1ãŸãã¯2ã®ã¿ã«ããããšãã§ããŸãã
-mbranch-cost =æ°
æ° 1ãŸãã¯2ã®ã¿ã«ããããšãã§ããŸãã1ã®å Žåãæ¡ä»¶ä»ããããåå²ãåªå ãããŸã
ã³ãŒããããã2ã®å Žåãå察ãé©çšãããŸãã
-mflush-trap =æ°
ãã£ãã·ã¥ã®ãã©ãã·ã¥ã«äœ¿çšãããã©ããçªå·ãæå®ããŸãã ããã©ã«ãã¯12ã§ããæå¹
æ°åã¯0ãã15ãŸã§ã§ãã
-mno-flush-trap
ãã©ããã䜿çšããŠãã£ãã·ã¥ããã©ãã·ã¥ã§ããªãããšãæå®ããŸãã
-mflush-func =å
ãã£ãã·ã¥ããã©ãã·ã¥ããããã«åŒã³åºããªãã¬ãŒãã£ã³ã°ã·ã¹ãã é¢æ°ã®ååãæå®ããŸãã The
ããã©ã«ã㯠_ãã©ãã·ã¥_ãã£ãã·ã¥ããã ããé¢æ°åŒã³åºãã¯ããã©ããã䜿çšã§ããªãå Žåã«ã®ã¿äœ¿çšãããŸãã
-mno-flush-func
ãã£ãã·ã¥ããã©ãã·ã¥ããããã®OSæ©èœããªãããšã瀺ããŸãã
M680x0 ãªãã·ã§ã³
ãããã¯ã -m M680x0ããã³ColdFireããã»ããµçšã«å®çŸ©ããããªãã·ã§ã³ã ããã©ã«ãèšå®
ã³ã³ãã€ã©ãŒã®æ§ææã«éžæãããã¢ãŒããã¯ãã£ãŒã«ãã£ãŠç°ãªããŸãã ããã©ã«ã
æãäžè¬çãªéžæè¢ã以äžã«ç€ºããŸãã
-XNUMXæ=ã¢ãŒã
ç¹å®ã®M680x0ãŸãã¯ColdFireåœä»€ã»ããã¢ãŒããã¯ãã£ã®ã³ãŒããçæããŸãã
ã®èš±å®¹å€ ã¢ãŒã M680x0ã¢ãŒããã¯ãã£ã®å Žåã¯æ¬¡ã®ãšããã§ãã 68000, 68010, 68020, 68030,
68040, 68060 ãš cpu32ã ColdFireã¢ãŒããã¯ãã£ã¯ãFreescaleã®
ISAã®åé¡ãšèš±å®¹å€ã¯æ¬¡ã®ãšããã§ãã ã€ãµã¢, ã€ãµãã©ã¹, ã€ã¶ã ãš ã¢ã€ã¶ãã¯.
GCC ã¯ãã¯ããå®çŸ©ããŸã __mcfã¢ãŒã__ ColdFire ã¿ãŒã²ããã®ã³ãŒããçæããŠãããšãã¯ãã€ã§ãã
ãã® ã¢ãŒã ãã®ãã¯ãã§ã¯ã -è¡é² äžèšã®åŒæ°ã
äžç·ã«äœ¿çšãããšã -è¡é² ãš -ã ãã¥ãŒã³ é¡äŒŒã®ãã¡ããªã§å®è¡ãããã³ãŒããéžæããŸã
ããã»ããµã§ãããç¹å®ã®ãã€ã¯ãã¢ãŒããã¯ãã£çšã«æé©åãããŠããŸãã
-mcpu =CPU
ç¹å®ã®M680x0ãŸãã¯ColdFireããã»ããµã®ã³ãŒããçæããŸãã M680x0 CPUsã¯ïŒ
68000, 68010, 68020, 68030, 68040, 68060, 68302, 68332 ãš cpu32ã ColdFire CPUs
以äžã®è¡šã«ãCPUããã¡ããªã«åé¡ãããã®ã瀺ããŸãã
家æ ïŒ -mcpu åŒæ°
51 : 51 51ac 51ag 51cn 51em 51je 51jf 51jg 51jm 51 mm 51qe 51qm
5206 : 5202 5204 5206
5206e : 5206e
5208 : 5207 5208
5211a : 5210a 5211a
5213 : 5211 5212 5213
5216 : 5214 5216
52235 : 52230 52231 52232 52233 52234 52235
5225 : 5224 5225
52259 : 52252 52254 52255 52256 52258 52259
5235 : 5232 5233 5234 5235 523x
5249 : 5249
5250 : 5250
5271 : 5270 5271
5272 : 5272
5275 : 5274 5275
5282 : 5280 5281 5282 528x
53017 : 53011 53012 53013 53014 53015 53016 53017
5307 : 5307
5329 : 5327 5328 5329 532x
5373 : 5372 5373 537x
5407 : 5407
5475 : 5470 5471 5472 5473 5474 5475 547x 5480 5481 5482 5483 5484 5485
-mcpu =CPU ãªãŒããŒã©ã€ã -XNUMXæ=ã¢ãŒã if ã¢ãŒã ãšäºææ§ããããŸã CPUã ä»ã®çµã¿åãã
-mcpu ãš -è¡é² æåŠãããŸãã
GCC ã¯ãã¯ããå®çŸ©ããŸã __mcf_cpu_CPU ColdFireã¿ãŒã²ããã®å Žå CPU ãéžæãããŠããŸãã ãŸã
å®çŸ© __mcf_family_家æãããã§ã®å€ 家æ äžèšã®è¡šã§äžããããŸãã
-mtune =æ²
ã«ãã£ãŠèšå®ãããå¶çŽå ã§ç¹å®ã®ãã€ã¯ãã¢ãŒããã¯ãã£ã®ã³ãŒãã調æŽããŸã -è¡é²
ãš -mcpuã M680x0ãã€ã¯ãã¢ãŒããã¯ãã£ã¯æ¬¡ã®ãšããã§ãã 68000, 68010, 68020, 68030, 68040,
68060 ãš cpu32ã ColdFireãã€ã¯ãã¢ãŒããã¯ãã£ã¯æ¬¡ã®ãšããã§ãã cfv1, cfv2, cfv3, cfv4 ãš
cfv4e.
䜿çšããããšãã§ããŸã -mtune = 68020-40 68020ã§æ¯èŒçé©åã«å®è¡ããå¿ èŠãããã³ãŒãã®å Žåã
68030ããã³68040ã¿ãŒã²ããã -mtune = 68020-60 åæ§ã§ããã68060ã®ã¿ãŒã²ãããå«ãŸããŠããŸã
è¯ãã ãããã®XNUMXã€ã®ãªãã·ã§ã³ã¯ããšåããã¥ãŒãã³ã°æ±ºå®ãéžæããŸã -m68020-40 ãš -m68020-60
ã
GCC ã¯ãã¯ããå®çŸ©ããŸã __mcã¢ãŒã ãš __mcã¢ãŒã__ 680x0ã¢ãŒããã¯ãã£ã«ãã¥ãŒãã³ã°ããå Žå
ã¢ãŒã. ãŸãã mcã¢ãŒã ã©ã¡ããã§ãªãéã -ã¢ã³ã· ãŸãã¯éGNU -æšæº ãªãã·ã§ã³ã䜿çšãããŸãã
GCCããã«ãã£ãŠéžæãããããŸããŸãªã¢ãŒããã¯ãã£ã«åãããŠèª¿æŽããŠããå Žå -mtune = 68020-40 or
-mtune = 68020-60ãç¯å²å ã®ãã¹ãŠã®ã¢ãŒããã¯ãã£ã®ãã¯ããå®çŸ©ããŸãã
GCC ã¯ãã¯ããå®çŸ©ããŸãã åæ©ã__ ColdFireãã€ã¯ãã¢ãŒããã¯ãã£ã«ãã¥ãŒãã³ã°ããå Žå
æ©ãããã§ã æ©ã äžèšã®åŒæ°ã®XNUMXã€ã§ãã
-m68000
-mc68000
68000ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68000ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68000æ=XNUMX.
ãã®ãªãã·ã§ã³ã¯ã68000ãå«ã000ãŸãã¯EC68008ã³ã¢ã®ãã€ã¯ãã³ã³ãããŒã©ãŒã«äœ¿çšããŸãã
68302ã68306ã68307ã68322ã68328ãããã³68356ã
-m68010
68010ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68010ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68010æ=XNUMX.
-m68020
-mc68020
68020ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68020ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68020æ=XNUMX.
-m68030
68030ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68030ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68030æ=XNUMX.
-m68040
68040ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68040ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68040æ=XNUMX.
ãã®ãªãã·ã§ã³ã¯ãã«ãã£ãŠãšãã¥ã¬ãŒãããå¿ èŠããã68881/68882åœä»€ã®äœ¿çšãçŠæ¢ããŸãã
68040ã®ãœãããŠã§ã¢ã68040ã«ãšãã¥ã¬ãŒãããã³ãŒãããªãå Žåã¯ããã®ãªãã·ã§ã³ã䜿çšããŠãã ãã
ãããã®æ瀺ã
-m68060
68060ã®åºåãçæããŸããããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
68060ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -68060æ=XNUMX.
ãã®ãªãã·ã§ã³ã¯ã68020ããã³68881/68882åœä»€ã®äœ¿çšãçŠæ¢ããŸãã
68060ã®ãœãããŠã§ã¢ã«ãã£ãŠãšãã¥ã¬ãŒããããŸãã68060ã«ã³ãŒãããªãå Žåã¯ããã®ãªãã·ã§ã³ã䜿çšããŠãã ãã
ãããã®åœä»€ããšãã¥ã¬ãŒãããŸãã
-mcpu32
CPU32ã®åºåãçæããŸãã ããã¯ãã³ã³ãã€ã©ã次ã®ããã«æ§æãããŠããå Žåã®ããã©ã«ãã§ãã
CPU32ããŒã¹ã®ã·ã¹ãã ã ãšåçã§ã -march = cpu32.
ãã®ãªãã·ã§ã³ã¯ã32ãå«ãCPU32ãŸãã¯CPU68330+ã³ã¢ãæèŒãããã€ã¯ãã³ã³ãããŒã©ãŒã«äœ¿çšããŸãã
68331ã68332ã68333ã68334ã68336ã68340ã68341ã68349ã68360ã
-m5200
520XColdFireCPUã®åºåãçæããŸãã ããã¯ãã³ã³ãã€ã©ã
520XããŒã¹ã®ã·ã¹ãã çšã«æ§æãããŠããŸãã ãšåçã§ã -mcpu = 5206ããããŠä»
ãã®ãªãã·ã§ã³ãæ¯æããŠéæšå¥šã«ãªããŸããã
ãã®ãªãã·ã§ã³ã¯ãMCF5200ãMCF5202ã
MCF5204ããã³MCF5206ã
-m5206e
5206eColdFireCPUã®åºåãçæããŸãã ãã®ãªãã·ã§ã³ã¯å»æ¢ããã
åçã®ãã® -mcpu = 5206e.
-m528x
ColdFire528Xãã¡ããªã®ã¡ã³ããŒã®åºåãçæããŸãã ãªãã·ã§ã³ã¯çŸåš
åçã®ãã®ãæ¯æããŠéæšå¥š -mcpu = 528x.
-m5307
ColdFire5307CPUã®åºåãçæããŸãã ãã®ãªãã·ã§ã³ã¯å»æ¢ããã
åçã® -mcpu = 5307.
-m5407
ColdFire5407CPUã®åºåãçæããŸãã ãã®ãªãã·ã§ã³ã¯å»æ¢ããã
åçã® -mcpu = 5407.
-mcfv4e
ColdFire V4eãã¡ããªCPUã®åºåãçæããŸãïŒäŸïŒ547x / 548xïŒã ããã«ã¯ã
ããŒããŠã§ã¢æµ®åå°æ°ç¹åœä»€ã ãªãã·ã§ã³ã¯ãšåçã§ã -mcpu = 547xã¯
çŸåšããã®ãªãã·ã§ã³ãåªå ããŠéæšå¥šã«ãªã£ãŠããŸãã
-m68020-40
æ°ããåœä»€ã䜿çšããã«ã68040ã®åºåãçæããŸãã ãã®çµæ
68020/68881ãŸãã¯68030ã®ããããã§æ¯èŒçå¹ççã«å®è¡ã§ããã³ãŒãå
68040.çæãããã³ãŒãã¯ãã§ãšãã¥ã¬ãŒãããã68881åœä»€ã䜿çšããŸã
68040.
ãªãã·ã§ã³ã¯ãšåçã§ã -68020æ=XNUMX -mtune = 68020-40.
-m68020-60
æ°ããåœä»€ã䜿çšããã«ã68060ã®åºåãçæããŸãã ãã®çµæ
68020/68881ãŸãã¯68030ã®ããããã§æ¯èŒçå¹ççã«å®è¡ã§ããã³ãŒãå
68040.çæãããã³ãŒãã¯ãã§ãšãã¥ã¬ãŒãããã68881åœä»€ã䜿çšããŸã
68060.
ãªãã·ã§ã³ã¯ãšåçã§ã -68020æ=XNUMX -mtune = 68020-60.
-mhard-float
-m68881
æµ®åå°æ°ç¹åœä»€ãçæããŸãã ããã¯68020以éã®ããã©ã«ãã§ããã
FPU ãæèŒãã ColdFire ããã€ã¹çšã ãã¯ããå®çŸ©ããŸã __HAVE_68881__ M680x0 ã§
ã¿ãŒã²ãããš __mcffpu__ ColdFire ã¿ãŒã²ããã§ã
-msoft-float
æµ®åå°æ°ç¹åœä»€ãçæããªãã§ãã ããã 代ããã«ã©ã€ãã©ãªåŒã³åºãã䜿çšããŠãã ããã ããã¯
68000ã68010ãããã³68832ã¿ãŒã²ããã®ããã©ã«ãã ããã¯ColdFireã®ããã©ã«ãã§ããããŸã
FPUãæããªãããã€ã¹ã
-mdiv
-mno-div
ColdFireããŒããŠã§ã¢ã®é€ç®ãšå°äœã®åœä»€ãçæããŸãïŒçæããŸããïŒã ããã
-è¡é² ãªãã§äœ¿çšãããŸã -mcpuãããã©ã«ãã¯ãColdFireã¢ãŒããã¯ãã£ã®å Žåã¯ããªã³ããããªããã§ãã
M680x0ã¢ãŒããã¯ãã£ã®å Žåã ãã以å€ã®å Žåãããã©ã«ãã¯ã¿ãŒã²ããCPUããååŸãããŸãïŒãããã
ããã©ã«ãã®CPUããŸãã¯ã«ãã£ãŠæå®ãããCPU -mcpuïŒã ããšãã°ãããã©ã«ãã¯ããªããã§ã
for -mcpu = 5206 ããã³ããªã³ã -mcpu = 5206e.
GCC ã¯ãã¯ããå®çŸ©ããŸã __mcfhwdiv__ ãã®ãªãã·ã§ã³ãæå¹ã«ãªã£ãŠããå Žåã
-mshort
ã¿ã€ããintãã¯ãshortintãã®ããã«16ãããå¹ ã§ãããšèããŠãã ããã ããã«ããã©ã¡ãŒã¿
ã¹ã¿ãã¯ã«æž¡ããããã®ã¯ãAPIããã®APIã䜿çšããŠããã¿ãŒã²ããã§ãã16ãããå¢çã«æããããŸãã
32ããããžã®ææ Œã矩åä»ããŠããŸãã
-mno-short
ã¿ã€ããintãã16ãããå¹ ãšèŠãªããªãã§ãã ããã ãããããã©ã«ãã§ãã
-mnobitfield
-mno-ããããã£ãŒã«ã
ããããã£ãŒã«ãåœä»€ã¯äœ¿çšããªãã§ãã ããã The -m68000, -mcpu32 ãš -m5200 ãªãã·ã§ã³ã¯æå³ããŸã
-mnobitfield.
-mbitfield
ããããã£ãŒã«ãåœä»€ã䜿çšããŠãã ããã The -m68020 ãªãã·ã§ã³ã¯æå³ããŸã -mbitfieldã ããã¯
68020çšã«èšèšãããæ§æã䜿çšããå Žåã®ããã©ã«ãã
-mrtd
å¥ã®é¢æ°åŒã³åºãèŠçŽã䜿çšããŸãããã®èŠåã§ã¯ãåºå®ã®é¢æ°ã䜿çšããŸã
åŒæ°ã®æ°ã¯ãåŒæ°ãããããããrtdãåœä»€ã§è¿ãããŸã
åž°ããªããã ããã«ãããåŒã³åºãå ã«XNUMXã€ã®åœä»€ãä¿åããå¿ èŠããªãããã
ããã«åŒæ°ããããããŸãã
ãã®åŒã³åºãèŠçŽã¯ãUnixã§é垞䜿çšãããèŠçŽãšäºææ§ããªãããã
Unixã³ã³ãã€ã©ã§ã³ã³ãã€ã«ãããã©ã€ãã©ãªãåŒã³åºãå¿ èŠãããå Žåã¯äœ¿çšã§ããŸããã
ãŸããå€æ°ãåããã¹ãŠã®é¢æ°ã®é¢æ°ãããã¿ã€ããæäŸããå¿ èŠããããŸã
åŒæ°ã®æ°ïŒãprintfããå«ãïŒã ããããªããšã誀ã£ãã³ãŒããçæãããŸã
ãããã®é¢æ°ã®åŒã³åºãã
ããã«ãé¢æ°ã®æ°ãå€ããããšãã³ãŒããå€§å¹ ã«äžæ£ç¢ºã«ãªããŸãã
åŒæ°ã ïŒéåžžãäœåãªåŒæ°ã¯ç¡å®³ã«ç¡èŠãããŸããïŒ
ãrtdãåœä»€ã¯ã68010ã68020ã68030ã68040ã68060ãããã³CPU32ã§ãµããŒããããŠããŸãã
ããã»ããµã§ããã68000ãŸãã¯5200ã§ã¯ãããŸããã
-mno-rtd
ã«ãã£ãŠéžæãããåŒã³åºãèŠçŽã䜿çšããªãã§ãã ãã -mrtdã ãããããã©ã«ãã§ãã
-æªæ§-int
-mno-align-int
GCCããintãããlongãããlong longãããfloatãããdoubleããããã³ãlongããæŽåããããã©ãããå¶åŸ¡ããŸã
32ãããå¢çã®double"å€æ°ïŒ-æªæ§-intïŒãŸãã¯16ãããå¢ç
(-mno-align-intïŒã å€æ°ã32ãããå¢çã«æãããšãå®è¡ãããã³ãŒããçæãããŸã
ããå€ãã®ã¡ã¢ãªãç ç²ã«ããŠã32ããããã¹ãåããããã»ããµã§ã¯ããé«éã§ãã
èŠåïŒ ããªãã䜿çšããå Žå -æªæ§-int ã¹ã€ãããGCCã¯äžèšãå«ãæ§é ãæŽåãããŸã
å ¬éãããŠããã»ãšãã©ã®ã¢ããªã±ãŒã·ã§ã³ã®ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ä»æ§ãšã¯ç°ãªãã¿ã€ã
m68kã
-mpcrel
ã°ããŒãã«ã䜿çšãã代ããã«ã68000ã®PCçžå¯Ÿã¢ãã¬ãã·ã³ã°ã¢ãŒããçŽæ¥äœ¿çšããŸã
ãªãã»ããããŒãã«ã çŸåšããã®ãªãã·ã§ã³ã¯ -fpicãæ倧16ãããã®ãªãã»ãããèš±å¯
PCçžå¯Ÿã¢ãã¬ã¹æå®çšã -fPIC çŸåšãã§ãµããŒããããŠããŸãã -mpcrelããã
ããã¯68020以éã®ããã»ããµã§ãµããŒããããå¯èœæ§ããããŸãã
-mno-strict-align
-mstrict-align
ã¢ã©ã€ã³ãããŠããªãã¡ã¢ãªåç §ãã·ã¹ãã ã«ãã£ãŠåŠçããããšæ³å®ããªãã§ãã ããïŒããŸããïŒã
-msep-ããŒã¿
ããŒã¿ã»ã°ã¡ã³ããã¡ã¢ãªã®å¥ã®é åã«é 眮ã§ããããã«ããã³ãŒããçæãã
ããã¹ãã»ã°ã¡ã³ãããã ããã«ãããç°å¢å ã§ã®ã€ã³ãã¬ãŒã¹å®è¡ãå¯èœã«ãªããŸãã
ä»®æ³ã¡ã¢ãªç®¡çã ãã®ãªãã·ã§ã³ã¯ã -fPIC.
-mno-sep-ããŒã¿
ããŒã¿ã»ã°ã¡ã³ããããã¹ãã»ã°ã¡ã³ãã®åŸã«ç¶ããšæ³å®ããã³ãŒããçæããŸãã ããã¯
ããã©ã«ãã
-mid-å ±æã©ã€ãã©ãª
ã©ã€ãã©ãªIDã¡ãœãããä»ããŠå ±æã©ã€ãã©ãªããµããŒãããã³ãŒããçæããŸãã ããã«ããã
ä»®æ³ã¡ã¢ãªã®ãªãç°å¢ã§ã®ã€ã³ãã¬ãŒã¹å®è¡ããã³å ±æã©ã€ãã©ãªã®å Žå
管çã ãã®ãªãã·ã§ã³ã¯ã -fPIC.
-mno-id-å ±æã©ã€ãã©ãª
IDããŒã¹ã®å ±æã©ã€ãã©ãªã䜿çšãããŠãããšæ³å®ããªãã³ãŒããçæããŸãã ããã¯
ããã©ã«ãã
-mshared-library-id = n
ã³ã³ãã€ã«ãããIDããŒã¹ã®å ±æã©ã€ãã©ãªã®èå¥çªå·ãæå®ããŸãã
å€0ãæå®ãããšãããã³ã³ãã¯ããªã³ãŒããçæãããŸãã ä»ã®å€ãæå®ãããšã
ãã®çªå·ãçŸåšã®ã©ã€ãã©ãªã«å²ãåœãŠãŸããããã以äžã®ã¹ããŒã¹ãæéã¯ãããŸãã
ãã®ãªãã·ã§ã³ãçç¥ãããããå¹ççã§ãã
-mxgot
-mno-xgot
ColdFireã®äœçœ®ã«äŸåããªãã³ãŒããçæããå Žåã¯ã次ã®å Žåã«æ©èœããã³ãŒããçæããŸãã
GOTã«ã¯8192ãè¶ ãããšã³ããªããããŸãã ãã®ã³ãŒãã¯ã³ãŒãããã倧ãããŠé ã
ãã®ãªãã·ã§ã³ãªãã§çæãããŸãã M680x0ããã»ããµã§ã¯ããã®ãªãã·ã§ã³ã¯å¿ èŠãããŸããã -fPIC
ååã§ãã
GCCã¯éåžžãåäžã®åœä»€ã䜿çšããŠGOTããå€ãããŒãããŸãã ããã¯
æ¯èŒçå¹ççã§ãGOTãçŽ64kãããå°ããå Žåã«ã®ã¿æ©èœããŸãã ãªãã§ã
倧ãããšããªã³ã«ã¯æ¬¡ã®ãããªãšã©ãŒãå ±åããŸãã
åé 眮ãåãŸãããã«åãæšãŠãããŸããïŒR_68K_GOT16O fââoobar
ãããçºçããå Žåã¯ãã³ãŒããåã³ã³ãã€ã«ããå¿ èŠããããŸã -mxgotã ãã®åŸã
éåžžã«å€§ããªGOTã ãã ããã§çæãããã³ãŒã -mxgot å¹çãæªãã®ã§
ã°ããŒãã«ã·ã³ãã«ã®å€ããã§ããããããã«4ã€ã®åœä»€ãåããŸãã
GNUãªã³ã«ãŒã®æ°ããããŒãžã§ã³ãå«ãäžéšã®ãªã³ã«ãŒã¯ãäœæã§ããããšã«æ³šæããŠãã ããã
è€æ°ã®GOTãšãœãŒãGOTãšã³ããªã ããªãããã®ãããªãªã³ã«ãŒãæã£ãŠãããªããããªãã¯ãã å¿ èŠãªã¯ãã§ã
䜿çšãã -mxgot 8192ãè¶ ããGOTã«ã¢ã¯ã»ã¹ããåäžã®ãªããžã§ã¯ããã¡ã€ã«ãã³ã³ãã€ã«ããå Žå
ãšã³ããªã éåžžã«å°æ°ã§ãã
GCCãäœçœ®ã«äŸåããªãã³ãŒããçæããªãéãããããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
Mã³ã¢ ãªãã·ã§ã³
ãããã¯ã -m Motorola M*Coreããã»ããµçšã«å®çŸ©ããããªãã·ã§ã³ã
-ãã«ããªãã
-mno-ããŒãã©ã€ã
XNUMXåœä»€ä»¥äžã§å®è¡ã§ããå Žåã¯ãå®æ°ãã³ãŒãã¹ããªãŒã ã«ã€ã³ã©ã€ã³åããŸãã
-mdiv
-mno-div
é€ç®åœä»€ã䜿çšããŸãã ïŒããã©ã«ãã§æå¹ïŒã
-mrelax-å³æ
-mno-relax-immediate
ãããæŒç®ã§ä»»æã®ãµã€ãºã®ã€ããã£ãšãŒããèš±å¯ããŸãã
-mwide-ããããã£ãŒã«ã
-mno-wide-ããããã£ãŒã«ã
ããããã£ãŒã«ãã¯åžžã«ãintããµã€ãºãšããŠæ±ããŸãã
-m4byte-é¢æ°
-mno-4byte-é¢æ°
ãã¹ãŠã®é¢æ°ã4ãã€ãå¢çã«æããããã«åŒ·å¶ããŸãã
-mcallgraph-ããŒã¿
-mno-callgraph-data
ã³ãŒã«ã°ã©ãæ å ±ãçºè¡ããŸãã
-mslow-bytes
-mno-slow-bytes
ãã€ãéãèªã¿åããšãã¯ãã¯ãŒãã¢ã¯ã»ã¹ãåªå ããŸãã
-mlittle-ãšã³ãã£ã¢ã³
-mbig-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã
-m210
-m340
210ããã»ããµã®ã³ãŒããçæããŸãã
-mno-lsim
ã©ã³ã¿ã€ã ãµããŒããæäŸãããŠãããšæ³å®ããã·ãã¥ã¬ãŒã¿ã©ã€ãã©ãªãçç¥ããŸã
(libsim.aïŒ ãªã³ã«ã®ã³ãã³ãã©ã€ã³ããã
-mstack-increment =ãµã€ãº
ã·ã³ã°ã«ã¹ã¿ãã¯ã€ã³ã¯ãªã¡ã³ãæäœã®æ倧éãèšå®ããŸãã 倧ããªå€ã¯
倧éã®é¢æ°ãå¿ èŠãšããæ©èœãå«ãããã°ã©ã ã®é床ãäžãã
ã¹ã¿ãã¯ã¹ããŒã¹ã§ãããã¹ã¿ãã¯ãæ¡åŒµãããå Žåãã»ã°ã¡ã³ããŒã·ã§ã³éåãåŒãèµ·ããå¯èœæ§ããããŸã
é床ã«ã ããã©ã«ãå€ã¯0x1000ã§ãã
ã¡ãã ãªãã·ã§ã³
-mabsdiff
XNUMXã€ã®ã¬ãžã¹ã¿éã®çµ¶å¯Ÿå·®ã§ãããabsãåœä»€ãæå¹ã«ããŸãã
-ã¢ãŒã«-opts
ãã¹ãŠã®ãªãã·ã§ã³ã®åœä»€ãæå¹ã«ããŸã---å¹³åãä¹ç®ãé€ç®ããããæŒç®ã
å è¡ãŒãã絶察差ãæå°/æ倧ãã¯ãªãããããã³åœ©åºŠã
-å¹³å
XNUMXã€ã®ã¬ãžã¹ã¿ã®å¹³åãèšç®ãããaveãåœä»€ãæå¹ã«ããŸãã
-mbased =n
ãµã€ãºã®å€æ° n ããã©ã«ãã§ã¯ããã€ã以äžã¯ã.basedãã»ã¯ã·ã§ã³ã«é 眮ãããŸãã
ããŒã¹å€æ°ã¯$tpã¬ãžã¹ã¿ãããŒã¹ã¬ãžã¹ã¿ãšããŠäœ¿çšãã128ãã€ãã®å¶éããããŸã
ã.basedãã»ã¯ã·ã§ã³ã«ç§»åããŸãã
-mbitops
ãããæäœåœä»€ãæå¹ã«ããŸã---ããããã¹ãïŒ "btstm"ïŒãã»ããïŒ "bsetm"ïŒãã¯ãªã¢
ïŒ"bclrm"ïŒãinvertïŒ "bnotm"ïŒãããã³test-and-setïŒ "tas"ïŒã
-mc =å
ã©ã®ã»ã¯ã·ã§ã³å®æ°ããŒã¿ãé 眮ããããéžæããŸãã å ãå°ãããããè¿ããããŸãã¯
"é ã"ã
-mclip
ãã¯ãªãããåœä»€ãæå¹ã«ããŸãã ã-mclipãã¯ã次ã®ããšãè¡ããªãéã圹ã«ç«ããªãããšã«æ³šæããŠãã ããã
ã-mminmaxããæäŸããŸãã
-mconfig =å
çµã¿èŸŒã¿ã®ã³ã¢æ§æã®XNUMXã€ãéžæããŸãã åMePãããã«ã¯XNUMXã€ä»¥äžã®ãããããããŸã
ãã®äžã®ã¢ãžã¥ãŒã«; åã¢ãžã¥ãŒã«ã«ã¯ãã³ã¢CPUãšããŸããŸãªã³ããã»ããµãŒïŒãªãã·ã§ã³ïŒããããŸã
æ瀺ãããã³åšèŸºæ©åšã GCCã®äžéšã§ã¯ãªããMeP-IntegratorãããŒã«ã¯ã
ãã®ãªãã·ã§ã³ã«ãããããã®æ§æã ãã®ãªãã·ã§ã³ã䜿çšããããšã¯ããã¹ãŠã䜿çšããããšãšåãã§ã
察å¿ããã³ãã³ãã©ã€ã³ ãªãã·ã§ã³ã ããã©ã«ãèšå®ã¯ãããã©ã«ããã§ãã
-mcop
ã³ããã»ããµãŒåœä»€ãæå¹ã«ããŸãã ããã©ã«ãã§ã¯ãããã¯32ãããã³ããã»ããµãŒã§ãã ããŒã
éåžžãã³ããã»ããµãŒã¯ã-mconfig=ããªãã·ã§ã³ãä»ããŠæå¹ã«ãããŸãã
-mcop32
32ãããã³ããã»ããµã®åœä»€ãæå¹ã«ããŸãã
-mcop64
64ãããã³ããã»ããµã®åœä»€ãæå¹ã«ããŸãã
-mivc2
IVC2ã¹ã±ãžã¥ãŒãªã³ã°ãæå¹ã«ããŸãã IVC2ã¯64ãããVLIWã³ããã»ããµãŒã§ãã
-mdc
å®æ°å€æ°ãã.nearãã»ã¯ã·ã§ã³ã«é 眮ããŸãã
-mdiv
ãdivãããã³ãdivuãåœä»€ãæå¹ã«ããŸãã
-meb
ããã°ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã
-ã¡ã«
ãªãã«ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã
-mio-æ®çºæ§
ãioãå±æ§ã§ããŒã¯ãããå€æ°ã¯ãã¹ãŠã
æ®çºæ§ãšèŠãªãããŸãã
-ml ããã©ã«ãã§å€æ°ãã.farãã»ã¯ã·ã§ã³ã«å²ãåœãŠãããããã«ããŸãã
-mleadz
ãleadzãïŒå è¡ãŒãïŒåœä»€ãæå¹ã«ããŸãã
-ãã ããã©ã«ãã§ã¯ãå€æ°ãã.nearãã»ã¯ã·ã§ã³ã«å²ãåœãŠãããŸãã
-mminmax
ãæå°ãããã³ãæ倧ãåœä»€ãæå¹ã«ããŸãã
-mmult
ä¹ç®ããã³ç©ååœä»€ãæå¹ã«ããŸãã
-mno-opts
ã-mall-optsãã§æå¹åããããã¹ãŠã®ãªãã·ã§ã³åœä»€ãç¡å¹åããŸãã
-mrepeat
äœãªãŒããŒãããã®ã«ãŒãã«äœ¿çšããããrepeatãããã³ãerepeatãåœä»€ãæå¹ã«ããŸãã
-MS ãã¹ãŠã®å€æ°ãããã©ã«ãã§ã.tinyãã»ã¯ã·ã§ã³ã«ããŸãã ããããšã«æ³šæããŠãã ãã
ãã®ã»ã¯ã·ã§ã³ã®65536ãã€ãã®å¶éã ãããã®å€æ°ãžã®ã¢ã¯ã»ã¹ã¯ïŒ gpããŒã¹ã䜿çšããŸã
ç»é²ããŠãã ããã
-msatur
飜ååœä»€ãæå¹ã«ããŸãã ã³ã³ãã€ã©ã¯çŸåšã
ãããèªäœãçæããŸããããã®ãªãã·ã§ã³ã¯ä»ã®ããŒã«ãšã®äºææ§ã®ããã«å«ãŸããŠããŸãã
ããšããŠãã®ããã«ã
-msdram
ããã©ã«ãã®ROMããŒã¹ã®ã©ã³ã¿ã€ã ã§ã¯ãªããSDRAMããŒã¹ã®ã©ã³ã¿ã€ã ããªã³ã¯ããŸãã
-msim
ã·ãã¥ã¬ãŒã¿ã®ã©ã³ã¿ã€ã ã©ã€ãã©ãªããªã³ã¯ããŸãã
-msimnovec
ã·ãã¥ã¬ãŒã¿ã©ã³ã¿ã€ã ã©ã€ãã©ãªããªã³ã¯ããŸãããã ãããªã»ãããšã®çµã¿èŸŒã¿ãµããŒãã¯é€ããŸãã
äŸå€ãã¯ãã«ãšããŒãã«ã
-mtf
ãã¹ãŠã®é¢æ°ãããã©ã«ãã§ã.farãã»ã¯ã·ã§ã³ã«ããŸãã ãã®ãªãã·ã§ã³ããªããšãæ©èœããŸã
ããã©ã«ãã¯ã.nearãã»ã¯ã·ã§ã³ã§ãã
-mtiny =n
ã§ããå€æ° n ã.tinyãã»ã¯ã·ã§ã³ã«ã¯ãã€ã以äžãå²ãåœãŠãããŸãã ãããã¯
å€æ°ã¯$gpããŒã¹ã¬ãžã¹ã¿ã䜿çšããŸãã ãã®ãªãã·ã§ã³ã®ããã©ã«ãã¯4ã§ããã泚æããŠãã ãã
ã.tinyãã»ã¯ã·ã§ã³ã«ã¯65536ãã€ãã®å¶éããããŸãã
ãã€ã¯ããã¬ã€ãº ãªãã·ã§ã³
-msoft-float
æµ®åå°æ°ç¹ã«ã¯ãœãããŠã§ã¢ãšãã¥ã¬ãŒã·ã§ã³ã䜿çšããŸãïŒããã©ã«ãïŒã
-mhard-float
ããŒããŠã§ã¢æµ®åå°æ°ç¹åœä»€ã䜿çšããŸãã
-mmemcpy
ãããã¯ç§»åãæé©åããããmemcpyãã䜿çšããŠãã ããã
-mno-clearbss
ãã®ãªãã·ã§ã³ã¯éæšå¥šã§ãã 䜿çšãã -fno-zero-in-bss ã§åæå ã代ããã«ã䜿ããã ããã
-mcpu =CPUã¿ã€ã
ç¹å®ã®CPUã®æ©èœã䜿çšããã³ãŒããã¹ã±ãžã¥ãŒã«ããŸãã ãµããŒããããŠããå€ã¯
圢åŒã§ã¢ãŒã«ã€ããããããžã§ã¯ããä¿åããŸãïŒ vX.YY.Zããã§ã X ã¡ãžã£ãŒããŒãžã§ã³ã§ãã YY ã¯ãã€ããŒããŒãžã§ã³ã§ããã Z is
äºææ§ã³ãŒãã å€ã®äŸã¯æ¬¡ã®ãšããã§ã v3.00.a, v4.00.b, v5.00.a, v5.00.b, v5.00.b,
v6.00.a.
-mxl-ãœãããã«
ãœãããŠã§ã¢ä¹ç®ãšãã¥ã¬ãŒã·ã§ã³ã䜿çšããŸãïŒããã©ã«ãïŒã
-mxl-ãœãã-div
é€ç®ã«ã¯ãœãããŠã§ã¢ãšãã¥ã¬ãŒã·ã§ã³ã䜿çšããŸãïŒããã©ã«ãïŒã
-mxl-ãã¬ã«ã·ãã¿
ããŒããŠã§ã¢ãã¬ã«ã·ãã¿ã䜿çšããŠãã ããã
-mxl-ãã¿ãŒã³-æ¯èŒ
ãã¿ãŒã³æ¯èŒåœä»€ã䜿çšããŸãã
-msmall-åå²
å°ããªç¬Šå·ä»ãæŽæ°é€ç®ã«ã¯ããŒãã«ã«ãã¯ã¢ããæé©åã䜿çšããŸãã
-mxl-ã¹ã¿ãã¯ãã§ãã¯
ãã®ãªãã·ã§ã³ã¯éæšå¥šã§ãã 䜿çšãã -fstack-ãã§ã㯠ã代ããã«ã䜿ããã ããã
-mxl-gp-opt
GPçžå¯Ÿã®ã.sdataã/ããsbssãã»ã¯ã·ã§ã³ã䜿çšããŸãã
-mxl-ä¹ç®-é«
32x32ä¹ç®ã®äžäœéšåã«ã¯ãä¹ç®äžäœåœä»€ã䜿çšããŸãã
-mxl-float-convert
ããŒããŠã§ã¢æµ®åå°æ°ç¹å€æåœä»€ã䜿çšããŸãã
-mxl-float-sqrt
ããŒããŠã§ã¢æµ®åå°æ°ç¹å¹³æ¹æ ¹åœä»€ã䜿çšããŸãã
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¿ãŒã²ããã®ã³ãŒããçæããŸãã
-mxl-䞊ã¹æ¿ã
åé åºä»ãåœä»€ã䜿çšããŸãïŒã¹ã¯ããããã³ãã€ãå転ããŒã/ã¹ãã¢ïŒã
-mxlã¢ãŒã-ã¢ããªã¢ãã«
ã¢ããªã±ãŒã·ã§ã³ã¢ãã«ãéžæ ã¢ããªã¢ãã«ã æå¹ãªã¢ãã«ã¯
å®è¡ãã¡ã€ã«
éåžžã®å®è¡å¯èœãã¡ã€ã«ïŒããã©ã«ãïŒãã¹ã¿ãŒãã¢ããã³ãŒããäœ¿çš crt0.o.
xmdstub
ã¶ã€ãªã³ã¯ã¹ãã€ã¯ãããã»ããµãããã¬ïŒXMDïŒããŒã¹ã®ãœãããŠã§ã¢äŸµå ¥åãããã°ã§äœ¿çšãããã
xmdstubãšåŒã°ãããšãŒãžã§ã³ãã ããã¯ã¹ã¿ãŒãã¢ãããã¡ã€ã«ã䜿çšããŸã crt1.o ã®éå§ã¢ãã¬ã¹ãèšå®ããŸã
0x800ãžã®ããã°ã©ã ã
ããŒãã¹ãã©ãã
ããŒãããŒããŒã䜿çšããŠããŒããããã¢ããªã±ãŒã·ã§ã³ã®å Žåã ãã®ã¢ãã«ã¯ã¹ã¿ãŒãã¢ãããã¡ã€ã«ã䜿çšããŸã
crt2.o ããã«ã¯ãããã»ããµãªã»ãããã¯ãã«ãã³ãã©ãå«ãŸããŠããŸããã ããã¯é©åã§ã
ããã»ããµãªã»ããã®å¶åŸ¡ãããŒãããŒããŒã§ã¯ãªãããŒãããŒããŒã«è»¢éãããã
ã¢ããªã±ãŒã·ã§ã³ã
ãã¯ãã«ãªã
MicroBlazeãã¯ã¿ãŒãå¿ èŠãšããªãã¢ããªã±ãŒã·ã§ã³åãã ãã®ãªãã·ã§ã³
ç£èŠã¢ããªã±ãŒã·ã§ã³å ã§å®è¡ãããŠããã¢ããªã±ãŒã·ã§ã³ã«åœ¹ç«ã€å ŽåããããŸãã ãã®ã¢ãã«
䜿çšãããŸã crt3.o ã¹ã¿ãŒãã¢ãããã¡ã€ã«ãšããŠã
ãªãã·ã§ã³ -xl-ã¢ãŒã-ã¢ããªã¢ãã« ã®éæšå¥šã®ãšã€ãªã¢ã¹ã§ã -mxlã¢ãŒã-ã¢ããªã¢ãã«.
MIPS ãªãã·ã§ã³
-EB ããã°ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã
-THE ãªãã«ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã ããã¯ã®ããã©ã«ãã§ã mips * el-*-* æ§æã
-XNUMXæ=ã¢ãŒã
ã§å®è¡ãããã³ãŒããçæãã ã¢ãŒããããã¯äžè¬çãªMIPS ISAã®ååããŸãã¯
ç¹å®ã®ããã»ããµã®ååã ISAã®ååã¯æ¬¡ã®ãšããã§ãã ãããã¹1, ãããã¹2, ãããã¹3, ãããã¹4,
ãããã¹32, mips32r2, ãããã¹64 ãš mips64r2ã ããã»ããµåã¯æ¬¡ã®ãšããã§ãã 4kc, 4km, 4kp, 4ksc,
4kec, 4ã±ã , 4ããŒã, 4ksd, 5kc, 5kf, 20kc, 24kc, 24kf2_1, 24kf1_1, 24kec, 24kef2_1,
24kef1_1, 34kc, 34kf2_1, 34kf1_1, 34kn, 74kc, 74kf2_1, 74kf1_1, 74kf3_2, 1004kc,
1004kf2_1, 1004kf1_1, ãã³ãœã³2e, ãã³ãœã³2f, ãã³ãœã³3a, m4k, m14k, m14kc, m14ke,
m14kec, ãªã¯ããªã³, ãªã¯ããªã³+, ãªã¯ããªã³2, ãªãªãªã³, r2000, r3000, r3900, r4000, r4400, r4600,
r4650, r4700, r6000, r8000, rm7000, rm9000, r10000, r12000, r14000, r16000, sb1,
sr71000, vr4100, vr4111, vr4120, vr4130, vr4300, vr5000, vr5400, vr5500, xlr ãš xlp.
ç¹å¥ãªäŸ¡å€ ã¢ããã éžæãããã®ã«æãäºææ§ã®ããã¢ãŒããã¯ãã£ãéžæããŸã
ABIïŒã€ãŸãã ãããã¹1 32ãããABIããã³ ãããã¹3 64ãããABIã®å ŽåïŒã
ãã€ãã£ãã®Linux/GNUããŒã«ãã§ãŒã³ã䟡å€ããµããŒãããŸã ãã€ãã£ããæé©ãªãã®ãéžæããŸã
ãã¹ãããã»ããµã®ã¢ãŒããã¯ãã£ãªãã·ã§ã³ã -march=ãã€ãã£ã GCCãè¡ãå Žåã¯å¹æããããŸãã
ããã»ããµãèªèããŸããã
ããã»ããµåã§ã¯ããã¡ã€ãã« 000 次ã®ããã«çç¥ã§ããŸã k ïŒäŸãã°ã -march = r2k).
ãã¬ãã£ãã¯ã¹ã¯ãªãã·ã§ã³ã§ããã vr æžããããããããŸãã r.
ãã©ãŒã ã®åå nf2_1 FPUãååã®ã¬ãŒãã§ã¯ããã¯ãããããã»ããµãåç §ããŠãã ããã
ã³ã¢ããã©ãŒã ã®åå nf1_1 åãã¬ãŒãã§ã¯ããã¯ãããFPUãåããããã»ããµãåç §ããŠãã ãã
ã³ã¢ãšããŠããããŠãã©ãŒã ã®åå nf3_2 æ¯çã§ã¯ããã¯ãããFPUãåããããã»ããµãåç §ããŠãã ãã
ã³ã¢ã«é¢ããŠ3ïŒ2ã®ã äºææ§ã®çç±ããã nf ãšããŠåãå ¥ããããŸã
ã®åçŸ©èª nf2_1 while nx ãš bfx ã®å矩èªãšããŠåãå ¥ããããŸã nf1_1.
GCC ã¯ããã®ãªãã·ã§ã³ã®å€ã«åºã¥ã㊠XNUMX ã€ã®ãã¯ããå®çŸ©ããŸãã æå㯠_MIPS_ARCH,
ããã¯ãã¿ãŒã²ããã¢ãŒããã¯ãã£ã®ååãæååãšããŠç€ºããŸãã XNUMXçªç®ã®åœ¢åŒã¯
_MIPS_ARCH_fooããã§ã foo ã®å€§æååãããå€ã§ã _MIPS_ARCHã äŸãã°ã
-march = r2000 ã»ãã _MIPS_ARCH ããž ãr2000ã ãã¯ããå®çŸ©ããŸã _MIPS_ARCH_R2000.
ãªãã _MIPS_ARCH ãã¯ãã¯ãäžèšã®ããã»ããµåã䜿çšããŸãã èšãæãããšã
å®å šãªãã¬ãã£ãã¯ã¹ããããçç¥ãããŠããŸãã 000 as kã ã®å Žå ã¢ããã
ãã¯ãã¯ã解決ãããã¢ãŒããã¯ãã£ã«ååãä»ããŸã (ãŸã㯠ããããã¹1ã or ããããã¹3ãïŒã ããã¯
no ã®å Žåã®ããã©ã«ãã®ã¢ãŒããã¯ã㣠-è¡é² ãªãã·ã§ã³ãäžããããŸãã
-mtune =ã¢ãŒã
æé©å ã¢ãŒãã ç¹ã«ããã®ãªãã·ã§ã³ã¯åœä»€ã®æ¹æ³ãå¶åŸ¡ããŸã
ã¹ã±ãžã¥ãŒã«ããããããã³ç®è¡æŒç®ã®èªèãããã³ã¹ãã ã®ãªã¹ã ã¢ãŒã å€
ãšåãã§ã -è¡é².
ãã®ãªãã·ã§ã³ã䜿çšããªãå ŽåãGCCã¯ã«ãã£ãŠæå®ãããããã»ããµçšã«æé©åããŸãã -è¡é²ã ã«ãã£ãŠ
-è¡é² ãš -ã ãã¥ãŒã³ äžç·ã«ãã§å®è¡ãããã³ãŒããçæããããšãå¯èœã§ã
ããã»ããµã®ãã¡ããªã§ããããã®ãã¡ããªã®ç¹å®ã®ã¡ã³ããŒã®ã³ãŒããæé©åããŸãã
-ã ãã¥ãŒã³ ãã¯ããå®çŸ©ããŸã _MIPS_TUNE ãš _MIPS_TUNE_fooãšåãããã«æ©èœããŸãã
ã -è¡é² äžèšã®ãã®ã
-ãããã¹1
ã«çžåœ -march = mips1.
-ãããã¹2
ã«çžåœ -march = mips2.
-ãããã¹3
ã«çžåœ -march = mips3.
-ãããã¹4
ã«çžåœ -march = mips4.
-ãããã¹32
ã«çžåœ -march = mips32.
-mips32r2
ã«çžåœ -march = mips32r2.
-ãããã¹64
ã«çžåœ -march = mips64.
-mips64r2
ã«çžåœ -march = mips64r2.
-ãããã¹16
-mno-mips16
MIPS16ã³ãŒããçæããŸãïŒçæããŸããïŒã GCCãMIPS32ãŸãã¯MIPS64ãã¿ãŒã²ããã«ããŠããå Žå
ã¢ãŒããã¯ãã£ã§ã¯ãMIPS16eASEãå©çšããŸãã
MIPS16ã³ãŒãçæã¯ãæ©èœããšã«å¶åŸ¡ããããšãã§ããŸãã
ãmips16ãããã³ãnomips16ãå±æ§ã
-mflip-mips16
亀äºã®æ©èœã§MIPS16ã³ãŒããçæããŸãã ãã®ãªãã·ã§ã³ã¯ååž°çšã«æäŸãããŠããŸã
MIPS16ãšéMIPS16ã®æ··åã³ãŒãçæã®ãã¹ãã§ãããéåžžã®ã³ãŒãçæãç®çãšãããã®ã§ã¯ãããŸããã
ãŠãŒã¶ãŒã³ãŒãã®ã³ã³ãã€ã«ã«äœ¿çšããŸãã
-minterlink-å§çž®
-mno-interlink-compressed
æšæºã®ïŒéå§çž®ã®ïŒMIPS ISAã䜿çšããã³ãŒãããªã³ã¯ãããŠããããšãèŠæ±ããŸãïŒèŠæ±ããŸããïŒ-
MIPS16ããã³microMIPSã³ãŒããšäºææ§ãããããã®éãåæ§ã§ãã
ããšãã°ãæšæºã®ISAãšã³ã³ãŒãã£ã³ã°ã䜿çšããã³ãŒãã¯ãMIPS16ãŸãã¯
microMIPSã³ãŒã; åŒã³åºããŸãã¯éæ¥ãžã£ã³ãã®ããããã䜿çšããå¿ èŠããããŸãã -minterlink-å§çž®
ãããã£ãŠããžã£ã³ãã®ã¿ãŒã²ãããããã§ã¯ãªãããšãGCCãèªèããªãéããçŽæ¥ãžã£ã³ããç¡å¹ã«ããŸã
å§çž®ãããŠããŸãã
-minterlink-mips16
-mno-ã€ã³ã¿ãŒãªã³ã¯-mips16
ã®ãšã€ãªã¢ã¹ -minterlink-å§çž® ãš -mno-interlink-compressedã ãããã®ãªãã·ã§ã³
microMIPS ASEãããåã®ãã®ã§ãããäžäœäºææ§ã®ããã«ä¿æãããŠããŸãã
-mabi = 32
-mabi = o64
-mabi = n32
-mabi = 64
-mabi = eabi
æå®ãããABIã®ã³ãŒããçæããŸãã
EABIã«ã¯32ããããš64ãããã®ããªã¢ã³ããããããšã«æ³šæããŠãã ããã GCCã¯éåžž64ããããçæããŸã
64ãããã¢ãŒããã¯ãã£ãéžæããå Žåã®ã³ãŒãã§ããã -mgp32 32ãããã³ãŒããååŸããã«ã¯
ã代ããã«ã䜿ããã ããã
O64 ABIã«ã€ããŠã¯ããåç §ããŠãã ãããhttp://gcc.gnu.org/projects/mipso64-abi.html>.
GCCã¯ãæµ®åå°æ°ç¹ã¬ãžã¹ã¿ã32ã§ãão64ABIã®ããªã¢ã³ãããµããŒãããŸãã
32ãããå¹ ããã ãã®çµã¿åããã¯ã -mabi = 32 -MFP64ã ãã®ABI
ãmthc1ãããã³ãmfhc1ãåœä»€ã«äŸåããŠããããã次ã®å Žåã«ã®ã¿ãµããŒããããŸãã
MIPS32R2 ããã»ããµã
åŒæ°ãšæ»ãå€ã®ã¬ãžã¹ã¿å²ãåœãŠã¯åããŸãŸã§ããããããã
ã¹ã«ã©ãŒå€ã¯ã64ãããã®ãã¢ã§ã¯ãªãåäžã®32ãããã¬ãžã¹ã¿ã§æž¡ãããŸã
ã¬ãžã¹ã¿ã ããšãã°ãã¹ã«ã©ãŒæµ®åå°æ°ç¹å€ã¯ã§è¿ãããŸã $ f0 ã®ã¿ã
$ f0/$ f1 ãã¢ã åŒã³åºãä¿åã¬ãžã¹ã¿ã®ã»ãããåããŸãŸã§ããããã¹ãŠ 64 ããã
ä¿åãããŸãã
-ããã³ãŒã«
-mno-abicalls
SVR4ã¹ã¿ã€ã«ã®åçãªããžã§ã¯ãã«é©ããã³ãŒããçæããŸãïŒçæããŸããïŒã
-ããã³ãŒã« SVR4ããŒã¹ã®ã·ã¹ãã ã®ããã©ã«ãã§ãã
-mshared
-mno-å ±æ
å®å šã«äœçœ®ã«äŸåããã次ã®ããšãã§ããã³ãŒããçæããïŒçæããªãïŒ
ãããã£ãŠãå ±æã©ã€ãã©ãªã«ãªã³ã¯ãããŸãã ãã®ãªãã·ã§ã³ã¯åœ±é¿ããã ãã§ã -ããã³ãŒã«.
ãã¹ãŠ -ããã³ãŒã« ã³ãŒãã¯ããªãã·ã§ã³ã«é¢ä¿ãªããåŸæ¥ã¯äœçœ®ã«äŸåããŠããŸããã§ãã
ãã㪠-fPIC ãš -fpicã ãã ããæ¡åŒµæ©èœãšããŠãGNUããŒã«ãã§ãŒã³ã¯å®è¡å¯èœãã¡ã€ã«ãèš±å¯ããŸã
ããŒã«ã«ã«ãã€ã³ãããã·ã³ãã«ã«çµ¶å¯Ÿã¢ã¯ã»ã¹ã䜿çšããŸãã ããçãGPã䜿çšããããšãã§ããŸã
åæåã·ãŒã±ã³ã¹ãå®è¡ããããŒã«ã«ã§å®çŸ©ãããé¢æ°ãžã®çŽæ¥åŒã³åºããçæããŸãã ãã
ã¢ãŒãã¯ã«ãã£ãŠéžæãããŸã -mno-å ±æ.
-mno-å ±æ binutils 2.16以éã«äŸåãã
GNUãªã³ã«ã«ãã£ãŠãªã³ã¯ãããŠããŸãã ãã ãããã®ãªãã·ã§ã³ã¯ãã¡ã€ãã«ã®ABIã«ã¯åœ±é¿ããŸããã
å®è¡å¯èœ; åé 眮å¯èœãªããžã§ã¯ãã®ABIã«ã®ã¿åœ±é¿ããŸãã 䜿çšãã -mno-å ±æ
äžè¬ã«ãå®è¡å¯èœãã¡ã€ã«ã¯ããå°ãããããéããªããŸãã
-mshared ããã©ã«ãã§ãã
-mplt
-mno-plt
éçãªã³ã«ãŒãšåçãªã³ã«ãŒãPLTããµããŒãããã³ããŒããããšãæ³å®ããŸãïŒæ³å®ããªãã§ãã ããïŒã
移転ã ãã®ãªãã·ã§ã³ã¯åœ±é¿ããã ãã§ã -mno-å ±æ -ããã³ãŒã«ã n64 ABIã®å Žåãããã¯
ãªãã·ã§ã³ããªããšå¹æã¯ãããŸãã -msym32.
ããªãã¯äœãããšãã§ããŸã -mplt GCCãèšå®ããããšã«ããããã©ã«ã --with-mips-pltã ããã©ã«ã
is -mno-plt ãããªããšã
-mxgot
-mno-xgot
ã°ããŒãã«ãªãã»ããããŒãã«ã®ãµã€ãºã«é¢ããéåžžã®å¶éã解é€ããŸãïŒè§£é€ããªãã§ãã ããïŒã
GCCã¯éåžžãåäžã®åœä»€ã䜿çšããŠGOTããå€ãããŒãããŸãã ããã¯
æ¯èŒçå¹ççã§ãGOTãçŽ64kãããå°ããå Žåã«ã®ã¿æ©èœããŸãã ãªãã§ã
倧ãããšããªã³ã«ã¯æ¬¡ã®ãããªãšã©ãŒãå ±åããŸãã
åé 眮ãåãŸãããã«åãæšãŠãããŸããïŒR_MIPS_GOT16 foobar
ãããçºçããå Žåã¯ãã³ãŒããåã³ã³ãã€ã«ããå¿ èŠããããŸã -mxgotã ããã¯éåžžã«ããŸããããŸã
倧ããªGOTã§ãããã³ãŒããXNUMXã€ããããããå¹çã¯äœäžããŸãã
ã°ããŒãã«ã·ã³ãã«ã®å€ããã§ããããããã®åœä»€ã
äžéšã®ãªã³ã«ãŒã¯è€æ°ã®GOTãäœæã§ããããšã«æ³šæããŠãã ããã ããªãããã®ãããªãªã³ã«ãŒãæã£ãŠãããªããããªãã¯
䜿çšããå¿ èŠãããã®ã¯ -mxgot 64ã€ã®ãªããžã§ã¯ããã¡ã€ã«ãXNUMXkãè¶ ãããã¡ã€ã«ã«ã¢ã¯ã»ã¹ããå Žå
GOTãšã³ããªã®äŸ¡å€ã éåžžã«å°æ°ã§ãã
GCCãäœçœ®ã«äŸåããªãã³ãŒããçæããªãéãããããã®ãªãã·ã§ã³ã¯å¹æããããŸããã
-mgp32
æ±çšã¬ãžã¹ã¿ã¯32ãããå¹ ã§ãããšæ³å®ããŸãã
-mgp64
æ±çšã¬ãžã¹ã¿ã¯64ãããå¹ ã§ãããšæ³å®ããŸãã
-MFP32
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã32ãããå¹ ã§ãããšæ³å®ããŸãã
-MFP64
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã64ãããå¹ ã§ãããšæ³å®ããŸãã
-mhard-float
æµ®åå°æ°ç¹ã³ããã»ããµåœä»€ã䜿çšããŸãã
-msoft-float
æµ®åå°æ°ç¹ã³ããã»ããµåœä»€ã¯äœ¿çšããªãã§ãã ããã æµ®åå°æ°ç¹ãå®è£ ãã
代ããã«ã©ã€ãã©ãªåŒã³åºãã䜿çšããèšç®ã
-mno-float
ã«çžåœ -msoft-floatããããããã«ãã³ã³ãã€ã«ãããŠããããã°ã©ã ã
æµ®åå°æ°ç¹æŒç®ã¯å®è¡ããŸããã ãã®ãªãã·ã§ã³ã¯çŸåšãµããŒããããŠããŸã
äžéšã®ãã¢ã¡ã¿ã«MIPSæ§æã«ãã£ãŠã®ã¿ãç¹å¥ãªã»ãããéžæããå ŽåããããŸã
ãã¹ãŠã®æµ®åå°æ°ç¹ãµããŒããæ¬ ããŠããã©ã€ãã©ãªïŒããšãã°ãfloating-
ãã€ã³ããprintfã圢åŒïŒã ã-mno-floatãã§ã³ã³ãã€ã«ãããã³ãŒãã«èª€ã£ãŠå«ãŸããŠããå Žå
æµ®åå°æ°ç¹æŒç®ã§ã¯ããªã³ã¯æãŸãã¯å®è¡æã®é害ãçºçããå¯èœæ§ããããŸãã
-msingle-float
æµ®åå°æ°ç¹ã³ããã»ããµãŒã¯å粟床æŒç®ã®ã¿ããµããŒããããšããŸãã
-mdouble-float
æµ®åå°æ°ç¹ã³ããã»ããµãŒãå粟床æŒç®ããµããŒãããŠãããšä»®å®ããŸãã ãã
ããã©ã«ãã§ãã
-mabs = 2008
-mabs=ã¬ã¬ã·ãŒ
ãããã®ãªãã·ã§ã³ã¯ãç¹å¥ãªéæ°ïŒNaNïŒIEEE754ã®åŠçãå¶åŸ¡ããŸã
ãabsããå«ãæµ®åå°æ°ç¹ããŒã¿ãfmtã ãšããã¬ãfmtã æ©æ¢°ã®æ瀺ã
ããã©ã«ããŸã㯠-mabs=ã¬ã¬ã·ãŒ 䜿çšãããã¬ã¬ã·ãŒåŠçãéžæãããŸãã ããã§
ãããã®åœä»€ãç®è¡æŒç®ãšèŠãªãããæ£ããæŒç®ãè¡ãããå Žåã¯åé¿ãããŸã
ãå¿ èŠã§ãããå ¥åãªãã©ã³ãã¯NaNã§ããå¯èœæ§ããããŸãã åœä»€ã®ããé·ãã·ãŒã±ã³ã¹
代ããã«ãæµ®åå°æ°ç¹ããŒã¿ã®ç¬Šå·ããããæåã§æäœãããã®ã䜿çšãããŸãã
ã -æéæ°åŠã®ã¿ ãªãã·ã§ã³ãæå®ãããŠããŸãã
ãã® -mabs = 2008 ãªãã·ã§ã³ã¯ãIEEE754-2008åŠçãéžæããŸãã ãã®å Žåããããã¯
åœä»€ã¯éç®è¡ãšèŠãªãããããããã¹ãŠã§æ£ããåäœããŸã
ç¹ã«å ¥åãªãã©ã³ããNaNã§ããå Žåãå«ã¿ãŸãã ãããã®æ瀺
ãããã£ãŠãåžžã«ããããã®æäœã«äœ¿çšãããŸãã
-mnan = 2008
-mnan=ã¬ã¬ã·ãŒ
ãããã®ãªãã·ã§ã³ã¯ãç¹å¥ãªéæ°ïŒNaNïŒIEEE754ã®ãšã³ã³ãŒãã£ã³ã°ãå¶åŸ¡ããŸã
æµ®åå°æ°ç¹ããŒã¿ã
ãã® -mnan=ã¬ã¬ã·ãŒ ãªãã·ã§ã³ã¯ã¬ã¬ã·ãŒãšã³ã³ãŒãã£ã³ã°ãéžæããŸãã ãã®å ŽåãéããªNaNïŒqNaNïŒ
æ«å°Ÿã®ä»®æ°ãã£ãŒã«ãã®æåã®ãããã0ã§ããã®ã«å¯Ÿãã
ã·ã°ããªã³ã°NaNïŒsNaNïŒã¯ãæ«å°Ÿã®ä»®æ°ã®æåã®ãããã§ç€ºãããŸãã
ãã£ãŒã«ãã¯1ã§ãã
ãã® -mnan = 2008 ãªãã·ã§ã³ã¯ãIEEE754-2008ãšã³ã³ãŒãã£ã³ã°ãéžæããŸãã ãã®å ŽåãqNaNã¯
æ«å°Ÿã®ä»®æ°ãã£ãŒã«ãã®æåã®ãããã1ã§ããã®ã«å¯ŸããsNaNã¯XNUMXã§ç€ºãããŸãã
æ«å°Ÿã®ä»®æ°ãã£ãŒã«ãã®æåã®ãããã0ã§ããããšã§ç€ºãããŸãã
ããã©ã«ã㯠-mnan=ã¬ã¬ã·ãŒ GCCãã§æ§æãããŠããªãéã --with-nan = 2008.
-mllsc
-mno-llsc
䜿çšããïŒäœ¿çšããªãïŒ ll, sc, sync çµã¿èŸŒã¿ã®ã¢ãããã¯ã¡ã¢ãªãå®è£ ããããã®åœä»€
æ©èœã ã©ã¡ãã®ãªãã·ã§ã³ãæå®ãããŠããªãå ŽåãGCCã¯ã¿ãŒã²ããã
ã¢ãŒããã¯ãã£ã¯ãããããµããŒãããŸãã
-mllsc ã©ã³ã¿ã€ã ç°å¢ãåœä»€ããšãã¥ã¬ãŒãã§ãã -mno-llsc
éæšæºã®ISAçšã«ã³ã³ãã€ã«ããå Žåã«åœ¹ç«ã¡ãŸãã ã©ã¡ãã®ãªãã·ã§ã³ã
GCCãèšå®ããããšã«ããããã©ã«ã --with-llsc ãš --ãªã-llsc ã
--with-llsc äžéšã®æ§æã®ããã©ã«ãã§ãã ã€ã³ã¹ããŒã«ããã¥ã¡ã³ããåç §ããŠãã ãã
詳现ã«ã€ããŠã¯ã
-mdsp
-mno-dsp
MIPS DSP ASEã®ãªããžã§ã³1ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
ãã®ãªãã·ã§ã³ã¯ãããªããã»ããµ ãã¯ããå®çŸ©ããŸãã __mips_dsp. ãŸãã
__mips_dsp_rev 1ãžã
-mdspr2
-mno-dspr2
MIPS DSP ASEã®ãªããžã§ã³2ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
ãã®ãªãã·ã§ã³ã¯ãããªããã»ããµ ãã¯ããå®çŸ©ããŸãã __mips_dsp ãš __mips_dspr2ã ãŸãã
å®çŸ© __mips_dsp_rev 2ãžã
-msmartmips
-mno-ã¹ããŒããããã¹
MIPS SmartMIPS ASEã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
-é害ã®ããã·ã³ã°ã«
-mno-ãã¢ãªã³ã°-ã·ã³ã°ã«
ãã¢ã®å粟床浮åå°æ°ç¹åœä»€ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
ãã®ãªãã·ã§ã³ã§ã¯ãããŒããŠã§ã¢æµ®åå°æ°ç¹ãµããŒããæå¹ã«ããå¿ èŠããããŸãã
-mdmx
-mno-mdmx
MIPS Digital Media Extensionã®èª¬æã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã ãã®ãªãã·ã§ã³ã¯
64ãããã³ãŒããçæãããšãã«äœ¿çšãããããŒããŠã§ã¢æµ®åå°æ°ç¹ãµããŒããå¿ èŠã§ãã
æå¹ã«ãªããŸããã
-mips3d
-mno-mips3d
MIPS-3D ASEã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã ãªãã·ã§ã³ -mips3d å«æãã -é害ã®ããã·ã³ã°ã«.
-ãã€ã¯ããããã¹
-mno-micromips
microMIPSã³ãŒããçæããŸãïŒçæããŸããïŒã
MicroMIPSã³ãŒãçæã¯ãæ©èœããšã«å¶åŸ¡ããããšãã§ããŸãã
ãmicromipsãããã³ãnomicromipsãå±æ§ã
-mmt
-mno-mt
MTãã«ãã¹ã¬ããåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã
-mmcu
-mno-mcu
MIPS MCU ASEåœä»€ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
-ã¡ã
-mno-eva
MIPSæ¡åŒµä»®æ³ã¢ãã¬ã¹æå®åœä»€ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
-mvirt
-mno-virt
MIPSä»®æ³åã¢ããªã±ãŒã·ã§ã³åºæã®æé ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
-mlong64
ãé·ããã¿ã€ãã64ãããå¹ ã«åŒ·å¶ããŸãã èŠã -mlong32 ããã©ã«ãã®èª¬æã«ã€ããŠã¯
ãã€ã³ã¿ãµã€ãºã®æ±ºå®æ¹æ³ã
-mlong32
ãlongãããintããããã³ãã€ã³ã¿ãŒåã32ãããå¹ ã«åŒ·å¶ããŸãã
ãintãããlongããããã³ãã€ã³ã¿ã®ããã©ã«ãã®ãµã€ãºã¯ãABIã«ãã£ãŠç°ãªããŸãã å šãŠã®
ãµããŒããããŠããABIã¯32ãããã®ãintãã䜿çšããŸãã n64 ABIã¯ã64ãããã®ããã³ã°ãã䜿çšããŸãã64ãããã®å Žåãåæ§ã§ãã
EABI; ãã®ä»ã¯32ãããã®ãé·ããã䜿çšããŸãã ãã€ã³ã¿ã¯ãé·ãããšåããµã€ãºããŸãã¯
æŽæ°ã¬ãžã¹ã¿ãšåããµã€ãºã®ããããå°ããæ¹ã
-msym32
-mno-sym32
éžæãããã®ã«é¢ä¿ãªãããã¹ãŠã®ã·ã³ãã«ã32ãããå€ã§ãããšæ³å®ããŸãïŒæ³å®ããªãã§ãã ããïŒã
ABIã ãã®ãªãã·ã§ã³ã¯ã -mabi = 64 ãš -mno-abicalls ãªããªãã
GCCãã·ã³ããªãã¯ã¢ãã¬ã¹ãžã®ããçãããéãåç §ãçæã§ããããã«ããŸãã
-G NUM
ãã®ããŒã¿ããªãå Žåã¯ãå€éšããèŠããããŒã¿ã®å®çŸ©ãå°ããªããŒã¿ã»ã¯ã·ã§ã³ã«å ¥ããŸã
ãã倧ãã NUM ãã€ãã ãã®åŸãGCCã¯ããŒã¿ãžã®ããå¹ççãªã¢ã¯ã»ã¹ãçæã§ããŸãã èŠã
-mgpopt 詳现ã«ã€ããŠã¯ã
ããã©ã«ã -G ãªãã·ã§ã³ã¯æ§æã«ãã£ãŠç°ãªããŸãã
-mlocal-sdata
-mno-local-sdata
延é·ããïŒå»¶é·ããªãïŒ -G éçå€æ°ãªã©ã®ããŒã«ã«ããŒã¿ã«å¯Ÿããåäœã
Cã§ã -mlocal-sdata ãã¹ãŠã®æ§æã®ããã©ã«ãã§ãã
ã¢ããªã±ãŒã·ã§ã³ã䜿çšããŠããå°ããªããŒã¿ãå€ããããšãªã³ã«ãæå¥ãèšãå Žåã¯ã
ããã©ãŒãã³ã¹ãããã»ã©éèŠã§ã¯ãªãããŒããã§åæ§ç¯ããŠã¿ãŠãã ãã -mno-local-sdataã ããªã
ã§å€§èŠæš¡ãªã©ã€ãã©ãªãæ§ç¯ããããšãã§ããŸã -mno-local-sdataãã©ã€ãã©ãªã
ã¡ã€ã³ããã°ã©ã ã®ããã«ããå€ãã®äœå°ãæ®ããŠãã ããã
-mextern-sdata
-mno-extern-sdata
å€éšã§å®çŸ©ãããããŒã¿ãå°ããªããŒã¿ã»ã¯ã·ã§ã³ã«ãããšä»®å®ããŸãïŒä»®å®ããªãã§ãã ããïŒã
ãã®ããŒã¿ã®ãµã€ãºã¯ -G éå®ã -mextern-sdata ãã¹ãŠã®ããã©ã«ãã§ã
æ§æã
ã¢ãžã¥ãŒã«ãã³ã³ãã€ã«ããå Žå ãŠã§ã€ ã -mextern-sdata -G NUM -mgpopt, ãŠã§ã€ åç §
å€æ° å ããã¯å€§ãããªã NUM ãã€ããããªãã¯ããã確èªããå¿ èŠããããŸã å 眮ãããŠãã
å°ããªããŒã¿ã»ã¯ã·ã§ã³ã§ã ããã å å¥ã®ã¢ãžã¥ãŒã«ã«ãã£ãŠå®çŸ©ãããŠããå Žåã¯ãã³ã³ãã€ã«ããå¿ èŠããããŸã
ååãªé«ãã®ãã®ã¢ãžã¥ãŒã« -G ãã»ã¯ã·ã§ã³ãå±æ§ãèšå®ãŸãã¯æ·»ä»ãã å's
æå³ã ããã å äžè¬çã§ãããã¢ããªã±ãŒã·ã§ã³ãååãªé«ãã§ãªã³ã¯ããå¿ èŠããããŸã -G
èšå®ã
ãããã®å¶éãæºããæãç°¡åãªæ¹æ³ã¯ããã¹ãŠã®ã¢ãžã¥ãŒã«ãã³ã³ãã€ã«ããŠãªã³ã¯ããããšã§ãã
åã㧠-G ãªãã·ã§ã³ã ãã ããããµããŒãããã©ã€ãã©ãªãæ§ç¯ããããšããå§ãããŸã
ããã€ãã®ç°ãªãå°ããªããŒã¿å¶éã ãããè¡ãã«ã¯ãã©ã€ãã©ãªã次ã®ããã«ã³ã³ãã€ã«ããŸãã
ãµããŒããããŠããæé« -G èšå®ãšè¿œå äœ¿çš -mno-extern-sdata åæ¢ãã
ã©ã€ãã©ãªã¯ãå€éšã§å®çŸ©ãããããŒã¿ã«ã€ããŠã®ä»®å®ãç«ãŠãããšããã
-mgpopt
-mno-gpopt
å°ããªããŒã¿ã«ããããšãããã£ãŠããã·ã³ãã«ã«GPçžå¯Ÿã¢ã¯ã»ã¹ã䜿çšããïŒäœ¿çšããªãïŒ
ã»ã¯ã·ã§ã³; èŠã -G, -mlocal-sdata ãš -mextern-sdata. -mgpopt ãã¹ãŠã®ããã©ã«ãã§ã
æ§æã
-mno-gpopt $gpã¬ãžã¹ã¿ãã®å€ãä¿æããªãå¯èœæ§ãããå Žåã«åœ¹ç«ã¡ãŸã
ã_gpãã ããšãã°ãã³ãŒããããŒãã§äœ¿çšãããå¯èœæ§ã®ããã©ã€ãã©ãªã®äžéšã§ããå Žå
ã¢ãã¿ãŒãããŒãã¢ãã¿ãŒã«ãŒãã³ãåŒã³åºãããã°ã©ã ã¯ã$gpã§äžæãªå€ãæž¡ããŸãã ïŒã®
ãã®ãããªç¶æ³ã§ã¯ãããŒãã¢ãã¿ãŒèªäœã¯é垞次ã®ããã«ã³ã³ãã€ã«ãããŸã -G0.)
-mno-gpopt å«æãã -mno-local-sdata ãš -mno-extern-sdata.
-åã蟌ã¿ããŒã¿
-mno-embedded-data
å¯èœã§ããã°ãæåã«èªã¿åãå°çšããŒã¿ã»ã¯ã·ã§ã³ã«å€æ°ãå²ãåœãŠã次ã«
å¯èœã§ããã°å°ããªããŒã¿ã»ã¯ã·ã§ã³ãããã§ãªãå Žåã¯ããŒã¿ã ããã«ãããã³ãŒããå°ãé ããªããŸã
ããã©ã«ããããå€ããªããŸãããå®è¡æã«å¿ èŠãªRAMã®éãæžãããã
äžéšã®çµã¿èŸŒã¿ã·ã¹ãã ã«é©ããŠããŸãã
-muninit-const-in-rodata
-mno-uninit-const-in-rodata
åæåãããŠããªããconstãå€æ°ãèªã¿åãå°çšããŒã¿ã»ã¯ã·ã§ã³ã«é 眮ããŸãã ãã®ãªãã·ã§ã³ã¯
ãšçµã¿åãããŠã®ã¿æå³ããã -åã蟌ã¿ããŒã¿.
-mcode-èªã¿åãå¯èœ=èšå®
GCCãå®è¡å¯èœã»ã¯ã·ã§ã³ããèªã¿åãã³ãŒããçæã§ãããã©ãããæå®ããŸãã ããã
XNUMXã€ã®å¯èœãªèšå®ïŒ
-mcode-èªã¿åãå¯èœ=ã¯ã
åœä»€ã¯å®è¡å¯èœã»ã¯ã·ã§ã³ã«èªç±ã«ã¢ã¯ã»ã¹ã§ããŸãã ãããããã©ã«ãèšå®ã§ãã
-mcode-èªã¿åãå¯èœ=pcrel
MIPS16 PCçžå¯ŸããŒãåœä»€ã¯å®è¡å¯èœã»ã¯ã·ã§ã³ã«ã¢ã¯ã»ã¹ã§ããŸããããã®ä»
æ瀺ã¯ããããŠã¯ãããŸããã ãã®ãªãã·ã§ã³ã¯ã4KScããã³4KSdããã»ããµã§åœ¹ç«ã¡ãŸã
ã³ãŒãTLBã«èªã¿åãçŠæ¢ããããèšå®ãããŠããå Žåã ããã»ããµã§ã圹ç«ã¡ãŸã
ãã¥ã¢ã«ã€ã³ã¹ãã©ã¯ã·ã§ã³/ããŒã¿SRAMã€ã³ã¿ãŒãã§ã€ã¹ãæã€ããã«æ§æã§ãã
M4Kãšåæ§ã«ãPCçžå¯Ÿè² è·ãåœä»€RAMã«èªåçã«ãªãã€ã¬ã¯ãããŸãã
-mcode-èªã¿åãå¯èœ=ããã
åœä»€ã¯å®è¡å¯èœã»ã¯ã·ã§ã³ã«ã¢ã¯ã»ã¹ããŠã¯ãªããŸããã ãã®ãªãã·ã§ã³ã¯ã
ãã¥ã¢ã«ã€ã³ã¹ãã©ã¯ã·ã§ã³/ããŒã¿SRAMã€ã³ã¿ãŒãã§ã€ã¹ãæã€ããã«æ§æãããŠããã¿ãŒã²ãã
ïŒM4Kãšã¯ç°ãªãïŒPCçžå¯Ÿè² è·ãèªåçã«ãªãã€ã¬ã¯ãããŸãã
åœä»€RAMã
-msplit-ã¢ãã¬ã¹
-mno-åå²ã¢ãã¬ã¹
ãïŒ hiïŒïŒãããã³ãïŒ loïŒïŒãã¢ã»ã³ãã©åé 眮æŒç®åã®äœ¿çšãæå¹ïŒç¡å¹ïŒã«ããŸãã ãã
ãªãã·ã§ã³ã¯ã«åã£ãŠä»£ããããŸãã -mexplicit-relocs ãã ããåŸæ¹ã«ä¿æãããŸã
äºææ§ã
-mexplicit-relocs
-mno-explicit-relocs
ã·ã³ããªãã¯ã¢ãã¬ã¹ãåŠçãããšãã¯ãã¢ã»ã³ãã©åé 眮æŒç®åã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
ã«ãã£ãŠéžæãããä»£æ¿ -mno-explicit-relocsã代ããã«ã¢ã»ã³ãã©ãã¯ãã䜿çšããŸãã
-mexplicit-relocs GCCã次ã®ãããªã¢ã»ã³ãã©ã䜿çšããããã«èšå®ãããŠããå Žåã®ããã©ã«ãã§ãã
åé 眮æŒç®åããµããŒãããŸãã
-mcheck-ãŒãé€ç®
-mno-check-zero-division
ãŒãã«ããæŽæ°é€ç®ã§ãã©ããããŸãïŒãã©ããããŸããïŒã
ããã©ã«ã㯠-mcheck-ãŒãé€ç®.
-mdivide-ãã©ãã
-mdivide-breaks
MIPSã·ã¹ãã ã¯ãæ¡ä»¶ä»ããã©ãããŸãã¯
ãã¬ãŒã¯åœä»€ã ãã©ããã䜿çšãããšã³ãŒããå°ãããªããŸãããMIPSã§ã®ã¿ãµããŒããããŸã
II以éã ãŸããLinuxã«ãŒãã«ã®äžéšã®ããŒãžã§ã³ã«ã¯ããã©ãããé²ããã°ããããŸã
é©åãªä¿¡å·ïŒãSIGFPEãïŒã®çæããã 䜿çšãã -mdivide-ãã©ãã æ¡ä»¶ä»ãã§èš±å¯ãã
ãããããµããŒãããã¢ãŒããã¯ãã£ã®ãã©ãããš -mdivide-breaks ã®äœ¿çšã匷å¶ãã
äŒæ©ã
ããã©ã«ãã¯éåžžã§ã -mdivide-ãã©ããããã ããããã¯æ§ææã«ãªãŒããŒã©ã€ãã§ããŸã
--with-divide = breaksã ãŒãé€ç®ãã§ãã¯ã¯ãã䜿çšããŠå®å šã«ç¡å¹ã«ããããšãã§ããŸã
-mno-check-zero-division.
-mmemcpy
-mno-memcpy
éèŠãªãããã¯ã®ç§»åã«ãmemcpy()ãã®äœ¿çšã匷å¶ããŸã (匷å¶ããŸãã)ã ããã©ã«ã
is -mno-memcpyãããã«ãããGCCã¯ã»ãšãã©ã®äžå®ãµã€ãºã®ã³ããŒãã€ã³ã©ã€ã³åã§ããŸãã
-mlong-calls
-mno-long-calls
ãjalãåœä»€ã®äœ¿çšãç¡å¹ã«ããŸãïŒç¡å¹ã«ããªãã§ãã ããïŒã ãjalãã䜿çšããé¢æ°ã®åŒã³åºã
ããå¹ççã§ãããçºä¿¡è ãšçä¿¡è ãåã256ã¡ã¬ãã€ãã§ããå¿ èŠããããŸã
ã»ã°ã¡ã³ãã
ãã®ãªãã·ã§ã³ã¯ãabicallsã³ãŒãã«ã¯åœ±é¿ããŸããã ããã©ã«ã㯠-mno-long-calls.
-ããã
-mno-mad
ãmadãããmaduããããã³ãmulãåœä»€ã®äœ¿çšãæå¹ïŒç¡å¹ïŒã«ããŸãã
R4650ISAã
-ãããã
-mno-imadd
ãmaddãããã³ãmsubãæŽæ°åœä»€ã®äœ¿çšãæå¹ïŒç¡å¹ïŒã«ããŸãã ããã©ã«ãã¯
-ãããã 74kãé€ããmaddããšãmsubãããµããŒãããã¢ãŒããã¯ãã£
é ãã³ãŒããçæããããšãããã£ãã¢ãŒããã¯ãã£ã
-æ··ä¹±-çã£ã
-mno-fusion-madd
æµ®åå°æ°ç¹ç©ååœä»€ã®äœ¿çšãæå¹ïŒç¡å¹ïŒã«ããŸãã
å©çšå¯èœã§ãã ããã©ã«ã㯠-æ··ä¹±-çã£ã.
R8000 CPUã§ãç©ååœä»€ã䜿çšãããå Žåãäžé
補åã¯ç¡éã®ç²ŸåºŠã§èšç®ãããFCSRãã©ãã·ã¥ã®å¯Ÿè±¡ã§ã¯ãããŸããã
ãŒããããã ããã¯ãç¶æ³ã«ãã£ãŠã¯æãŸãããªãå ŽåããããŸãã ä»ã®ããã»ããµã§ã¯ã
çµæã¯ãåå¥ã®ä¹ç®ã䜿çšããåçã®èšç®ãšæ°å€çã«åãã§ãã
åœä»€ãå ç®ãæžç®ãããã³ç¡å¹ã«ããŸãã
-nocpp
MIPSã¢ã»ã³ãã©ã«ãããªããã»ããµããŠãŒã¶ãŒã¢ã»ã³ãã©ãã¡ã€ã«ã«å¯ŸããŠå®è¡ããªãããã«æ瀺ããŸãïŒ
.s æ¥å°ŸèŸïŒããããçµã¿ç«ãŠããšãã
-mfix-24k
-mno-fix-24k
24K E48ïŒè£å äžã«åºèã®ããŒã¿ã倱ãããïŒã®æ£èª€è¡šãåé¿ããŸãã åé¿ç
GCCã§ã¯ãªãã¢ã»ã³ãã©ã«ãã£ãŠå®è£ ãããŸãã
-mfix-r4000
-mno-fix-r4000
ç¹å®ã®R4000CPUãšã©ãã¿ãåé¿ããŸãã
-ããã«ã¯ãŒããŸãã¯å¯å€ã·ãããå®è¡ãããšã誀ã£ãçµæãçããå¯èœæ§ããããŸã
æŽæ°é€ç®ãéå§ããçŽåŸã
-ããã«ã¯ãŒããŸãã¯å¯å€ã·ããã¯ãå®è¡äžã«èª€ã£ãçµæãããããå¯èœæ§ããããŸã
æŽæ°ä¹ç®ãé²è¡äžã§ãã
-æŽæ°é€ç®ã¯ãã®é 延ã¹ãããã§éå§ãããå Žåã誀ã£ãçµæãããããå¯èœæ§ããããŸã
ãã©ã³ããŸãã¯ãžã£ã³ããåããŸããã
-mfix-r4400
-mno-fix-r4400
ç¹å®ã®R4400CPUãšã©ãã¿ãåé¿ããŸãã
-ããã«ã¯ãŒããŸãã¯å¯å€ã·ãããå®è¡ãããšã誀ã£ãçµæãçããå¯èœæ§ããããŸã
æŽæ°é€ç®ãéå§ããçŽåŸã
-mfix-r10000
-mno-fix-r10000
ç¹å®ã®R10000ãšã©ãã¿ãåé¿ããŸãã
-"ll" / "sc"ã·ãŒã±ã³ã¹ã¯ã3.0ããåã®ãªããžã§ã³ã§ã¯ã¢ãããã¯ã«åäœããªãå ŽåããããŸãã 圌ãã¯ãããããŸãã
ãªããžã§ã³2.6以åã§ã®ãããããã¯ã
ãã®ãªãã·ã§ã³ã¯ãã¿ãŒã²ããã¢ãŒããã¯ãã£ããã©ã³ãã®å¯èœæ§ããµããŒãããŠããå Žåã«ã®ã¿äœ¿çšã§ããŸã
æ瀺ã«åŸã£ãŠãã ããã -mfix-r10000 ãããã©ã«ãã®å Žå -march = r10000 䜿çšãããŠãã; -mno-fix-r10000
ãã以å€ã®å Žåã¯ããã©ã«ãã§ãã
-mfix-rm7000
-mno-fix-rm7000
RM7000ã®ãdmultã/ãdmultuããšã©ãã¿ãåé¿ããŸãã åé¿çã¯ã«ãã£ãŠå®è£ ãããŸã
GCCã§ã¯ãªãã¢ã»ã³ãã©ã
-mfix-vr4120
-mno-fix-vr4120
ç¹å®ã®VR4120ãšã©ãã¿ãåé¿ããŸãã
-ãdmultuãã¯åžžã«æ£ããçµæãçæãããšã¯éããŸããã
-ãdivããšãddivãã¯ããªãã©ã³ãã®XNUMXã€ãæ£ããçµæãçæãããšã¯éããŸããã
è² ã§ãã
é€ç®ãšã©ãã¿ã®åé¿çã¯ã次ã®ç¹æ®æ©èœã«äŸåããŠããŸãã libgcc.aã ã«
çŸåšããããã®æ©èœã¯ãmips64vr*-elfãæ§æã«ãã£ãŠã®ã¿æäŸãããŸãã
ä»ã®VR4120ãšã©ãã¿ã§ã¯ãç¹å®ã®ãã¢ã®éã«NOPãæ¿å ¥ããå¿ èŠããããŸãã
æ瀺ã ãããã®ãšã©ãã¿ã¯ãGCCèªäœã§ã¯ãªããã¢ã»ã³ãã©ã«ãã£ãŠåŠçãããŸãã
-mfix-vr4130
VR4130ãmfloã/ãmfhiããšã©ãã¿ãåé¿ããŸãã åé¿çã¯ãã«ãã£ãŠå®è£ ãããŸã
GCCã§ã¯ãªãã¢ã»ã³ãã©ã§ãããGCCã¯ãmfloããšãmfhiãã®äœ¿çšãé¿ããŸãã
代ããã«ãVR4130ã®ãmaccãããmacchiãããdmaccããããã³ãdmacchiãã®åœä»€ã䜿çšã§ããŸãã
-mfix-sb1
-mno-fix-sb1
ç¹å®ã®SB-1CPUã³ã¢ã®æ£èª€è¡šãåé¿ããŸãã ïŒãã®ãã©ã°ã¯çŸåšSB-1ã§æ©èœããŸã
ãªããžã§ã³2ãF1ãããã³ãF2ãæµ®åå°æ°ç¹ãšã©ãã¿ãïŒ
-mr10k-cache-barrier =èšå®
ã®å¯äœçšãåé¿ããããã«GCCããã£ãã·ã¥ããªã¢ãæ¿å ¥ããå¿ èŠããããã©ãããæå®ããŸã
R10Kããã»ããµã«é¢ããæ¶æž¬ã
å€ãã®ããã»ããµãšå ±éããŠãR10Kã¯æ¡ä»¶ä»ãã®çµæãäºæž¬ããããšããŸã
åå²ãããååŸãããåå²ããã®åœä»€ãææ©çã«å®è¡ããŸãã åŸã§
äºæž¬ãããçµæãééã£ãŠããå Žåããããã®åœä»€ãäžæ¢ããŸãã ãã ããR10Kã§ã¯ã
äžæ¢ãããåœä»€ã§ãããå¯äœçšãåŒãèµ·ããå¯èœæ§ããããŸãã
ãã®åé¡ã¯ã«ãŒãã«ã¹ãã¢ã«ã®ã¿åœ±é¿ããã·ã¹ãã ã«ãã£ãŠã¯ã«ãŒãã«ã®è² è·ã«ã®ã¿åœ±é¿ããŸãã
äŸãšããŠãææ©çã«å®è¡ãããã¹ãã¢ã¯ãã¿ãŒã²ããã¡ã¢ãªããã£ãã·ã¥ã«ããŒãããå ŽåããããŸã
ã¹ãã¢èªäœãåŸã§äžæ¢ãããå Žåã§ãããã£ãã·ã¥ã©ã€ã³ãããŒãã£ãšããŠããŒã¯ããŸãã DMAã®å Žå
ãããŒãã£ãã©ã€ã³ããã©ãã·ã¥ãããåã«ãæäœã¯ã¡ã¢ãªã®åãé åã«æžã蟌ã¿ãŸãã
ãã£ãã·ã¥ãããããŒã¿ã¯ãDMAãããããŒã¿ãäžæžãããŸãã 詳现ã«ã€ããŠã¯ãR10Kããã»ããµã®ããã¥ã¢ã«ãåç §ããŠãã ãã
ä»ã®æœåšçãªåé¡ãå«ã説æã
åé¿çã®XNUMXã€ã¯ããã¹ãŠã®ã¡ã¢ãªã¢ã¯ã»ã¹ã®åã«ãã£ãã·ã¥ããªã¢åœä»€ãæ¿å ¥ããããšã§ãã
ææ©çã«å®è¡ãããå¯èœæ§ããããäžæ¢ãããå Žåã§ãå¯äœçšãçºçããå¯èœæ§ããããŸãã
-mr10k-cache-barrier =èšå® ãã®åé¿çã®GCCã®å®è£ ãå¶åŸ¡ããŸãã ãã
次ã®é åã®ä»»æã®ãã€ããžã®äžæ¢ãããã¢ã¯ã»ã¹ã«ã¯ãµã€ãããªããšæ³å®ããŸã
å¹æïŒ
1.çŸåšã®é¢æ°ã®ã¹ã¿ãã¯ãã¬ãŒã ãå ããã¡ã¢ãªã
2.çä¿¡ã¹ã¿ãã¯åŒæ°ãå ããã¡ã¢ãªã
3.ãªã³ã¯æå®æ°ã¢ãã¬ã¹ãæã€ãªããžã§ã¯ããå æããã¡ã¢ãªã
ãããã®ãªãŒãžã§ã³ãžã®ææ©çã¢ã¯ã»ã¹ãä¿èšŒããã®ã¯ã«ãŒãã«ã®è²¬ä»»ã§ã
確ãã«å®å šã§ãã
å ¥åããã°ã©ã ã«æ¬¡ã®ãããªé¢æ°å®£èšãå«ãŸããŠããå ŽåïŒ
void fooïŒvoidïŒ;
次ã«ããfooãã®å®è£ ã«ããããjfooããšãjalfooããå®è¡ã§ããããã«ããå¿ èŠããããŸã
ææ©çã«ã GCCã¯ãããèªäœãã³ã³ãã€ã«ããé¢æ°ã«å¯Ÿãããã®å¶éãå°éããŸãã ãã
éGCCé¢æ°ïŒææžãã®ã¢ã»ã³ããªã³ãŒããªã©ïŒã§ãåãããšãè¡ãå¿ èŠããããŸãã
ãªãã·ã§ã³ã«ã¯XNUMXã€ã®åœ¢åŒããããŸãã
-mr10k-cache-barrier = load-store
ææ©çã«å®è¡ãããå¯èœæ§ã®ããããŒããŸãã¯ã¹ãã¢ã®åã«ãã£ãã·ã¥ããªã¢ãæ¿å ¥ããŸã
äžçµ¶ãããšããŠãå¯äœçšããããããããŸããã
-mr10k-cache-barrier = store
ææ©çã«å®è¡ãããå¯èœæ§ã®ããã¹ãã¢ã®åã«ãã£ãã·ã¥ããªã¢ãæ¿å ¥ãã
äžæ¢ããŠãå¯äœçšããããããããŸããã
-mr10k-cache-barrier = none
ãã£ãã·ã¥ããªã¢ã®æ¿å ¥ãç¡å¹ã«ããŸãã ãããããã©ã«ãèšå®ã§ãã
-mflush-func =ãã¡ã³ã¯
-mno-flush-func
Iãã£ãã·ã¥ãšDãã£ãã·ã¥ããã©ãã·ã¥ããããã«åŒã³åºãé¢æ°ããŸãã¯ãã®ãããªãã£ãã·ã¥ãåŒã³åºããªãããã«ããé¢æ°ãæå®ããŸã
é¢æ°ã åŒã³åºãããå Žåãé¢æ°ã¯å ±éã®åŒæ°ãšåãåŒæ°ãåãå¿ èŠããããŸã
ã_flush_func()ããã€ãŸãããã£ãã·ã¥ãå®è¡ãããã¡ã¢ãªç¯å²ã®ã¢ãã¬ã¹
ãã©ãã·ã¥ãã¡ã¢ãªç¯å²ã®ãµã€ãºãããã³æ°å€3ïŒäž¡æ¹ã®ãã£ãã·ã¥ããã©ãã·ã¥ããããïŒã The
ããã©ã«ãã¯ãGCCãæ§æãããã¿ãŒã²ããã«ãã£ãŠç°ãªããŸãããéåžžã¯æ¬¡ã®ããããã§ãã
_flush_func or __cpu_flush.
mbranch-cost =NUM
ãã©ã³ãã®ã³ã¹ããããããã«èšå®ããŸã NUM ãç°¡åãªãæ瀺ã ãã®è²»çšã¯
ãã¥ãŒãªã¹ãã£ãã¯ã§ããããªãªãŒã¹éã§äžè²«ããçµæãåŸããããšã¯éããŸããã ãŒã
ã³ã¹ãã¯ãããã©ã«ããåé·ã«éžæããŸããããã¯ã -ã ãã¥ãŒã³ èšå®ã
-mbranch-å¯èœæ§ãé«ã
-mno-ãã©ã³ãã®å¯èœæ§ãé«ã
ã®ããã©ã«ãã«é¢ä¿ãªããBranchLikelyåœä»€ã®äœ¿çšãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
éžæããã¢ãŒããã¯ãã£ã ããã©ã«ãã§ã¯ãBranch Likelyåœä»€ã¯ã次ã®å Žåã«çæãããå¯èœæ§ããããŸãã
ãããã¯ãéžæããã¢ãŒããã¯ãã£ã«ãã£ãŠãµããŒããããŠããŸãã äŸå€ã¯MIPS32ãš
MIPS64ã¢ãŒããã¯ãã£ããã³ãããã®ã¢ãŒããã¯ãã£ãå®è£ ããããã»ããµã ãããã®ããã®ã
MIPS32ãš
MIPS64ã¢ãŒããã¯ãã£ã¯ãç¹ã«ãã®äœ¿çšãéæšå¥šã«ããŸãã
-mfp-äŸå€
-mno-fp-äŸå€
FPäŸå€ãæå¹ã«ãããã©ãããæå®ããŸãã ããã¯ãFPåœä»€ã®ç¶æ ã«åœ±é¿ããŸã
äžéšã®ããã»ããµã§ã¹ã±ãžã¥ãŒã«ãããŠããŸãã ããã©ã«ãã§ã¯ãFPäŸå€ãæå¹ã«ãªã£ãŠããŸãã
ããšãã°ãSB-1ã§ã¯ãFPäŸå€ãç¡å¹ã«ãªã£ãŠããŠã64ããããåºåããŠããå Žå
ã³ãŒããäœæãããšãäž¡æ¹ã®FPãã€ãã䜿çšã§ããŸãã ãã以å€ã®å Žåã䜿çšã§ããFPãã€ãã¯XNUMXã€ã ãã§ãã
-mvr4130-æŽå
-mno-vr4130-align
VR4130ãã€ãã©ã€ã³ã¯åæ¹åã¹ãŒããŒã¹ã«ã©ãŒã§ãããçºè¡ã§ããåœä»€ã¯XNUMXã€ã ãã§ãã
æåã®ãã®ã8ãã€ãæŽåãããŠããå Žåã¯äžç·ã«ã ãã®ãªãã·ã§ã³ãæå¹ã«ãããšãGCCã¯æŽåããŸã
䞊è¡ããŠå®è¡ããå¿ èŠããããšèããããåœä»€ã®ãã¢ã
ãã®ãªãã·ã§ã³ã¯ãVR4130çšã«æé©åããå Žåã«ã®ã¿å¹æããããŸãã éåžžã¯ã³ãŒããäœæããŸã
ããéããªããŸããã倧ããããããšãç ç²ã«ããŠã ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
æé©åã¬ãã« -O3.
-msynci
-mno-synci
ããããµããŒãããã¢ãŒããã¯ãã£ã§ã®ãåæãåœä»€ã®çæãæå¹ïŒç¡å¹ïŒã«ããŸãã
ãsynciãåœä»€ (æå¹ãªå Žå) ã¯ãã__builtin___clear_cache()ãæã«çæãããŸãã
ã³ã³ãã€ã«ãããŸãã
ãã®ãªãã·ã§ã³ã®ããã©ã«ãã¯ã-mno-synciãã§ãããèšå®ã«ãã£ãŠããã©ã«ããäžæžãã§ããŸã
ã--with-synciãã§ã
ã·ã³ã°ã«ããã»ããµã·ã¹ãã çšã®ã³ãŒããã³ã³ãã€ã«ããå Žåãéåžžã¯ãsynciãã䜿çšããŠãå®å šã§ãã
ãã ããå€ãã®ãã«ãã³ã¢ïŒSMPïŒã·ã¹ãã ã§ã¯ãåœä»€ãç¡å¹ã«ãªãããšã¯ãããŸããã
ãã¹ãŠã®ã³ã¢ã«ãã£ãã·ã¥ãããæªå®çŸ©ã®åäœã«ã€ãªããå¯èœæ§ããããŸãã
-mrelax-pic-calls
-mno-relax-pic-calls
éåžžã¯ã¬ãžã¹ã¿ãŒ$25ãä»ããŠãã£ã¹ããããããPICã³ãŒã«ãçŽæ¥ã³ãŒã«ã«å€æããŠã¿ãŠãã ããã
ããã¯ããªã³ã«ããªã³ã¯æã«å®å ã解決ã§ããå Žåã«ã®ã¿å¯èœã§ããã
å®å ã¯çŽéé»è©±ã®ç¯å²å ã§ãã
-mrelax-pic-calls GCCãã¢ã»ã³ãã©ãšã䜿çšããããã«èšå®ãããŠããå Žåã®ããã©ã«ãã§ã
".reloc" ã¢ã»ã³ã㪠ãã£ã¬ã¯ãã£ããš "-mexplicit-relocs" ããµããŒããããªã³ã«ãå«ãŸããŠããŸã
å¹æã ã-mno-explicit-relocsãã䜿çšãããšããã®æé©åã¯
ã³ã³ãã€ã©ã®å©ããåããã«ã¢ã»ã³ãã©ãšãªã³ã«ã ãã
-mmcount-ra-ã¢ãã¬ã¹
-mno-mcount-ra-ã¢ãã¬ã¹
ã_mcountããåŒã³åºãå ã®é¢æ°ã®æ»ãå€ãå€æŽã§ããããã«ããã³ãŒããçºè¡ïŒçºè¡ããªãïŒ
äœæã æå¹ã«ãããšããã®ãªãã·ã§ã³ã¯éåžžã®ã_mcountãã€ã³ã¿ãŒãã§ãŒã¹ãæ°ãããã®ã§æ¡åŒµããŸã
raã¢ãã¬ã¹ ã¿ã€ãããintptr_t*ãã§ãã¬ãžã¹ã¿ãŒ$12ã«æž¡ããããã©ã¡ãŒã¿ãŒã
ã_mcountãã¯ã次ã®äž¡æ¹ãå®è¡ããŠå·®åºäººäœæãå€æŽã§ããŸãã
· ã¬ãžã¹ã¿ $31 ã®æ°ããã¢ãã¬ã¹ãè¿ããŸãã
ã»æ°äœæãã*ãã«æ ŒçŽra-addressãããã raã¢ãã¬ã¹ nullã§ã¯ãããŸããã
ããã©ã«ã㯠-mno-mcount-ra-ã¢ãã¬ã¹.
ãããã¯ã¹ ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯MMIXçšã«å®çŸ©ãããŠããŸãã
-mlibfuncs
-mno-libfuncs
çµã¿èŸŒã¿ã©ã€ãã©ãªé¢æ°ãã³ã³ãã€ã«ãããŠããããšãæå®ãããã¹ãŠã®å€ã
ãµã€ãºã«é¢ä¿ãªããã¬ãžã¹ã¿ãŒã
-ã¡ãã·ãã³
-mno-ã€ãã·ãã³
ãrEãã«é¢ããŠæ¯èŒããæµ®åå°æ°ç¹æ¯èŒåœä»€ãçæããŸã
ã€ãã·ãã³ã¬ãžã¹ã¿ã
-mabi = mmixware
-mabi = gnu
é¢æ°ãã©ã¡ãŒã¿ãŒãæž¡ãã³ãŒããçæããïŒåŒã³åºããã
é¢æ°ïŒã¯ãã°ããŒãã«ã䜿çšããGNU ABIãšã¯å¯Ÿç §çã«ãã¬ãžã¹ã¿$0以äžãšèŠãªãããŸãã
231ãã«ä»¥äžãç»é²ããŸãã
-mzero-æ¡åŒµ
-mno-zero-extend
64ãããããçããµã€ãºã®ã¡ã¢ãªããããŒã¿ãèªã¿åãå Žåã¯ããŒãã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
笊å·æ¡åŒµåœä»€ã§ã¯ãªããããã©ã«ãã§ããŒãåœä»€ãæ¡åŒµããŸãã
-mknutthiv
-mno-knuthdiv
å°äœãçæããé€ç®ã®çµæãé€æ°ãšåã笊å·ãæã€ããã«ããŸãã
ããã©ã«ãã§ã¯ã -mno-knuthdivãå°äœã®ç¬Šå·ã¯ãã®ç¬Šå·ã®åŸã«ç¶ããŸã
é åœã ã©ã¡ãã®æ¹æ³ãç®è¡çã«æå¹ã§ãããåŸè ã¯ã»ãŒæä»çã§ã
äžå€ã
-mtoplevel-ã·ã³ãã«
-mno-ãããã¬ãã«-ã·ã³ãã«
ä»å ããïŒä»å ããªãïŒ : ãã¹ãŠã®ã°ããŒãã«ã·ã³ãã«ã«é©çšããããããã¢ã»ã³ããªã³ãŒãã䜿çšã§ããŸã
ãPREFIXãã¢ã»ã³ããªãã£ã¬ã¯ãã£ãã䜿çšããŸãã
-ã¡ã«ã
ããã©ã«ãã§ã¯ãªããELF圢åŒã§å®è¡å¯èœãã¡ã€ã«ãçæããŸã MMO ã«ãã£ãŠäœ¿çšããã圢åŒ
ã ãããã¯ã¹ ã·ãã¥ã¬ãŒã¿
-mbranch-äºæž¬
-mno-ãã©ã³ãäºæž¬
éçåå²äºæž¬ã®å Žåã¯ãprobable-branchåœä»€ã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã
å¯èœæ§ã®ãããã©ã³ãã瀺ããŸãã
-mbase-ã¢ãã¬ã¹
-mno-ããŒã¹ã¢ãã¬ã¹
ã䜿çšããã³ãŒããçæããïŒçæããªãïŒ ããŒã¹ ã¢ãã¬ã¹ã ããŒã¹ã¢ãã¬ã¹ã䜿çšãã
ïŒã¢ã»ã³ãã©ãšãªã³ã«ã«ãã£ãŠåŠçãããïŒèŠæ±ãèªåçã«çæããŸãã
ã°ããŒãã«ã¬ãžã¹ã¿ã«èšå®ãããå®æ°ã ã¬ãžã¹ã¿ãŒã¯XNUMXã€ä»¥äžã®ããŒã¹ã«äœ¿çšãããŸã
ã¬ãžã¹ã¿ã«ä¿æãããŠããå€ãã0ãã255ã®ç¯å²å ã®èŠæ±ã«å¯ŸåŠããŸãã The
éåžžãã³ãŒãã¯çãé«éã«ãªããŸãããããŸããŸãªããŒã¿é ç®ã®æ°ã¯
察åŠã§ããã®ã¯éãããŠããŸãã ããã¯ã倧éã®éçããŒã¿ã䜿çšããããã°ã©ã ãæå³ããŸã
å¿ èŠãããããŸãã -mno-ããŒã¹ã¢ãã¬ã¹.
-msingle-çµäº
-mno-åäžåºå£
çæãããã³ãŒãã«åé¢æ°ã«åäžã®åºå£ç¹ãæãããããã«åŒ·å¶ããŸãïŒåŒ·å¶ããªãã§ãã ããïŒã
MN10300 ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãMatsushitaMN10300ã¢ãŒããã¯ãã£çšã«å®çŸ©ãããŠããŸãã
-mmult-ãã°
MN10300ããã»ããµã®ä¹ç®åœä»€ã®ãã°ãåé¿ããããã®ã³ãŒããçæããŸãã
ãããããã©ã«ãã§ãã
-mno-mult-bug
MN10300ã®ä¹ç®åœä»€ã®ãã°ãåé¿ããããã«ã³ãŒããçæããªãã§ãã ãã
ããã»ããµã
-ãã33
AM33ããã»ããµã«åºæã®æ©èœã䜿çšããŠã³ãŒããçæããŸãã
-mno-am33
AM33ããã»ããµã«åºæã®æ©èœã䜿çšããŠã³ãŒããçæããªãã§ãã ããã ããã¯
ããã©ã«ãã
-mam33-2
AM33/2.0ããã»ããµã«åºæã®æ©èœã䜿çšããŠã³ãŒããçæããŸãã
-ãã34
AM34ããã»ããµã«åºæã®æ©èœã䜿çšããŠã³ãŒããçæããŸãã
-mtune =CPUã¿ã€ã
åœä»€ãã¹ã±ãžã¥ãŒãªã³ã°ãããšãã¯ã瀺ãããCPUã¿ã€ãã®ã¿ã€ãã³ã°ç¹æ§ã䜿çšããŠãã ããã
ããã«ããã察象ã®ããã»ããµã¿ã€ãã¯å€æŽãããŸããã CPUã¿ã€ãã¯æ¬¡ã®ããããã§ããå¿ èŠããããŸã
mn10300, am33, am33-2 or am34.
-mreturn-pointer-on-d0
ãã€ã³ã¿ãè¿ãé¢æ°ãçæãããšãã¯ããa0ããšãaXNUMXãã®äž¡æ¹ã§ãã€ã³ã¿ãè¿ããŸãã
ãd0ãã ãã以å€ã®å Žåããã€ã³ã¿ã¯ãa0ãã§ã®ã¿è¿ããããã®ãããªãã®ãåŒã³åºãããšããŸã
ãããã¿ã€ãã®ãªãé¢æ°ã¯ãšã©ãŒã«ãªããŸãã ãã®ãªãã·ã§ã³ã¯ã«ãã£ãŠãªã³ã«ãªã£ãŠããããšã«æ³šæããŠãã ãã
ãã£ãã©ã«ã; 䜿çšãã -mno-return-pointer-on-d0 ç¡å¹ã«ããŸãã
-mno-crt0
Cã©ã³ã¿ã€ã åæåãªããžã§ã¯ããã¡ã€ã«ã«ãªã³ã¯ããªãã§ãã ããã
-mãªã©ãã¯ã¹
ãªã©ã¯ãŒãŒã·ã§ã³æé©åãã¹ãå®è¡ããå¿ èŠãããããšããªã³ã«ãŒã«ç€ºããŸãã
ãã©ã³ããåŒã³åºããããã³çµ¶å¯Ÿã¡ã¢ãªã¢ãã¬ã¹ãççž®ããŸãã ãã®ãªãã·ã§ã³ã¯å¹æãããã ãã§ã
æåŸã®ãªã³ã¯ã¹ãããã®ã³ãã³ãã©ã€ã³ã§äœ¿çšããå Žåã
ãã®ãªãã·ã§ã³ã䜿çšãããšãã·ã³ããªãã¯ãããã°ãäžå¯èœã«ãªããŸãã
-mliw
ã³ã³ãã€ã©ã«çæãèš±å¯ãã é·ã åœä»€ Word ã¿ãŒã²ããã
AM33 ãŸãã¯ãã以éã ãããããã©ã«ãã§ãã ãã®ãªãã·ã§ã³ã¯ãããªããã»ããµãã¯ããå®çŸ©ããŸã
__LIW__.
-mnoliw
ã³ã³ãã€ã©ã«çæãèš±å¯ããªã é·ã åœä»€ Word æ瀺ã ãã®ãªãã·ã§ã³
ããªããã»ããµ ãã¯ããå®çŸ©ããŸã __ããã_LIW__.
-msetlb
ã³ã³ãã€ã©ãçæã§ããããã«ããŸã SETLB ãš LCC ã¿ãŒã²ããã
AM33 ãŸãã¯ãã以éã ãããããã©ã«ãã§ãã ãã®ãªãã·ã§ã³ã¯ãããªããã»ããµãã¯ããå®çŸ©ããŸã
__SETLB__.
-mnosetlb
ã³ã³ãã€ã©ã«çæãèš±å¯ããªã SETLB or LCC æ瀺ã ãã®ãªãã·ã§ã³ã¯æ¬¡ã®ããã«å®çŸ©ããŸã
ããªããã»ããµãã¯ã __NO_SETLB__.
åæ° ãªãã·ã§ã³
-meb
ããã°ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã ããã¯ã®ããã©ã«ãã§ã ã¢ã¯ã·ãŒ-*-* æ§æã
-ã¡ã«
ãªãã«ãšã³ãã£ã¢ã³ã³ãŒããçæããŸãã
-mno-crt0
Cã©ã³ã¿ã€ã åæåãªããžã§ã¯ããã¡ã€ã«ã«ãªã³ã¯ããªãã§ãã ããã
MSP430 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãMSP430ã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-masm-hex
ã¢ã»ã³ããªåºåã§åžžã«XNUMXé²å®æ°ã䜿çšããããã«åŒ·å¶ããŸãã éåžžããã®ãããªå®æ°ã¯çœ²åãããŠããŸã
å°æ°ã§ããããã®ãªãã·ã§ã³ã¯ãã¹ãã¹ã€ãŒãããã³/ãŸãã¯çŸçç®çã§äœ¿çšã§ããŸãã
-mmcu =
ã¿ãŒã²ãããšããMCUãéžæããŸãã ããã¯ãã«åºã¥ããŠCããªããã»ããµã·ã³ãã«ãäœæããããã«äœ¿çšãããŸã
倧æåã«å€æãããå眮ããã³åŸçœ®ãã__ãã§åºå®ããã MCU åã ããã§
ã¿ãŒã³ã¯ããmsp430.hãããã㌠ãã¡ã€ã«ã«ãã£ãŠäœ¿çšãããMCU åºæã®
è¿œå ããã㌠ãã¡ã€ã«ã
ãã®ãªãã·ã§ã³ã¯ã䜿çšããISAãèšå®ããŸãã MCUåãå¯äžã®äººã«ç¥ãããŠãããã®ã§ããå Žå
430 ISAããµããŒããããããéžæãããŸãããã以å€ã®å Žåã¯ã430XISAãéžæãããŸãã A
ãmsp430ãã®äžè¬ç㪠MCU åã䜿çšããŠã430 ISA ãéžæããããšãã§ããŸãã åæ§ã«ã
äžè¬çãªãmsp430xãMCU åã¯ã430X ISA ãéžæããŸãã
ããã«ãMCU åºæã®ãªã³ã«ãŒ ã¹ã¯ãªããããªã³ã«ãŒ ã³ãã³ã ã©ã€ã³ã«è¿œå ãããŸãã
ã¹ã¯ãªããã®ååã¯ãMCU ã®ååã«ã.ldããè¿œå ãããã®ã§ãã ãã®ããã«æå®
-mmcu = xxx gcc ã³ãã³ã ã©ã€ã³ã§ C ããªããã»ããµ ã·ã³ãã« "__XXX__" ãå®çŸ©ãã
ãªã³ã«ãŒã«ããšããã¹ã¯ãªãããæ€çŽ¢ãããŸãã xxx.ld.
ãã®ãªãã·ã§ã³ã¯ãã¢ã»ã³ãã©ãŒã«ãæž¡ãããŸãã
-mcpu =
䜿çšãã ISA ãæå®ããŸãã åãå ¥ããããå€ã¯ããmsp430ãããmsp430xããããã³ãmsp430xv2ãã§ãã
ãã®ãªãã·ã§ã³ã¯éæšå¥šã§ãã ã® -mmcu = ãªãã·ã§ã³ã䜿çšããŠISAãéžæããå¿ èŠããããŸãã
-msim
ã·ãã¥ã¬ãŒã¿ã©ã³ã¿ã€ã ã©ã€ãã©ãªãšãªã³ã«ãŒã¹ã¯ãªããã«ãªã³ã¯ããŸãã 次ã®ãããªã¹ã¯ãªãããäžæžãããŸã
ã«ãã£ãŠéžæãããŸã -mmcu = ãªãã·ã§ã³ãéžæããŸãã
-æ¡å€§
ã©ãŒãžã¢ãã«ã®ã¢ãã¬ã¹æå®ïŒ20ããããã€ã³ã¿ã32ããã "size_t"ïŒã䜿çšããŸãã
-å°ãã
ã¹ã¢ãŒã«ã¢ãã«ã¢ãã¬ã¹æå®ïŒ16ããããã€ã³ã¿ã16ããã "size_t"ïŒã䜿çšããŸãã
-mãªã©ãã¯ã¹
ãã®ãªãã·ã§ã³ã¯ã¢ã»ã³ãã©ãŒãšãªã³ã«ãŒã«æž¡ããããªã³ã«ãŒãå®è¡ã§ããããã«ããŸã
æçµãªã³ã¯ãŸã§å®è¡ã§ããªãç¹å®ã®æé©åã
mhwmult =
ã¿ãŒã²ããã«ãã£ãŠè€æ°ãµããŒããããããŒããŠã§ã¢ã®ã¿ã€ãã«ã€ããŠèª¬æããŸãã åãå ¥ããããå€ã¯
ããŒããŠã§ã¢ä¹ç®ãªãã®å Žåã¯ãnoneããå ã® 16 ãããã®ã¿ã®ä¹ç®ã®å Žåã¯ã16bitã
åæã® MCU ã§ãµããŒããããŠããŸãã åŸã® MCU ã§ãµããŒãããã 32/16 ãããä¹ç®ã®ã32bitã
ãf5seriesãã¯ãF16 ã·ãªãŒãº MCU ã§ãµããŒããããŠãã 32/5 ãããä¹ç®çšã§ãã ã®å€
ãautoããæå®ã§ããŸãã ããã¯ãããŒããŠã§ã¢ä¹ç®ãµããŒããæšæž¬ããããã« GCC ã«æ瀺ããŸãã
ã«ãã£ãŠæäŸããã MCU åã«åºã¥ããŠããŸãã -mmcu ãªãã·ã§ã³ã ãããã®å Žå -mmcu ãªãã·ã§ã³ãæå®ãããŠãã
ãã®å Žåãã32 ããããããŒããŠã§ã¢ä¹ç®ãµããŒããæ³å®ãããŸãã ãèªåããããã©ã«ãèšå®ã§ãã
ããŒããŠã§ã¢ã®ä¹ç®ã¯éåžžãã©ã€ãã©ãªã«ãŒãã³ãåŒã³åºãããšã«ãã£ãŠå®è¡ãããŸãã ããã¯ç¯çŽããŸã
çæãããã³ãŒãã®ã¹ããŒã¹ã ã-O3ã以äžã§ã³ã³ãã€ã«ãããšãããŒããŠã§ã¢
ä¹æ°ã¯ã€ã³ã©ã€ã³ã§åŒã³åºãããŸãã ããã«ãããã³ãŒãã¯å€§ãããªããŸãããé«éã«ãªããŸãã
ããŒããŠã§ã¢ä¹ç®ã«ãŒãã³ã¯ãå®è¡äžã®å²ã蟌ã¿ãç¡å¹ã«ããŠã
çµäºæã®ä»¥åã®å²ã蟌ã¿ç¶æ ã ããã«ãããå éšã§å®å šã«äœ¿çšã§ããŸã
å²ã蟌ã¿ãã³ãã©ãšéåžžã®ã³ãŒãã
-minrt
æå°éã®ã©ã³ã¿ã€ã ç°å¢ã®äœ¿çšãæå¹ã«ããŸã-éçåæååãªããŸãã¯
ã³ã³ã¹ãã©ã¯ã¿ã ããã¯ãã¡ã¢ãªã«å¶çŽã®ããããã€ã¹ã察象ãšããŠããŸãã ã³ã³ãã€ã©ã¯
äžéšã®ãªããžã§ã¯ãã«ç¹å¥ãªã·ã³ãã«ãå«ããŠããªã³ã«ãŒãšã©ã³ã¿ã€ã ã«ã©ã®ã³ãŒããå®è¡ããããäŒããŸãã
ãã©ã°ã¡ã³ããå¿ èŠã§ãã
NDS32 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãNDS32å®è£ çšã«å®çŸ©ãããŠããŸãã
-mbig-ãšã³ãã£ã¢ã³
ããã°ãšã³ãã£ã¢ã³ã¢ãŒãã§ã³ãŒããçæããŸãã
-mlittle-ãšã³ãã£ã¢ã³
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã§ã³ãŒããçæããŸãã
-mreduced-regs
ã¬ãžã¹ã¿å²ãåœãŠã«ã¯ãçž®å°ã»ããã¬ãžã¹ã¿ã䜿çšããŸãã
-mfull-regs
ã¬ãžã¹ã¿å²ãåœãŠã«ã¯ãã«ã»ããã¬ãžã¹ã¿ã䜿çšããŠãã ããã
-mcmov
æ¡ä»¶ä»ã移ååœä»€ãçæããŸãã
-mno-cmov
æ¡ä»¶ä»ã移ååœä»€ãçæããªãã§ãã ããã
-mperf-ext
ããã©ãŒãã³ã¹æ¡åŒµåœä»€ãçæããŸãã
-mno-perf-ext
ããã©ãŒãã³ã¹æ¡åŒµåœä»€ãçæããªãã§ãã ããã
-mv3push
v3 push25/pop25åœä»€ãçæããŸãã
-mno-v3push
v3 push25/pop25åœä»€ãçæããªãã§ãã ããã
-m16ããã
16ãããåœä»€ãçæããŸãã
-mno-16ããã
16ãããåœä»€ãçæããªãã§ãã ããã
-mgp-ãã€ã¬ã¯ã
GP ããŒã¹åœä»€ãçŽæ¥çæããŸãã
-mno-gp-direct
GP ããŒã¹åœä»€ãçŽæ¥çæããªãã§ãã ããã
-misr-vector-size =NUM
åå²ã蟌ã¿ãã¯ãã«ã®ãµã€ãºãæå®ããŸãããµã€ãºã¯4ãŸãã¯16ã§ãªããã°ãªããŸããã
-mcache-block-size =NUM
åãã£ãã·ã¥ãããã¯ã®ãµã€ãºãæå®ããŸããããã¯ã2ã4ã®512ã®çŽ¯ä¹ã§ããå¿ èŠããããŸãã
-XNUMXæ=ã¢ãŒã
ã¿ãŒã²ããã¢ãŒããã¯ãã£ã®ååãæå®ããŸãã
-mforce-fp-as-gp
ã³ã³ãã€ã©ãã§ããããã«ãã¬ãžã¹ã¿ã®å²ãåœãŠäžã« $fp ãå²ãåœãŠãããªãããã«ããŸãã
fp-as-gp æé©åã®å®è¡ã匷å¶ããŸãã
-mforbid-fp-as-gp
$fp ã䜿çšããŠéçããã³ã°ããŒãã«å€æ°ã«ã¢ã¯ã»ã¹ããããšãçŠæ¢ããŸãã ãã®ãªãã·ã§ã³ã¯åºãçŠããããŠããŸã
fp-as-gp ã®æé©åã«é¢ä¿ãªã -mforce-fp-as-gp.
-mex9
ç¹å¥ãªãã£ã¬ã¯ãã£ãã䜿çšããŠãex9 æé©åãè¡ããªã³ã«ãŒãã¬ã€ãããŸãã
-mctor-dtor
ã³ã³ã¹ãã©ã¯ã¿/ãã¹ãã©ã¯ã¿æ©èœãæå¹ã«ããŸãã
-mãªã©ãã¯ã¹
ãªã³ã«ãã¬ã€ãããŠåœä»€ãç·©åããŸãã
ããªã¹ II ãªãã·ã§ã³
ãããã¯ãã¢ã«ãã©NiosIIããã»ããµçšã«å®çŸ©ããããªãã·ã§ã³ã§ãã
-G NUM
ã°ããŒãã«ãªããžã§ã¯ããšéçãªããžã§ã¯ãã以äžã«é 眮ããŸã NUM å°ããªããŒã¿ãžã®ãã€ããŸãã¯
éåžžã®ããŒã¿ãŸãã¯BSSã»ã¯ã·ã§ã³ã®ä»£ããã«BSSã»ã¯ã·ã§ã³ã ã®ããã©ã«ãå€ NUM is
8.
-mgpopt
-mno-gpopt
å°ããªããŒã¿ãŸã㯠BSS å ã®ãªããžã§ã¯ãã«å¯Ÿãã GP çžå¯Ÿã¢ã¯ã»ã¹ãçæããŸã (çæããŸãã)ã
ã»ã¯ã·ã§ã³ã ããã©ã«ã㯠-mgpopt æãé€ã㊠-fpic or -fPIC çæããããã«æå®ãããŠããŸã
äœçœ®ã«äŸåããªãã³ãŒãã Nios II ABI 㯠GP çžå¯Ÿãèš±å¯ããªãããšã«æ³šæããŠãã ããã
å ±æã©ã€ãã©ãªããã¢ã¯ã»ã¹ããŸãã
æå®ããå¿ èŠããããããããŸãã -mno-gpopt ãå«ãããã°ã©ã ãæ§ç¯ãããšãã«æ瀺çã«
倧ããªGOTããŒã¿ã»ã¯ã·ã§ã³ãå«ãã倧éã®å°ããªããŒã¿ã ãã®å Žåã
GPçžå¯Ÿã¢ãã¬ã¹æå®ã®16ããããªãã»ããã¯ãã¢ã¯ã»ã¹ãèš±å¯ããã®ã«ååãªå€§ããã§ã¯ãªãå¯èœæ§ããããŸã
å°ããªããŒã¿ã»ã¯ã·ã§ã³å šäœã
-ã¡ã«
-meb
ãªãã«ãšã³ãã£ã¢ã³ïŒããã©ã«ãïŒãŸãã¯ããã°ãšã³ãã£ã¢ã³ïŒå®éšçïŒã³ãŒããããããçæããŸãã
-mbypass-ãã£ãã·ã¥
-mno-ãã€ãã¹-ãã£ãã·ã¥
ã®I/Oããªã¢ã³ãã䜿çšããŠããã¹ãŠã®ããŒãããã³ã¹ãã¢åœä»€ãåžžã«ãã£ãã·ã¥ããã€ãã¹ããããã«åŒ·å¶ããŸãã
説ææžã ããã©ã«ãã§ã¯ããã£ãã·ã¥ããã€ãã¹ããŸããã
-mno-ãã£ãã·ã¥-æ®çºæ§
-mcache-æ®çºæ§
æ®çºæ§ã¡ã¢ãªã¢ã¯ã»ã¹ã¯ãããŒãããã³ã¹ãã¢ã®I/Oããªã¢ã³ãã䜿çšããŠãã£ãã·ã¥ããã€ãã¹ããŸã
æ瀺ã ããã©ã«ãã§ã¯ããã£ãã·ã¥ããã€ãã¹ããŸããã
-mno-fast-sw-div
-mfast-sw-div
å°æ°ã®å Žåã¯ãããŒãã«ããŒã¹ã®é«éé€ç®ã䜿çšããªãã§ãã ããã ããã©ã«ãã§ã¯ãé«éã䜿çšããŸã
ã§åå² -O3 以äžã
-mno-hw-mul
-mhw-mul
-mno-hw-mulx
-mhw-ãã«ã¯ã¹
-mno-hw-div
-mhw-div
ãmulãããmulxããããã³ãdivããã¡ããªã®åœä»€ã®çºè¡ãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
ã³ã³ãã€ã©ã ããã©ã«ãã§ã¯ããmulããçºè¡ãããdivããšãmulxãã¯çºè¡ããŸããã
-mcustom-æ 通=N
-mno-ã«ã¹ã¿ã -æ 通
å -mcustom-æ 通=N ãªãã·ã§ã³ã䜿çšãããšããšã³ã³ãŒãã£ã³ã°ã§ã«ã¹ã¿ã åœä»€ã䜿çšã§ããŸã N ãã€
ã䜿çšããã³ãŒãã®çæ æ 通. ããšãã°ãã-mcustom-fadds=253ãã¯ã«ã¹ã¿ã ãçæããŸã
ã®ä»£ããã«å粟床浮åå°æ°ç¹å ç®æŒç®ã®åœä»€253
ã©ã€ãã©ãªåŒã³åºãã䜿çšããããã©ã«ãã®åäœã
次ã®å€ æ 通 ãµããŒããããŠããŸãã ç¹ã«æèšãããŠããªãéããæµ®åå°æ°ç¹
æäœã¯ãéåžžã®IEEE754ã»ãã³ãã£ã¯ã¹ã§å®è£ ãããããšãæåŸ ãããŠããŸãã
CæŒç®åãŸãã¯åçã®GCCçµã¿èŸŒã¿é¢æ°ã«çŽæ¥å¯Ÿå¿ããŸãã
å粟床浮åå°æ°ç¹ïŒ
ãã¡ãã, fsub, fdiv, ãã ã«ã¹
ãã€ããªç®è¡æŒç®ã
fnegs
åé åŠå®ã
çŽ æŽããã
åé 絶察å€ã
fcmpeqs, fcmpges, fcmpgts, fcmples, fcplts, fcmpnes
æ¯èŒæŒç®ã
ãµã¿ã, fmax
æµ®åå°æ°ç¹ã®æå°å€ãšæ倧å€ã ãããã®åœä»€ã¯ã次ã®å Žåã«ã®ã¿çæãããŸã
-æéæ°åŠã®ã¿ æå®ãããŠããŸãã
fsqrts
åé å¹³æ¹æ ¹æŒç®ã
ãã³ã¹, fsins, ãã¿ã³, ãã¡ã¿ã³, fexp, ãããã°
æµ®åå°æ°ç¹ã®äžè§é¢æ°ãšææ°é¢æ°ã ãããã®æ瀺ã¯
次ã®å Žåã«ã®ã¿çæãããŸã -funsafe-æ°åŠã®æé©å ãæå®ãããŠããŸãã
å粟床浮åå°æ°ç¹ïŒ
ãã¡ãã, fsubd, fdivd, 倱æ
ãã€ããªç®è¡æŒç®ã
ãã°ã
åé åŠå®ã
ãã¡ããºã
åé 絶察å€ã
fcmpeqd, fcmpged, fcmpgtd, å®è£ ããã, fcmpltd, fcmpned
æ¯èŒæŒç®ã
èŠã€ãã, fmaxd
å粟床ã®æå°å€ãšæ倧å€ã ãããã®åœä»€ã¯ã次ã®å Žåã«ã®ã¿çæãããŸã
-æéæ°åŠã®ã¿ æå®ãããŠããŸãã
fsqrtd
åé å¹³æ¹æ ¹æŒç®ã
fcosd, ãã·ã³ã, ãã¿ã³ã, ãã¡ã¿ã³ã, fexpd, ãããã°ã
å粟床ã®äžè§é¢æ°ãšææ°é¢æ°ã ãããã®æ瀺ã¯
次ã®å Žåã«ã®ã¿çæãããŸã -funsafe-æ°åŠã®æé©å ãæå®ãããŠããŸãã
å€æïŒ
fextsd
å粟床ããå粟床ãžã®å€æã
ftruncds
å粟床ããå粟床ãžã®å€æã
ãã£ãã¯ã¹, ãã£ãã¯ã¹, ä¿®æ£, åºå®
æµ®åå°æ°ç¹ãã笊å·ä»ããŸãã¯ç¬Šå·ãªãæŽæ°åãžã®å€æã
ãŒããžã®åãæšãŠã
æµ®ã茪, ãããŒã¿ã¹, æµ®åå°æ°ç¹æ°, æµ®ã茪
笊å·ä»ããŸãã¯ç¬Šå·ãªãæŽæ°åããæµ®åå°æ°ç¹åãžã®å€æã
ããã«ãå éšã¬ãžã¹ã¿Xããã³Yã®ä»¥äžã®ãã¹ãŠã®è»¢éåœä»€
å粟床浮åå°æ°ç¹åœä»€ã®ããããã䜿çšããã«ã¯ãæäŸããå¿ èŠããããŸãã
XNUMXã€ã®å粟床ãœãŒã¹ãªãã©ã³ãã䜿çšããã«ã¹ã¿ã åœä»€ã¯ãæåã®ãªãã©ã³ããæåŸ ããŸã
64ãããã¬ãžã¹ã¿Xã®ãªãã©ã³ããããäžæ¹ã®ãªãã©ã³ãïŒãŸãã¯åé ã®ãªãã©ã³ãã®ã¿ïŒ
æäœïŒã¯ãæäžäœã®ã«ã¹ã¿ã ç®è¡åœä»€ã«äžããããŸã
ãœãŒã¹ã¬ãžã¹ã¿ã®åå src1 ãããŠæãéèŠãªåå㯠src2ã ã«ã¹ã¿ã
å粟床ã®çµæãè¿ãåœä»€ã¯ãæäžäœã®32ãè¿ããŸãã
ãã¹ãã£ããŒã·ã§ã³ã¬ãžã¹ã¿ã®ããããš32ãããã¬ãžã¹ã¿Yã®æ®ãã®ååãGCC
ã¬ãžã¹ã¿Xã®æžã蟌ã¿ããã³/ãŸãã¯èªã¿åãã«å¿ èŠãªã³ãŒãã·ãŒã±ã³ã¹ãèªåçã«çæããŸã
å粟床浮åå°æ°ç¹åœä»€ã䜿çšããå Žåã¯ã¬ãžã¹ã¿Yã
fwrx
æžããŸã src1 Xã®æäžäœååã« src2 æãéèŠãªãã®ã«
Xã®ååã
ãããã
æžããŸã src1 Yã«ã
ãã¬ãã·, ãããã¯ã¹ã
Xã®æãéèŠãªååãŸãã¯æãéèŠã§ãªãååãèªã¿åãã dest.
ãã¬ãã£
Yã®å€ãèªã¿åããã«æ ŒçŽããŸã dest.
NiosIIã«ã¹ã¿ã ã®çæãããããŒã«ã«ã«å¶åŸ¡ã§ããããšã«æ³šæããŠãã ãã
ãtargetïŒãcustom-ã䜿çšããåœä»€insn = N "ïŒ" ããã³"targetïŒ" no-custom-insn "ïŒ"
é¢æ°å±æ§ãŸãã¯ãã©ã°ãã
-mcustom-fpu-cfg =å
ãã®ãªãã·ã§ã³ã¯ãäºåå®çŸ©ãããååä»ãã®ã«ã¹ã¿ã åœä»€ãšã³ã³ãŒãã£ã³ã°ã®ã»ãããæå¹ã«ããŸãïŒãåç §ïŒã
-mcustom-æ 通 ãã®äžïŒã çŸåšã次ã®ã»ãããå®çŸ©ãããŠããŸãã
-mcustom-fpu-cfg = 60-1 以äžãšåçã§ãã -mcustom-fmuls = 252 -mcustom-fadds = 253
-mcustom-fsubs = 254 -fså粟床å®æ°
-mcustom-fpu-cfg = 60-2 以äžãšåçã§ãã -mcustom-fmuls = 252 -mcustom-fadds = 253
-mcustom-fsubs = 254 -mcustom-fdivs = 255 -fså粟床å®æ°
-mcustom-fpu-cfg = 72-3 以äžãšåçã§ãã -mcustom-floatus = 243 -mcustom-fixsi = 244
-mcustom-floatis = 245 -mcustom-fcmpgts = 246 -mcustom-fcmples = 249 -mcustom-fcmpeqs = 250
-mcustom-fcmpnes = 251 -mcustom-fmuls = 252 -mcustom-fadds = 253 -mcustom-fsubs = 254
-mcustom-fdivs = 255 -fså粟床å®æ°
å人ã«ããã«ã¹ã¿ã åœä»€ã®å²ãåœãŠ -mcustom-æ 通= ãªãã·ã§ã³ã®ãªãŒããŒã©ã€ã
ã«ãã£ãŠäžãããããã® -mcustom-fpu-cfg =ãäžã®ãªãã·ã§ã³ã®é åºã«é¢ä¿ãªã
ã³ãã³ãã©ã€ã³ã
次ã®æ¹æ³ã§ãFPUæ§æã®éžæãããããŒã«ã«ã«å¶åŸ¡ã§ããããšã«æ³šæããŠãã ããã
"targetïŒ"custom-fpu-cfg=ã䜿çšããåå"ïŒ" é¢æ°å±æ§ãŸãã¯ãã©ã°ãã
ãããã®è¿œå -m ã¢ã«ãã©NiosIIELFïŒãã¢ã¡ã¿ã«ïŒã¿ãŒã²ããã§ã¯ã次ã®ãªãã·ã§ã³ã䜿çšã§ããŸãã
-ãã«
HALBSPãšãªã³ã¯ããŸãã ããã«ãããGCCãæäŸããCã©ã³ã¿ã€ã ã¹ã¿ãŒãã¢ãããšã®ãªã³ã¯ãæå¶ãããŸã
ããã³çµäºã³ãŒãã§ãããé垞㯠-msys-crt0 = æå®ããŸã
HALBSPã«ãã£ãŠæäŸããã代æ¿ã¹ã¿ãŒãã¢ããã³ãŒãã®å Žæã
-msmallc
Cã©ã€ãã©ãªã®éå®ããŒãžã§ã³ãšãªã³ã¯ããŸãã -lsmallcãNewlibã§ã¯ãªãã
-msys-crt0 =éå§ãã¡ã€ã«
éå§ãã¡ã€ã« ãªã³ã¯æã«äœ¿çšããstartfileïŒcrt0ïŒã®ãã¡ã€ã«åã§ãã ãã®ãªãã·ã§ã³
ãšçµã¿åãããå Žåã«ã®ã¿åœ¹ç«ã¡ãŸã -ãã«.
-msys-lib =ã·ã¹ãã ã©ã€ãã©ãª
ã·ã¹ãã ã©ã€ãã©ãª äœã¬ãã«ã®ã·ã¹ãã ã³ãŒã«ãæäŸããã©ã€ãã©ãªã®ã©ã€ãã©ãªåã§ã
Cã©ã€ãã©ãªã§å¿ èŠã§ããããšãã°ããèªã¿åããããæžã蟌ã¿ããªã©ã§ãã ãã®ãªãã·ã§ã³ã¯éåžžã
HALBSPãæäŸããã©ã€ãã©ãªãšã®ãªã³ã¯ã
PDP-11 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãPDP-11çšã«å®çŸ©ãããŠããŸãã
-mfpu
ããŒããŠã§ã¢FPPæµ®åå°æ°ç¹ã䜿çšããŸãã ãããããã©ã«ãã§ãã ïŒFISæµ®åå°æ°ç¹
PDP-11 / 40ã¯ãµããŒããããŠããŸãããïŒ
-msoft-float
ããŒããŠã§ã¢æµ®åå°æ°ç¹ã¯äœ¿çšããªãã§ãã ããã
-mac0
æµ®åå°æ°ç¹ã®çµæãac0ïŒUnixã¢ã»ã³ãã©ãŒæ§æã§ã¯fr0ïŒã«è¿ããŸãã
-mno-ac0
æµ®åå°æ°ç¹ã®çµæãã¡ã¢ãªã«è¿ããŸãã ãããããã©ã«ãã§ãã
-m40
PDP-11/40ã®ã³ãŒããçæããŸãã
-m45
PDP-11/45ã®ã³ãŒããçæããŸãã ãããããã©ã«ãã§ãã
-m10
PDP-11/10ã®ã³ãŒããçæããŸãã
-mbcopy-ãã«ãã€ã³
ã¡ã¢ãªã®ã³ããŒã«ã¯ãã€ã³ã©ã€ã³ã®ãmovmemhiããã¿ãŒã³ã䜿çšããŸãã ãããããã©ã«ãã§ãã
-mbcopy
ã¡ã¢ãªã®ã³ããŒã«ã€ã³ã©ã€ã³ã®ãmovmemhiããã¿ãŒã³ã䜿çšããªãã§ãã ããã
-ãã³ã16
-mno-int32
16ãããã®ãintãã䜿çšããŸãã ãããããã©ã«ãã§ãã
-ãã³ã32
-mno-int16
32ãããã®ãintãã䜿çšããŸãã
-mfloat64
-mno-float32
64ãããã®ãfloatãã䜿çšããŸãã ãããããã©ã«ãã§ãã
-mfloat32
-mno-float64
32ãããã®ãfloatãã䜿çšããŸãã
-ããã·
ãabshi2ããã¿ãŒã³ã䜿çšããŸãã ãããããã©ã«ãã§ãã
-mno-ã¢ãã·
ãabshi2ããã¿ãŒã³ã¯äœ¿çšããªãã§ãã ããã
-mbranch-é«äŸ¡
ãã©ã³ããé«äŸ¡ãªãµããããŸãã ããã¯ãã³ãŒãçæãå®éšããããã®ãã®ã§ã
ã®ã¿ã
-mbranch-å®ã
ãã©ã³ããé«äŸ¡ã§ãããšåœã£ãŠã¯ãããŸããã ãããããã©ã«ãã§ãã
-munix-asm
Unixã¢ã»ã³ãã©æ§æã䜿çšããŸãã ããã¯ã次ã®ããã«æ§æãããå Žåã®ããã©ã«ãã§ãã pdp11-*-bsd.
-mdec-asm
DECã¢ã»ã³ãã©æ§æã䜿çšããŸãã ããã¯ãPDP-11ã¿ãŒã²ããçšã«æ§æãããå Žåã®ããã©ã«ãã§ãã
以å€ã® pdp11-*-bsd.
ãã³ããã ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯picoChipå®è£ çšã«å®çŸ©ãããŠããŸãïŒ
-å=ae_type
é åã®åœä»€ã»ãããã¬ãžã¹ã¿ã»ãããããã³åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã
èŠçŽ ã¿ã€ã ae_typeã ãµããŒããããŠããå€ ae_type ã ANY, ãã«, ããã¯.
-mae = ANY å®å šã«æ±çšã®AEã¿ã€ããéžæããŸãã ãã®ãªãã·ã§ã³ã§çæãããã³ãŒãã¯å®è¡ãããŸã
ä»ã®AEã¿ã€ãã®ããããã ã³ãŒãã¯ãã³ã³ãã€ã«ãããå Žåã»ã©å¹ççã§ã¯ãããŸãã
ç¹å®ã®AEã¿ã€ãã®å Žåãäžéšã®ã¿ã€ãã®æäœïŒä¹ç®ãªã©ïŒãæ©èœããªã
ãã¹ãŠã®ã¿ã€ãã®AEã§é©åã«ã
-mae = MUL MULAEã¿ã€ããéžæããŸãã ããã¯ãã³ã³ãã€ã«ãããã³ãŒãã«æã圹ç«ã€AEã¿ã€ãã§ãã
ãšãããã©ã«ãã§ãã
-mae = MAC DSPã¹ã¿ã€ã«ã®MACAEãéžæããŸãã ãã®ãªãã·ã§ã³ã§ã³ã³ãã€ã«ãããã³ãŒãã¯ã
DSP AEãæäŸããªãããããã€ãïŒcharïŒæäœã®ããã©ãŒãã³ã¹ãäœäžããŸã
ãã€ãããŒã/ã¹ãã¢ã®ããŒããŠã§ã¢ãµããŒãã
-msymbol-as-ã¢ãã¬ã¹
ã³ã³ãã€ã©ãããŒã/ã¹ãã¢ã®ã¢ãã¬ã¹ãšããŠã·ã³ãã«åãçŽæ¥äœ¿çšã§ããããã«ããŸã
æåã«ã¬ãžã¹ã¿ã«ããŒãããã«ãåœä»€ã éåžžãããã®äœ¿çš
ãªãã·ã§ã³ã¯ããªãã·ã§ã³ã䜿çšãããŠããªãå Žåãããé«éã«å®è¡ãããããã倧ããªããã°ã©ã ãçæããŸãã
ãã ããçµæã¯ããã°ã©ã ããšã«ç°ãªãããããŠãŒã¶ãŒãªãã·ã§ã³ãšããŠæ®ãããŸãã
æ°žç¶çã«æå¹ã«ããã®ã§ã¯ãªãã
-mno-éå¹çç-èŠå
éå¹ççãªã³ãŒãã®çæã«é¢ããèŠåãç¡å¹ã«ããŸãã ãããã®èŠåã¯
ããšãã°ããã€ãã¬ãã«ã®ã¡ã¢ãªæäœãå®è¡ããã³ãŒããã³ã³ãã€ã«ãããšãã«çæãããŸã
MACAEã¿ã€ãã MAC AEã¯ããã€ãã¬ãã«ã®ã¡ã¢ãªãããŒããŠã§ã¢ã§ãµããŒãããŠããŸãã
ãããã£ãŠããã¹ãŠã®ãã€ãããŒã/ã¹ãã¢ã¯ã¯ãŒãããŒã/ã¹ãã¢ããåæããå¿ èŠããããŸã
ãªãã¬ãŒã·ã§ã³ã ããã¯éå¹ççã§ãããèŠåãçæãããŠ
ãã€ãæäœãåé¿ããããããŸãã¯æ¬¡ã®ãããªAEã¿ã€ããã¿ãŒã²ããã«ããããã«ãã³ãŒããæžãçŽãå¿ èŠããããŸãã
å¿ èŠãªããŒããŠã§ã¢ãµããŒãã ãã®ãªãã·ã§ã³ã¯ããããã®èŠåãç¡å¹ã«ããŸãã
PowerPC ãªãã·ã§ã³
ãããã¯ä»¥äžã«ãªã¹ããããŠããŸã
RL78 ãªãã·ã§ã³
-msim
ã·ãã¥ã¬ãŒã¿ãŒå ã®æäœããµããŒãããããã®è¿œå ã®ã¿ãŒã²ããã©ã€ãã©ãªå ã®ãªã³ã¯ã
-mmul = none
-mmul = g13
-mmul = rl78
䜿çšããããŒããŠã§ã¢ä¹ç®ãµããŒãã®ã¿ã€ããæå®ããŸãã ããã©ã«ãã¯
ãœãããŠã§ã¢ä¹ç®é¢æ°ã䜿çšããããªããã ãg13ããªãã·ã§ã³ã¯ã
RL78/G13 ã¿ãŒã²ããã®ã¿ã®ããŒããŠã§ã¢ä¹ç®/é€ç®ããªãã§ã©ã«ã ãrl78ããªãã·ã§ã³
RL78 ãœãããŠã§ã¢ ããã¥ã¢ã«ã§å®çŸ©ãããŠããæšæºã®ããŒããŠã§ã¢ä¹ç®çšã§ãã
IBM RS / 6000 ãš PowerPC ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãIBM RS/6000ããã³PowerPCçšã«å®çŸ©ãããŠããŸãã
-mpowerpc-gpopt
-mno-powerpc-gpopt
-mpowerpc-gfxopt
-mno-powerpc-gfxopt
-mpowerpc64
-mno-powerpc64
-mmfcrf
-mno-mfcrf
-mpopcntb
-mno-popcntb
-mpopcntd
-mno-popcntd
-mfprnd
-mno-fprnd
-mcmpb
-mno-cmpb
-mmfpgpr
-mno-mfpgpr
-mhard-dfp
-mno-ããŒã-dfp
ãããã®ãªãã·ã§ã³ã䜿çšããŠãããã»ããµã§äœ¿çšå¯èœãªåœä»€ãæå®ããŸãã
䜿çšããŠããŸãã ãããã®ãªãã·ã§ã³ã®ããã©ã«ãå€ã¯ãGCCã®æ§ææã«æ±ºå®ãããŸãã
ã®æå® -mcpu =cpu_type ãããã®ãªãã·ã§ã³ã®æå®ãäžæžãããŸãã ç§é
ã䜿çšããããšããå§ãããŸã -mcpu =cpu_type äžèšã®ãªãã·ã§ã³ã§ã¯ãªãããªãã·ã§ã³ã
æå® -mpowerpc-gpopt GCCããªãã·ã§ã³ã®PowerPCã¢ãŒããã¯ãã£ã䜿çšã§ããããã«ããŸã
æµ®åå°æ°ç¹å¹³æ¹æ ¹ãå«ããæ±çšã°ã«ãŒãã®åœä»€ã
æå® -mpowerpc-gfxopt GCCããªãã·ã§ã³ã®PowerPCã¢ãŒããã¯ãã£ã䜿çšã§ããããã«ããŸã
æµ®åå°æ°ç¹éžæãå«ããã°ã©ãã£ãã¯ã¹ã°ã«ãŒãã®åœä»€ã
ãã® -mmfcrf ãªãã·ã§ã³ã䜿çšãããšãGCCã¯æ¡ä»¶ã¬ãžã¹ã¿ãã£ãŒã«ãããã®ç§»åãçæã§ããŸã
POWER4ããã»ããµãŒããã³ããããµããŒãããä»ã®ããã»ããµãŒã«å®è£ ãããåœä»€
PowerPCV2.01ã¢ãŒããã¯ãã£ã The -mpopcntb ãªãã·ã§ã³ã䜿çšãããšãGCCã§ãããã«ãŠã³ããçæã§ããŸã
POWER5ã«å®è£ ãããå粟床FPçžäºæšå®åœä»€
PowerPCV2.02ã¢ãŒããã¯ãã£ããµããŒãããããã»ããµããã³ãã®ä»ã®ããã»ããµã The
-mpopcntd ãªãã·ã§ã³ã䜿çšãããšãGCCã¯ã«å®è£ ãããpopcountåœä»€ãçæã§ããŸãã
POWER7ããã»ããµãŒããã³PowerPCV2.06ã¢ãŒããã¯ãã£ãŒããµããŒããããã®ä»ã®ããã»ããµãŒã
ãã® -mfprnd ãªãã·ã§ã³ã䜿çšãããšãGCCã¯FPãæŽæ°ã«äžžããåœä»€ãçæã§ããŸã
POWER5+ããã»ããµããã³PowerPCããµããŒããããã®ä»ã®ããã»ããµã«å®è£ ãããŠããŸã
V2.03ã¢ãŒããã¯ãã£ã The -mcmpb ãªãã·ã§ã³ã䜿çšãããšãGCCã§æ¯èŒãã€ããçæã§ããŸã
POWER6ããã»ããµãŒããã³ããããµããŒãããä»ã®ããã»ããµãŒã«å®è£ ãããåœä»€
PowerPCV2.05ã¢ãŒããã¯ãã£ã The -mmfpgpr ãªãã·ã§ã³ã«ãããGCCã¯FP移åãçæã§ããŸã
POWER6Xããã»ããµã«å®è£ ãããæ±çšã¬ãžã¹ã¿åœä»€ãšã®é
æ¡åŒµPowerPCV2.05ã¢ãŒããã¯ãã£ããµããŒãããä»ã®ããã»ããµã The -mhard-dfp
ãªãã·ã§ã³ã䜿çšãããšãGCCã¯ã«å®è£ ãããŠããXNUMXé²æµ®åå°æ°ç¹åœä»€ãçæã§ããŸãã
äžéšã®POWERããã»ããµã
ãã® -mpowerpc64 ãªãã·ã§ã³ã䜿çšãããšãGCCã¯è¿œå ã®64ãããåœä»€ãçæã§ããŸãã
å®å šãªPowerPC64ã¢ãŒããã¯ãã£ã«ãããGPRã64ãããã®ããã«ã¯ãŒããšããŠæ±ããŸãã
éã GCCã®ããã©ã«ã㯠-mno-powerpc64.
-mcpu =cpu_type
ã¢ãŒããã¯ãã£ã¿ã€ããã¬ãžã¹ã¿ã®äœ¿çšæ³ãããã³åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸãã
ãã·ã³ã¿ã€ã cpu_typeã ãµããŒããããŠããå€ cpu_type ã 401, 403, 405, 405fp, 440,
440fp, 464, 464fp, 476, 476fp, 505, 601, 602, 603, 603e, 604, 604e, 620, 630, 740,
7400, 7450, 750, 801, 821, 823, 860, 970, 8540, a2, e300c2, e300c3, e500mc, e500mc64,
e5500, e6500, ec603e, G3, G4, G5, ã¿ã€ã¿ã³, power3, power4, power5, power5 +, power6,
ãã¯ãŒ6x, power7, power8, powerpc, ãã¯ãŒPC64, powerpc64le, rs64.
-mcpu = powerpc, -mcpu = powerpc64, -mcpu = powerpc64le çŽç²ãª32ãããPowerPCãæå®ãã
ïŒããããã®ãšã³ãã£ã¢ã³ïŒã64ãããã®ããã°ãšã³ãã£ã¢ã³PowerPCããã³64ãããã®ãªãã«ãšã³ãã£ã¢ã³PowerPC
é©åãªæ±çšããã»ããµã¢ãã«ãæ³å®ããã¢ãŒããã¯ãã£ãã·ã³ã¿ã€ã
ã¹ã±ãžã¥ãŒãªã³ã°ã®ç®çã
ä»ã®ãªãã·ã§ã³ã¯ãç¹å®ã®ããã»ããµãæå®ããŸãã ãããã®ãªãã·ã§ã³ã®äžã§çæãããã³ãŒã
ãã®ããã»ããµã§æé©ã«åäœããä»ã®ããã»ããµã§ã¯ãŸã£ããåäœããªãå ŽåããããŸãã
ãã® -mcpu ãªãã·ã§ã³ã¯ã次ã®ãªãã·ã§ã³ãèªåçã«æå¹ãŸãã¯ç¡å¹ã«ããŸãã
-ãã«ãã£ãã㯠-mfprnd -mhard-float -mmfcrf -è€æ° -mpopcntb -mpopcntd -mpowerpc64
-mpowerpc-gpopt -mpowerpc-gfxopt -msingle-float -mdouble-float -msimple-fpu -mstring
-mmulhw -mdlmzb -mmfpgpr -mvsx -mcrypto -mdirect-移å -mpower8-ãã¥ãŒãžã§ã³
-mpower8-ãã¯ãã« -mquad-ã¡ã¢ãª -mquad-ã¡ã¢ãª-ã¢ãããã¯
ç¹å®ã®CPUã«èšå®ãããç¹å®ã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ã®ããŒãžã§ã³ã«ãã£ãŠç°ãªããŸãã
ã©ã®èšå®ããã®CPUã«æé©ãªã³ãŒããçæãããšæããããã«å¿ããŠã ããã¯ããŸãã
å¿ ç¶çã«å®éã®ããŒããŠã§ã¢ã®æ©èœãåæ ããŸãã èšå®ãããå Žå
ç¹å®ã®å€ã«å¯Ÿããåå¥ã®ãªãã·ã§ã³ã -mcpu ãªãã·ã§ã³ã
ãã㪠-mcpu = 970 -mno-altivec.
AIXã§ã¯ã -ãã«ãã£ãã㯠㚠-mpowerpc64 ãªãã·ã§ã³ã¯ãã«ãã£ãŠæå¹åãŸãã¯ç¡å¹åãããŸãã -mcpu
AIXã¯ãããã®ãªãã·ã§ã³ãå®å šã«ã¯ãµããŒãããŠããªããããçŸåšã®ãšãããªãã·ã§ã³ã§ãã ããŠãããã§ã
ãããããªãã®ã§ããŸããããšç¢ºä¿¡ããŠãããªããããã§ãããããåå¥ã«æå¹ãŸãã¯ç¡å¹ã«ããŸã
ç°å¢ã
-mtune =cpu_type
ãã·ã³ã¿ã€ãã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã cpu_typeããã ãèšå®ããªã
ã¢ãŒããã¯ãã£ã¿ã€ããŸãã¯ã¬ãžã¹ã¿ã®äœ¿çšæ³ã -mcpu =cpu_type ããŸãã ã®åãå€
cpu_type ã«äœ¿çšãããŸã -ã ãã¥ãŒã³ ã¯ã©ãããšèšããš -mcpuã äž¡æ¹ãæå®ãããŠããå Žåãçæãããã³ãŒã
ã«ãã£ãŠèšå®ãããã¢ãŒããã¯ãã£ãšã¬ãžã¹ã¿ã䜿çšããŸã -mcpuããã ããã«ãã£ãŠèšå®ãããã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿
-ã ãã¥ãŒã³.
-mcmodel = small
å°åã¢ãã«çšã®PowerPC64ã³ãŒããçæããŸããç®æ¬¡ã¯64kã«å¶éãããŠããŸãã
-mcmodel = medium
äžèŠæš¡ã¢ãã«ã®PowerPC64ã³ãŒããçæããŸããç®æ¬¡ããã³ãã®ä»ã®éçããŒã¿ãã¢ããããŠããå¯èœæ§ããããŸã
ãµã€ãºã¯åèš4Gã«ãªããŸãã
-mcmodel = large
倧åã¢ãã«çšã®PowerPC64ã³ãŒããçæããŸããTOCã®ãµã€ãºã¯æ倧4Gã§ãã ä»ã®
ããŒã¿ãšã³ãŒãã¯ã64ãããã®ã¢ãã¬ã¹ç©ºéã«ãã£ãŠã®ã¿å¶éãããŸãã
-ãã«ãã£ããã¯
-mno-altivec
AltiVecåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã䜿çšãæå¹ã«ããŸã
AltiVecåœä»€ã»ãããžã®ããçŽæ¥çãªã¢ã¯ã»ã¹ãå¯èœã«ããçµã¿èŸŒã¿é¢æ°ã®ã
èšå®ããå¿ èŠãããå ŽåããããŸã -mabi = altivec AltiVecABIã§çŸåšã®ABIã調æŽãã
æ©èœåŒ·åã
æ¥æ -ãã«ãã£ãã㯠ã§ã¯ãªããã䜿çšãããŸã -maltivec = le or -maltivec = beãèŠçŽ ã®é åº
ãvec_splatãããvec_extractãããvec_insertããªã©ã® Altivec çµã¿èŸŒã¿é¢æ°ã¯äžèŽããŸã
ã¿ãŒã²ããã®ãšã³ãã£ã¢ã³ã«å¯Ÿå¿ããé åèŠçŽ ã®é åºã ã€ãŸããèŠçŽ
ãŒãã¯ãããã°ãšã³ãã£ã¢ã³ãã¿ãŒã²ããã«ãããšãã«ãã¯ãã«ã¬ãžã¹ã¿ã®å·Šç«¯ã®èŠçŽ ãèå¥ããŸã
ãã©ãããã©ãŒã ãããã³ã¿ãŒã²ãããèšå®ãããšãã«ãã¯ãã«ã¬ãžã¹ã¿ã®å³ç«¯ã®èŠçŽ ãèå¥ããŸã
ãªãã«ãšã³ãã£ã¢ã³ãã©ãããã©ãŒã ã
-maltivec = be
ãã©ããã«é¢ä¿ãªããããã°ãšã³ãã£ã¢ã³èŠçŽ ã®é åºã䜿çšããŠAltivecåœä»€ãçæããŸã
ã¿ãŒã²ããã¯ããã°ãšã³ãã£ã¢ã³ãŸãã¯ãªãã«ãšã³ãã£ã¢ã³ã§ãã ããã¯ãããã°ãšã³ãã£ã¢ã³ãã¿ãŒã²ããã«ããå Žåã®ããã©ã«ãã§ã
ãã©ãããã©ãŒã ãæäŸããŸãã
èŠçŽ ã®é åºã¯ã次ã®ãããªAltivecçµã¿èŸŒã¿é¢æ°ã®èŠçŽ çªå·ã解éããããã«äœ¿çšãããŸãã
ãvec_splatãããvec_extractããããã³ãvec_insertãã ããã©ã«ãã§ã¯ããããã¯é åã«äžèŽããŸã
ã¿ãŒã²ããã®ãšã³ãã£ã¢ã³ã«å¯Ÿå¿ããèŠçŽ ã®é åºã
-maltivec = le
ãã©ããã«é¢ä¿ãªãããªãã«ãšã³ãã£ã¢ã³èŠçŽ ã®é åºã䜿çšããŠAltivecåœä»€ãçæããŸã
ã¿ãŒã²ããã¯ããã°ãšã³ãã£ã¢ã³ãŸãã¯ãªãã«ãšã³ãã£ã¢ã³ã§ãã ããã¯ãå°ãã¿ãŒã²ãããèšå®ããå Žåã®ããã©ã«ãã§ã-
ãšã³ãã£ã¢ã³ãã©ãããã©ãŒã ã ããã°ãšã³ãã£ã¢ã³ãã¿ãŒã²ããã«ããå Žåããã®ãªãã·ã§ã³ã¯çŸåšç¡èŠãããŸã
ãã©ãããã©ãŒã ãæäŸããŸãã
èŠçŽ ã®é åºã¯ã次ã®ãããªAltivecçµã¿èŸŒã¿é¢æ°ã®èŠçŽ çªå·ã解éããããã«äœ¿çšãããŸãã
ãvec_splatãããvec_extractããããã³ãvec_insertãã ããã©ã«ãã§ã¯ããããã¯é åã«äžèŽããŸã
ã¿ãŒã²ããã®ãšã³ãã£ã¢ã³ã«å¯Ÿå¿ããèŠçŽ ã®é åºã
-mvrsave
-mno-vrsave
AltiVecã³ãŒããçæãããšãã«VRSAVEåœä»€ãçæããŸãã
-mgen-cell-ãã€ã¯ãã³ãŒã
ã»ã«ãã€ã¯ãã³ãŒãåœä»€ãçæããŸãã
-mwarn-cell-ãã€ã¯ãã³ãŒã
Cellãã€ã¯ãã³ãŒãåœä»€ãçºè¡ããããšãã«èŠåããŸãã Cellãã€ã¯ãã³ãŒãã®äŸ
åœä»€ã¯å¯å€ã·ããã§ãã
-msecure-plt
ãå¯èœã«ããã³ãŒããçæãã ld ãš ld.so å®è¡å¯èœãã¡ã€ã«ãšå ±æã©ã€ãã©ãªãæ§ç¯ããã«ã¯
å®è¡äžå¯èœãªã.pltãã»ã¯ã·ã§ã³ãšã.gotãã»ã¯ã·ã§ã³ã ããã¯ãPowerPC32ãããSYSVABIãªãã·ã§ã³ã§ãã
-mbss-plt
BSSã.pltãã»ã¯ã·ã§ã³ã䜿çšããã³ãŒããçæããŸãã ld.so èšå ¥ããããpltããå¿ èŠã§ã
æžã蟌ã¿å¯èœã§å®è¡å¯èœãªã.gotãã»ã¯ã·ã§ã³ã ããã¯PowerPC32ãããã§ã
SYSVABIãªãã·ã§ã³ã
-ãã»ã«
-mno-isel
ãã®ã¹ã€ããã¯ãISELåœä»€ã®çæãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
-ãã»ã«=ã¯ãã»ããã
ãã®ã¹ã€ããã¯éæšå¥šã«ãªããŸããã 䜿çšãã -ãã»ã« ãš -mno-isel ã代ããã«ã䜿ããã ããã
-mspe
-mno-spe
ãã®ã¹ã€ããã¯ãSPEsimdåœä»€ã®çæãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
-é害è
-mno-ãã¢ãªã³ã°
ãã®ã¹ã€ããã¯ãPAIREDsimdåœä»€ã®çæãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
-mspe =ã¯ãã»ããã
ãã®ãªãã·ã§ã³ã¯éæšå¥šã«ãªããŸããã 䜿çšãã -mspe ãš -mno-spe ã代ããã«ã䜿ããã ããã
-mvsx
-mno-vsx
ãã¯ãã«/ã¹ã«ã©ãŒïŒVSXïŒåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããããã«
VSXãžã®ããçŽæ¥çãªã¢ã¯ã»ã¹ãå¯èœã«ããçµã¿èŸŒã¿é¢æ°ã®äœ¿çšãæå¹ã«ãã
æå³æžã
-mcrypto
-mno-crypto
ã«çŽæ¥ã¢ã¯ã»ã¹ã§ããçµã¿èŸŒã¿é¢æ°ã®äœ¿çšãæå¹ïŒç¡å¹ïŒã«ããŸãã
PowerPCISAã®ããŒãžã§ã³2.07ã§è¿œå ãããæå·ååœä»€ã
-mdirect-移å
-mno-direct-move
åœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŠã
ã«è¿œå ãããæ±çšã¬ãžã¹ã¿ãšãã¯ãã«/ã¹ã«ã©ãŒïŒVSXïŒã¬ãžã¹ã¿
PowerPCISAã®ããŒãžã§ã³2.07ã
-mpower8-ãã¥ãŒãžã§ã³
-mno-power8-fusion
ããã€ãã®æŽæ°æŒç®ãé£æ¥ãããŠããïŒä¿æããªãïŒã³ãŒããçæããŠã
åœä»€ã¯ãpower8以éã®ããã»ããµãŒã§èåã§ããŸãã
-mpower8-ãã¯ãã«
-mno-power8-vector
以åã®ãã¯ãã«ããã³ã¹ã«ã©ãŒåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸã
PowerPCISAã®ããŒãžã§ã³2.07ã§è¿œå ãããŸããã çµã¿èŸŒã¿é¢æ°ã®äœ¿çšãæå¹ã«ããŸã
ãã¯ãã«åœä»€ãžã®ããçŽæ¥çãªã¢ã¯ã»ã¹ãå¯èœã«ããŸãã
-mquad-ã¡ã¢ãª
-mno-ã¯ã¢ããã¡ã¢ãª
éã¢ãããã¯ã¯ã¯ããã¯ãŒãã¡ã¢ãªåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸãã
ãã® -mquad-ã¡ã¢ãª ãªãã·ã§ã³ã§ã¯ã64ãããã¢ãŒãã䜿çšããå¿ èŠããããŸãã
-mquad-ã¡ã¢ãª-ã¢ãããã¯
-mno-quad-memory-atomic
ã¢ãããã¯ã¯ã¯ããã¯ãŒãã¡ã¢ãªåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸãã The
-mquad-ã¡ã¢ãª-ã¢ããã㯠ãªãã·ã§ã³ã§ã¯ã64ãããã¢ãŒãã䜿çšããå¿ èŠããããŸãã
-mfloat-gprs =ã¯ã/ã·ã³ã°ã«/ããã«/ããã
-mfloat-gprs
ãã®ã¹ã€ããã¯ãã§ã®æµ®åå°æ°ç¹æŒç®ã®çæãæå¹ãŸãã¯ç¡å¹ã«ããŸãã
ããããµããŒãããã¢ãŒããã¯ãã£çšã®æ±çšã¬ãžã¹ã¿ã
è°è« ã¯ã or å粟床浮åå°æ°ç¹ã®äœ¿çšãå¯èœã«ããŸã
æäœã
è°è« å粟床ããã³å粟床浮åå°æ°ç¹ã®äœ¿çšãå¯èœã«ããŸã
æäœã
è°è« ããã æ±çšã¬ãžã¹ã¿ã®æµ®åå°æ°ç¹æŒç®ãç¡å¹ã«ããŸãã
ãã®ãªãã·ã§ã³ã¯çŸåšãMPC854xã§ã®ã¿äœ¿çšã§ããŸãã
-m32
-m64
Darwinããã³SVR32ã¿ãŒã²ããã®64ããããŸãã¯4ãããç°å¢çšã®ã³ãŒããçæããŸãïŒ
GNU / LinuxïŒã 32ãããç°å¢ã§ã¯ãintãlongãããã³ãã€ã³ã¿ã32ãããã«èšå®ãããŸãã
PowerPCããªã¢ã³ãã§å®è¡ãããã³ãŒããçæããŸãã 64ãããç°å¢ã¯intãã«èšå®ããŸã
32ãããããã³longãš64ããããžã®ãã€ã³ã¿ãããã³PowerPC64ã®ã³ãŒããçæããŸãã
-mpowerpc64.
-mfull-toc
-mno-fp-in-toc
-mno-sum-in-toc
-æå°-toc
ããšã«äœæãããç®æ¬¡ïŒç®æ¬¡ïŒã®çæãå€æŽããŸã
å®è¡å¯èœãã¡ã€ã«ã The -mfull-toc ãªãã·ã§ã³ã¯ããã©ã«ãã§éžæãããŠããŸãã ãã®å ŽåãGCC
ã®äžæã®éèªåå€æ°åç §ããšã«å°ãªããšãXNUMXã€ã®TOCãšã³ããªãå²ãåœãŠãŸã
ããªãã®ããã°ã©ã ã GCCã¯ãTOCã«æµ®åå°æ°ç¹å®æ°ãé 眮ããŸãã ãã ãã
TOCã«ã¯16,384ã®ãšã³ããªããããŸãã
å©çšå¯èœãªãã®ããªãŒããŒãããŒããããšã瀺ããªã³ã«ãŒãšã©ãŒã¡ãã»ãŒãžãåãåã£ãå Žå
TOCã¹ããŒã¹ãã§äœ¿çšãããTOCã¹ããŒã¹ã®éãæžããããšãã§ããŸã -mno-fp-in-toc ãš
-mno-sum-in-toc ãªãã·ã§ã³ã -mno-fp-in-toc GCCãæµ®åå°æ°ç¹ã眮ãã®ãé²ããŸã
TOCããã³ -mno-sum-in-toc GCCã«ã³ãŒããçæãããŠèšç®ããŸã
TOCã«åèšãå ¥ãã代ããã«ãå®è¡æã«ã¢ãã¬ã¹ãšå®æ°ã®åèšã
ãããã®ãªãã·ã§ã³ã®äžæ¹ãŸãã¯äž¡æ¹ãæå®ã§ããŸãã ãããããGCCã«éåžžã«
TOCã¹ããŒã¹ãç¯çŽããããšãç ç²ã«ããŠãå°ãé ããŠå€§ããªã³ãŒãã
ãããã®ãªãã·ã§ã³ã®äž¡æ¹ãæå®ããŠããç®æ¬¡ã®ã¹ããŒã¹ãäžè¶³ããŠããå Žåã¯ã
æå®ãã -æå°-toc 代ããã¯ã ãã®ãªãã·ã§ã³ã«ãããGCCã¯æ¬¡ã®TOCãšã³ããªãXNUMXã€ã ãäœæããŸãã
ãã¹ãŠã®ãã¡ã€ã«ã ãã®ãªãã·ã§ã³ãæå®ãããšãGCCã¯ããé ããŠãã倧ããªã³ãŒããçæããŸã
ããããããã¯éåžžã«å°ãªãç®æ¬¡ã¹ããŒã¹ã䜿çšããŸãã ãã®ãªãã·ã§ã³ã¯ã
å®è¡é »åºŠã®äœãã³ãŒããå«ããã¡ã€ã«ã
-maix64
-maix32
64ãããAIXABIãšåŒã³åºãèŠçŽãæå¹ã«ããŸãïŒ64ããããã€ã³ã¿ãŒã64ãããããã³ã°ãã¿ã€ããããã³
ãããããµããŒãããããã«å¿ èŠãªã€ã³ãã©ã¹ãã©ã¯ãã£ã æå®ãã -maix64 å«æãã -mpowerpc64,
while -maix32 64ãããABIãç¡å¹ã«ãã -mno-powerpc64ã GCCã®ããã©ã«ãã¯
-maix32.
-mxl-compat
-mno-xl-compat
AIXã䜿çšããå ŽåãIBMXLã³ã³ãã€ã©ãŒã®ã»ãã³ãã£ã¯ã¹ã«ããå³å¯ã«æºæ ããã³ãŒããçæããŸã-
äºææ§ã®ããABIã æµ®åå°æ°ç¹åŒæ°ããããã¿ã€ãåãããé¢æ°ã«æž¡ããŸãã
åŒæ°FPRã«å ããŠãã¹ã¿ãã¯ã«ä¿åé åïŒRSAïŒãç»é²ããŸãã æ³å®ããªãã§ãã ãã
128ãããé·ã®doubleå€ã®äžã§æãéèŠãªdoubleã¯ã次ã®å Žåã«é©åã«äžžããããŸãã
å€ãæ¯èŒããdoubleã«å€æããŸãã ãã³ã°ããã«ã«ã¯XLã·ã³ãã«åã䜿çš
ãµããŒãã«ãŒãã³ã
AIXã®åŒã³åºãèŠçŽã¯æ¡åŒµãããŸããããæåã¯ææžåãããŠããŸããã§ããã
åŒæ°ã®ã¢ãã¬ã¹ããšãé¢æ°ãåŒã³åºãKïŒRCã®ãããŸããªã±ãŒã¹
宣èšããããããå°ãªãåŒæ°ã IBM XLã³ã³ãã€ã©ãŒã¯ãæµ®åå°æ°ç¹åŒæ°ã«ã¢ã¯ã»ã¹ããŸãã
ãµãã«ãŒãã³ããªãã§ã³ã³ãã€ã«ãããå Žåãã¹ã¿ãã¯ããRSAã«é©åããŸãã
æé©åã åžžã«æµ®åå°æ°ç¹åŒæ°ãã¹ã¿ãã¯ã«æ ŒçŽããã®ã¯
éå¹ççã§ã»ãšãã©å¿ èŠãªãããããã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠãããã
æé©åããã«IBMXLã³ã³ãã€ã©ãŒã«ãã£ãŠã³ã³ãã€ã«ããããµãã«ãŒãã³ãåŒã³åºããšãã«å¿ èŠã§ãã
-mpe
ãµããŒã IBM RS / 6000 SP 䞊åã·ãã¥ã¬ãŒã·ã§ã³ã®èšå® ç°å¢ ïŒPEïŒã 䜿çšããããã«äœæãããã¢ããªã±ãŒã·ã§ã³ããªã³ã¯ãã
ã¢ããªã±ãŒã·ã§ã³ãå®è¡ã§ããããã«ããããã®ç¹å¥ãªã¹ã¿ãŒãã¢ããã³ãŒãã䌎ãã¡ãã»ãŒãžããã·ã³ã°ã The
ã·ã¹ãã ã®æšæºçãªå Žæã«PEãã€ã³ã¹ããŒã«ãããŠããå¿ èŠããããŸãïŒ/usr/lpp/ppe.poe/ïŒã ãŸãã¯
ã¹ãã㯠ãã¡ã€ã«ã¯ã§ãªãŒããŒã©ã€ãããå¿ èŠããããŸã -specs = é©åãªãæå®ãããªãã·ã§ã³
ãã£ã¬ã¯ããªã®å Žæã 䞊åç°å¢ã¯ã¹ã¬ããããµããŒãããŠããªãããã -mpe
ãªãã·ã§ã³ãš -pthread ãªãã·ã§ã³ã«äºææ§ããããŸããã
-æªæ§-èªç¶
-æªæ§ãã¯ãŒ
AIXã32ãããDarwinãããã³64ãããPowerPC GNU / Linuxã§ã¯ããªãã·ã§ã³ -æªæ§-èªç¶
æµ®åå°æ°ç¹doubleãªã©ã®ãã倧ããªåã®ABIå®çŸ©ã®é 眮ããªãŒããŒã©ã€ãããŸãã
ãããã®èªç¶ãªãµã€ãºããŒã¹ã®å¢çäžã ãªãã·ã§ã³ -æªæ§ãã¯ãŒ GCCã«æ¬¡ã®ããã«æ瀺ããŸã
ABIæå®ã®ã¢ã©ã€ã¡ã³ãã«ãŒã«ã«åŸããŸãã GCCã®ããã©ã«ãã¯æšæºã®é 眮ã§ã
ABIã§å®çŸ©ãããŠããŸãã
64ãããããŒãŠã£ã³ã§ã¯ãèªç¶ãªé 眮ãããã©ã«ãã§ããã -æªæ§ãã¯ãŒ ã§ã¯ãããŸãã
ã
-msoft-float
-mhard-float
æµ®åå°æ°ç¹ã¬ãžã¹ã¿ã»ããã䜿çšããªãïŒäœ¿çšããïŒã³ãŒããçæããŸãã ãœãããŠã§ã¢
æµ®åå°æ°ç¹ãšãã¥ã¬ãŒã·ã§ã³ã䜿çšãããšã -msoft-float ãªãã·ã§ã³ãããã³ãæž¡ã
ãªã³ã¯æã®GCCãžã®ãªãã·ã§ã³ã
-msingle-float
-mdouble-float
å粟床ãŸãã¯å粟床浮åå°æ°ç¹æŒç®ã®ã³ãŒããçæããŸãã
-mdouble-float å«æãã -msingle-float.
-msimple-fpu
ããŒããŠã§ã¢æµ®åå°æ°ç¹ãŠãããã®ãsqrtãããã³ãdivãåœä»€ãçæããªãã§ãã ããã
-mfpu =å
æµ®åå°æ°ç¹ãŠãããã®ã¿ã€ããæå®ããŸãã ã®æå¹ãªå€ å ã sp_lite ïŒã«çžåœããŸã
-msingle-float -msimple-fpu), dp_lite ïŒã«çžåœããŸã -mdouble-float -msimple-fpu),
sp_full ïŒã«çžåœããŸã -msingle-floatïŒãåã³ dp_full ïŒã«çžåœããŸã -mdouble-float).
-mxilinx-fpu
ã¶ã€ãªã³ã¯ã¹PPC405/440ã§æµ®åå°æ°ç¹ãŠãããã®æé©åãå®è¡ããŸãã
-è€æ°
-mno-è€æ°
è€æ°ã¯ãŒãã®ããŒãåœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã
è€æ°ã®åèªã®æ瀺ãä¿åããŸãã ãããã®åœä»€ã¯ããã©ã«ãã§çæãããŸã
POWERã·ã¹ãã ã§ãããPowerPCã·ã¹ãã ã§ã¯çæãããŸããã 䜿çšçŠæ¢ -è€æ° å°ã-
ãšã³ãã£ã¢ã³PowerPCã·ã¹ãã ããããã®åœä»€ã¯ããã»ããµãå ¥ã£ãŠãããšãã¯æ©èœããªããã
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã äŸå€ã¯ãããããèš±å¯ããPPC740ãšPPC750ã§ãã
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã®åœä»€ã
-mstring
-mno-string
æååã®ããŒãåœä»€ãšã¹ãã¢ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸã
è€æ°ã®ã¬ãžã¹ã¿ãä¿åããå°ããªãããã¯ç§»åãè¡ãããã®æååã¯ãŒãåœä»€ã ãããã¯
åœä»€ã¯ããã©ã«ãã§POWERã·ã¹ãã ã§çæãããPowerPCã§ã¯çæãããŸãã
ã·ã¹ãã ã 䜿çšçŠæ¢ -mstring ãªãã«ãšã³ãã£ã¢ã³ã®PowerPCã·ã¹ãã ã§ã¯ã
ããã»ããµããªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã®å Žåãåœä»€ã¯æ©èœããŸããã äŸå€
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã§ãããã®åœä»€ãèš±å¯ããPPC740ããã³PPC750ã§ãã
-mupdate
-mno-ã¢ããããŒã
ãæŽæ°ããããŒããŸãã¯ã¹ãã¢åœä»€ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸã
èšç®ãããã¡ã¢ãªäœçœ®ã®ã¢ãã¬ã¹ãžã®ããŒã¹ã¬ãžã¹ã¿ã ãããã®æ瀺
ããã©ã«ãã§çæãããŸãã 䜿çšããå Žå -mno-ã¢ããããŒããéã«å°ããªãŠã£ã³ããŠããããŸã
ã¹ã¿ãã¯ãã€ã³ã¿ãæŽæ°ãããåã®ãã¬ãŒã ã®ã¢ãã¬ã¹ã
ä¿åãããŸããããã¯ãå²ã蟌ã¿ãŸãã¯ã·ã°ãã«éã§ã¹ã¿ãã¯ãã¬ãŒã ããŠã©ãŒã¯ããã³ãŒãã
ç ŽæããããŒã¿ãååŸããŸãã
-mavoid-indexed-addresses
-mno-avoid-indexed-addresses
ã€ã³ããã¯ã¹ä»ãã®ããŒããŸãã¯ã¹ãã¢ã®äœ¿çšãåé¿ããããšããïŒåé¿ããªãïŒã³ãŒããçæãã
æ瀺ã ãããã®åœä»€ã¯ãPower6ããã»ããµãŒã§ããã©ãŒãã³ã¹ã®äœäžãæãå¯èœæ§ããããŸã
16Mãè¶ ãã倧ããªã¢ã¬ã€ãã¹ãããã¹ã«ãŒããå Žåãªã©ãç¹å®ã®ç¶æ³ã§
å¢çã ãã®ãªãã·ã§ã³ã¯ãPower6ã察象ãšããå Žåãããã©ã«ãã§æå¹ã«ãªã£ãŠãããç¡å¹ã«ãªã£ãŠããŸã
ãããªããšã
-æ··ä¹±-çã£ã
-mno-fusion-madd
æµ®åå°æ°ç¹ã®ç©åã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã
æ瀺ã ãããã®åœä»€ã¯ãããŒããŠã§ã¢æµ®åå°æ°ç¹ã®å Žåãããã©ã«ãã§çæãããŸã
䜿çšãããŠããã ãã·ã³ã«äŸå -æ··ä¹±-çã£ã ãªãã·ã§ã³ããã·ã³ã«ããããããããã«ãªããŸãã-
ç¬ç«ããŸãã -ffp-contract = fast ãªãã·ã§ã³ãããã³ -mno-fusion-madd ã«ãããã³ã°ãããŠããŸã
-ffp-contract = off.
-mmulhw
-mno-mulhw
ããŒãã¯ãŒãmultiplyããã³multiply-accumulateã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæããŸã
IBM 405ã440ã464ãããã³476ããã»ããµãŒã«é¢ããæ瀺ã ãããã®æ瀺ã¯
ãããã®ããã»ããµã察象ãšããå Žåãããã©ã«ãã§çæãããŸãã
-mdlmzb
-mno-dlmzb
æååæ€çŽ¢ã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã dlmzb IBMã«é¢ããæ瀺
405ã440ã464ãããã³476ããã»ããµã ãã®åœä»€ã¯ãããã©ã«ãã§æ¬¡ã®å Žåã«çæãããŸãã
ãããã®ããã»ããµã察象ãšããŠããŸãã
-mno-bit-align
-mbit-align
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãæ§é äœãšçµåã匷å¶ããŸããïŒããŸããïŒ
ããããã£ãŒã«ãã®åºæ¬ã¿ã€ãã«ã¢ã©ã€ã³ãããããããã£ãŒã«ããå«ãŸããŠããŸãã
ããšãã°ãããã©ã«ãã§ã¯ã8ã€ã®ã笊å·ãªããããããã£ãŒã«ãã®ã¿ãå«ãæ§é äœã§ãã
é·ã1ã¯4ãã€ãã®å¢çã«æãããããµã€ãºã¯4ãã€ãã§ãã ã䜿çšããŠ
-mno-bit-alignãæ§é äœã¯1ãã€ãã®å¢çã«æãããããµã€ãºã¯1ãã€ãã§ãã
-mno-strict-align
-mstrict-align
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãã¢ã©ã€ã¡ã³ããããŠããªãã¡ã¢ãªãæ³å®ããŠããŸããïŒããŸããïŒ
åç §ã¯ã·ã¹ãã ã«ãã£ãŠåŠçãããŸãã
-måé 眮å¯èœ
-mno-åé 眮å¯èœ
éçå®è¡å¯èœãã¡ã€ã«ãã«åé 眮ã§ããããã«ããïŒèš±å¯ããªãïŒã³ãŒããçæããŸã
å®è¡æã«ç°ãªãã¢ãã¬ã¹ã ã·ã³ãã«ãªçµã¿èŸŒã¿PowerPCã·ã¹ãã ããŒããŒã¯
ã.got2ãã®å å®¹å šäœãšã.fixupãã«ãªã¹ããããŠãã4ãã€ãã®å Žæãåé 眮ããŸã
ã»ã¯ã·ã§ã³ããã®ãªãã·ã§ã³ã«ãã£ãŠçæããã32ãããã¢ãã¬ã¹ã®ããŒãã«ã ãããæ©èœããããã«ã¯ããã¹ãŠ
äžç·ã«ãªã³ã¯ããããªããžã§ã¯ãã¯ãã§ã³ã³ãã€ã«ããå¿ èŠããããŸã -måé 眮å¯èœ or -mrelocatable-lib.
-måé 眮å¯èœ ã³ãŒãã¯ã¹ã¿ãã¯ã8ãã€ãå¢çã«æããŸãã
-mrelocatable-lib
-mno-åé 眮å¯èœã©ã€ãã©ãª
ããã -måé 眮å¯èœ, -mrelocatable-lib éçãèš±å¯ããããã«ã.fixupãã»ã¯ã·ã§ã³ãçæããŸã
å®è¡å¯èœãã¡ã€ã«ã¯å®è¡æã«åé 眮ãããŸããã -mrelocatable-lib ã¯äœ¿çšããŸãã
ã®å°ããã¹ã¿ãã¯ã¢ã©ã€ã¡ã³ã -måé 眮å¯èœã ã§ã³ã³ãã€ã«ããããªããžã§ã¯ã -mrelocatable-lib ãããããŸãã
ãšã®ä»»æã®çµã¿åããã§ã³ã³ãã€ã«ããããªããžã§ã¯ããšãªã³ã¯ãã -måé 眮å¯èœ ãªãã·ã§ã³ã
-mno-toc
-mtoc
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãã¬ãžã¹ã¿2ã«æ¬¡ã®ãã®ãå«ãŸããŠãããšã¯æ³å®ããŠããŸããïŒããŸããïŒã
ããã°ã©ã ã§äœ¿çšãããã¢ãã¬ã¹ãæãã°ããŒãã«é åãžã®ãã€ã³ã¿ã
-å°ã
-mlittle-ãšã³ãã£ã¢ã³
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãããã»ããµã®ã³ãŒããã»ãšãã©ã³ã³ãã€ã«ããŸããã
ãšã³ãã£ã¢ã³ã¢ãŒãã The -mlittle-ãšã³ãã£ã¢ã³ ãªãã·ã§ã³ã¯ãšåãã§ã -å°ã.
-mbig
-mbig-ãšã³ãã£ã¢ã³
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãããã»ããµã®ã³ãŒãã倧èŠæš¡ã«ã³ã³ãã€ã«ããŸãã
ãšã³ãã£ã¢ã³ã¢ãŒãã The -mbig-ãšã³ãã£ã¢ã³ ãªãã·ã§ã³ã¯ãšåãã§ã -mbig.
-mdynamic-no-pic
Darwinããã³MacOSXã·ã¹ãã ã§ã¯ãåé 眮ã§ããªãããã«ã³ãŒããã³ã³ãã€ã«ããŸããã
ãã®å€éšåç §ã¯åé 眮å¯èœã§ãã çµæã®ã³ãŒãã¯
ã¢ããªã±ãŒã·ã§ã³ã§ãããå ±æã©ã€ãã©ãªã§ã¯ãããŸããã
-msingle-pic-base
PICã¢ãã¬ã¹æå®ã«äœ¿çšãããã¬ãžã¹ã¿ããããŒãããã®ã§ã¯ãªããèªã¿åãå°çšãšããŠæ±ããŸãã
åé¢æ°ã®ããããŒã°ã ã©ã³ã¿ã€ã ã·ã¹ãã ã¯ãããåæåãã責任ããããŸã
å®è¡ãéå§ããåã«ãé©åãªå€ã§ç»é²ããŠãã ããã
-mprioritize-restricted-insns =åªå é äœ
ãã®ãªãã·ã§ã³ã¯ããã£ã¹ãããã¹ãããå¶éã«å²ãåœãŠãããåªå 床ãå¶åŸ¡ããŸã
XNUMXçªç®ã®ã¹ã±ãžã¥ãŒãªã³ã°ãã¹äžã®åœä»€ã è°è« åªå é äœ å€ãåã
0, 1ãŸã㯠2 ããããæé«ããŸãã¯XNUMXçªç®ã«é«ãïŒããããïŒåªå é äœã
ãã£ã¹ãããã¹ãããå¶éä»ãåœä»€ã
-msched-costly-dep =äŸåé¢ä¿ã¿ã€ã
ãã®ãªãã·ã§ã³ã¯ãã¿ãŒã²ãããã©ã®äŸåé¢ä¿ã«ã³ã¹ããããããšèŠãªãããå¶åŸ¡ããŸãã
åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ã è°è« äŸåé¢ä¿ã¿ã€ã 次ã®ãããããåããŸã
å€ïŒ
ããã äŸåã¯ã³ã¹ããããããŸããã
ã ãã¹ãŠã®äŸåé¢ä¿ã«ã¯ã³ã¹ããããããŸãã
true_store_to_load
ã¹ãã¢ããããŒããžã®çã®äŸåã¯ã³ã¹ããããããŸãã
ããŒãããã¹ãã¢
ã¹ãã¢ããããŒããžã®äŸåã¯ã³ã¹ããããããŸãã
æ°
ã¬ã€ãã³ã·ã以äžã§ããäŸåé¢ä¿ æ° è²»çšãããããŸãã
-minsert-sched-nops =ã¹ããŒã
ãã®ãªãã·ã§ã³ã¯ãXNUMXçªç®ã®ã¹ã±ãžã¥ãŒãªã³ã°äžã«äœ¿çšãããNOPæ¿å ¥ã¹ããŒã ãå¶åŸ¡ããŸã
åæ Œã è°è« ã¹ããŒã 次ã®ããããã®å€ãåããŸãã
ããã NOPãæ¿å ¥ããªãã§ãã ããã
ããã ã«ãããšã空ã®çºè¡ã¹ãããããããã£ã¹ãããã°ã«ãŒããNOPã§åããŸãã
ã¹ã±ãžã¥ãŒã©ãŒã®ã°ã«ãŒãåã
åã°ã«ãŒãå_exact
NOPãæ¿å ¥ããŠãã³ã¹ãã®ãããäŸååinsnãåå¥ã®ã°ã«ãŒãã«åŒ·å¶ããŸãã æ£ç¢ºã«æ¿å ¥
æšå®ã«ãããšãæ°ããã°ã«ãŒãã«insnã匷å¶ããããã«å¿ èŠãªæ°ã®NOP
ããã»ããµã®ã°ã«ãŒãåã
æ°
NOPãæ¿å ¥ããŠãã³ã¹ãã®ãããäŸååinsnãåå¥ã®ã°ã«ãŒãã«åŒ·å¶ããŸãã å ¥ãã æ°
æ°ããã°ã«ãŒãã«insnã匷å¶ããNOPã
-mcall-sysv
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãåŒã³åºãèŠçŽã䜿çšããŠã³ãŒããã³ã³ãã€ã«ããŸãã
System Vã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ãPowerPCã®1995幎XNUMXæã®ãã©ããã«æºæ ãã
ããã»ããµãµããªã¡ã³ãã ã䜿çšããŠGCCãæ§æããªãéãããããããã©ã«ãã§ãã
powerpc-*-eabiaix.
-mcall-sysv-eabi
-mcall-eabi
äž¡æ¹ãæå®ããŠãã ãã -mcall-sysv ãš -ããã³ ãªãã·ã§ã³ã
-mcall-sysv-noeabi
äž¡æ¹ãæå®ããŠãã ãã -mcall-sysv ãš -mno-eabi ãªãã·ã§ã³ã
-mcall-aixdesc
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãAIXãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ã³ãŒããã³ã³ãã€ã«ããŸãã
-mcall-linux
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãLinuxããŒã¹ã®GNUçšã®ã³ãŒããã³ã³ãã€ã«ããŸã
ã·ã¹ãã ã
-mcall-freebsd
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãFreeBSDãªãã¬ãŒãã£ã³ã°çšã®ã³ãŒããã³ã³ãã€ã«ããŸã
ã·ã¹ãã ã
-mcall-netbsd
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãNetBSDãªãã¬ãŒãã£ã³ã°çšã®ã³ãŒããã³ã³ãã€ã«ããŸã
ã·ã¹ãã ã
-mcall-openbsd
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãOpenBSDãªãã¬ãŒãã£ã³ã°çšã®ã³ãŒããã³ã³ãã€ã«ããŸã
ã·ã¹ãã ã
-maix-struct-return
ã¡ã¢ãªå ã®ãã¹ãŠã®æ§é äœãè¿ããŸãïŒAIX ABIã§æå®ãããŠãããšããïŒã
-msvr4-struct-return
ã¬ãžã¹ã¿ãŒã§8ãã€ãæªæºã®æ§é äœãè¿ããŸãïŒSVR4 ABIã§æå®ïŒã
-mabi =ã¢ãã¿ã€ã
çŸåšã®ABIãç¹å®ã®æ¡åŒµæ©èœã§æ¡åŒµãããããã®ãããªæ¡åŒµæ©èœãåé€ããŸãã æå¹
å€ã¯ ã¢ã«ãã£ããã¯, ããŒã¢ã«ãã£ããã¯, SPE, ããŒã¹ããŒã, ibmãã³ã°ããã«, ieeeãã³ã°ããã«, ãšã«ãv1,
ãšã«ãv2.
-mabi = spe
SPEABIæ¡åŒµæ©èœã䜿çšããŠçŸåšã®ABIãæ¡åŒµããŸãã ããã¯ããã©ã«ãã®ABIãå€æŽããŸããã
代ããã«ãSPEABIæ¡åŒµæ©èœãçŸåšã®ABIã«è¿œå ããŸãã
-mabi = no-spe
çŸåšã®ABIã®Book-ESPEABIæ¡åŒµæ©èœãç¡å¹ã«ããŸãã
-mabi = ibmlongdouble
çŸåšã®ABIãå€æŽããŠãIBMæ¡åŒµç²ŸåºŠlongdoubleã䜿çšããŸãã ããã¯PowerPCã§ã
32ãããSYSVABIãªãã·ã§ã³ã
-mabi = ieeelongdouble
çŸåšã®ABIãå€æŽããŠãIEEEæ¡åŒµç²ŸåºŠlongdoubleã䜿çšããŸãã ããã¯PowerPCã§ã
32ãããLinuxABIãªãã·ã§ã³ã
-mabi = elfv1
ELFv1ABIã䜿çšããããã«çŸåšã®ABIãå€æŽããŸãã ããã¯ããã°ãšã³ãã£ã¢ã³ã®ããã©ã«ãã®ABIã§ã
PowerPC64ãããLinuxã ããã©ã«ãã®ABIãäžæžãããã«ã¯ãç¹å¥ãªã·ã¹ãã ãµããŒããš
èŠäºãªæ¹æ³ã§å€±æããå¯èœæ§ããããŸãã
-mabi = elfv2
ELFv2ABIã䜿çšããããã«çŸåšã®ABIãå€æŽããŸãã ããã¯ã»ãšãã©ã®ããã©ã«ãã®ABIã§ã-
ãšã³ãã£ã¢ã³PowerPC64ãããLinuxã ããã©ã«ãã®ABIãäžæžãããã«ã¯ãç¹å¥ãªã·ã¹ãã ãå¿ èŠã§ã
ãµããŒãããèŠäºãªæ¹æ³ã§å€±æããå¯èœæ§ããããŸãã
-mãããã¿ã€ã
-mno-ãããã¿ã€ã
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãå¯å€åŒæ°ãžã®ãã¹ãŠã®åŒã³åºããæ³å®ãããŠããŸã
é¢æ°ã¯é©åã«ãããã¿ã€ãåãããŠããŸãã ãã以å€ã®å Žåãã³ã³ãã€ã©ã¯åœä»€ãæ¿å ¥ããå¿ èŠããããŸã
æ¡ä»¶ã³ãŒãã¬ãžã¹ã¿ã®ããã6ãèšå®ãŸãã¯ã¯ãªã¢ããããã®ãã¹ãŠã®éãããã¿ã€ãåŒã³åºãã®å
(CR) æµ®åå°æ°ç¹å€ãæµ®åå°æ°ç¹ã§æž¡ããããã©ããã瀺ã
é¢æ°ãå¯å€åŒæ°ãåãå Žåã«åããŠç»é²ããŸãã ãš -mãããã¿ã€ããåŒã³åºãã®ã¿
ãããã¿ã€ãã®å¯å€åŒæ°é¢æ°ã«ããããèšå®ãŸãã¯ã¯ãªã¢ããŸãã
-msim
çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãèµ·åã¢ãžã¥ãŒã«ãåŒã³åºããããšæ³å®ããŸã sim-crt0.o ãš
æšæºCã©ã€ãã©ãªã¯ libsim.a ãš libc.aã ããã¯ã®ããã©ã«ãã§ã
powerpc-*-eabisim æ§æã
-mmvme
çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãèµ·åã¢ãžã¥ãŒã«ãåŒã³åºããããšæ³å®ããŸã crt0.o ãš
æšæºCã©ã€ãã©ãªã¯ libmvme.a ãš libc.a.
-ããã
çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãèµ·åã¢ãžã¥ãŒã«ãåŒã³åºããããšæ³å®ããŸã crt0.o ãš
æšæºCã©ã€ãã©ãªã¯ libads.a ãš libc.a.
-ãã€ãšããŒãã€ã
çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãèµ·åã¢ãžã¥ãŒã«ãåŒã³åºããããšæ³å®ããŸã crt0.o ãš
æšæºCã©ã€ãã©ãªã¯ libyk.a ãš libc.a.
-mvxworks
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãã³ã³ãã€ã«ããããšãæå®ããŸãã
VxWorksã·ã¹ãã ã
-ã¡ã³ã
çµã¿èŸŒã¿ PowerPC ã·ã¹ãã ã§ã¯ã PPC_EMB ã瀺ã ELF ãã©ã° ããããŒã®ããã
ãã ã€ãŒã æ¡åŒµåé 眮ã䜿çšãããŸãã
-ããã³
-mno-eabi
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãçµã¿èŸŒã¿ã«æºæ ããŠããŸããïŒæºæ ããŠããŸããïŒã
ã·ã¹ãã ãžã®äžé£ã®å€æŽã§ããã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ïŒEABIïŒ
V.4ä»æ§ã éžæ -ããã³ ã¹ã¿ãã¯ã8ãã€ãã«æŽåãããŠããããšãæå³ããŸã
å¢çã§ã¯ãé¢æ°ã__eabiãããmainãããåŒã³åºãããEABIç°å¢ãã»ããã¢ããããŸãã
ãš -msdata ãªãã·ã§ã³ã¯ããr2ããšãr13ãã®äž¡æ¹ã䜿çšããŠãXNUMXã€ã®å¥ã ã®å°ããªããŒã¿ãæãããšãã§ããŸã
ãšãªã¢ã éžæ -mno-eabi ã¹ã¿ãã¯ã16ãã€ãå¢çã«æŽåãããŠããããšãæå³ããŸãã
EABIåæåé¢æ°ã¯ãã¡ã€ã³ãããåŒã³åºããã -msdata ãªãã·ã§ã³ã¯ã®ã¿ã䜿çšããŸã
ãr13ãã¯ãåäžã®å°ããªããŒã¿é åãæããŸãã The -ãã㳠次ã®å Žåããªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸã
ã®ããããã䜿çšããŠæ§æãããGCC powerpc *-*-eabi * ãªãã·ã§ã³ã
-msdata = eabi
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãåæåãããå°ããªãconstããã°ããŒãã«ã«é 眮ãã
ã®éçããŒã¿ .sdata2 ã¬ãžã¹ã¿ãr2ããæãã»ã¯ã·ã§ã³ã å°ããå ¥ãã
åæåãããéãconstãã°ããŒãã«ããã³éçããŒã¿ .sdata ãšãã£ãéšå
ã¬ãžã¹ã¿ãr13ãã§åæåãããŠããªãå°ããªã°ããŒãã«ããã³éçããŒã¿ã .sbss
ã«é£æ¥ããã»ã¯ã·ã§ã³ .sdata ã»ã¯ã·ã§ã³ã NS -msdata = eabi ãªãã·ã§ã³ããã
ãšäºææ§ããããŸãã -måé 眮å¯èœ ãªãã·ã§ã³ã ã¶Â· -msdata = eabi ãªãã·ã§ã³ã¯ãŸãèšå®ããŸã
-ã¡ã³ã ãªãã·ã§ã³ãéžæããŸãã
-msdata = sysv
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãå°ããªã°ããŒãã«ããŒã¿ãšéçããŒã¿ã
.sdata ã¬ãžã¹ã¿ãr13ããæãã»ã¯ã·ã§ã³ã åæåãããŠããªãå°ããªã°ããŒãã«ãé 眮
ããã³éçããŒã¿ .sbss ã«é£æ¥ããã»ã¯ã·ã§ã³ .sdata ã»ã¯ã·ã§ã³ã NS
-msdata = sysv ãªãã·ã§ã³ã¯ãšäºææ§ããããŸãã -måé 眮å¯èœ ãªãã·ã§ã³ãéžæããŸãã
-msdata = default
-msdata
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã®å Žåã -ãã㳠䜿çšãããŠããå Žåã¯ãåãã³ãŒããã³ã³ãã€ã«ããŸã
as -msdata = eabiããã以å€ã®å Žåã¯ããšåãã³ãŒããã³ã³ãã€ã«ããŸã -msdata = sysv.
-msdata = data
System V.4 ããã³çµã¿èŸŒã¿ PowerPC ã·ã¹ãã ã§ã¯ãå°ããªã°ããŒãã« ããŒã¿ã .sdata
ã»ã¯ã·ã§ã³ã å°ããªåæåãããŠããªãã°ããŒãã« ããŒã¿ã .sbss ã»ã¯ã·ã§ã³ã 䜿çšçŠæ¢
ãã ããå°ããªããŒã¿ãã¢ãã¬ã¹æå®ããã«ã¯ãr13ããç»é²ããŸãã ããã¯ãããã©ã«ãã®åäœã§ãã
ä»ã® -msdata ãªãã·ã§ã³ã䜿çšãããŸãã
-msdata = none
-mno-sdata
çµã¿èŸŒã¿ PowerPC ã·ã¹ãã ã§ã¯ãåæåããããã¹ãŠã®ã°ããŒãã« ããŒã¿ãšéçããŒã¿ã .data
ã»ã¯ã·ã§ã³å ã®ãã¹ãŠã®åæåãããŠããªãããŒã¿ .bss ã®ã»ã¯ã·ã§ã³ããç¡æã§ããŠã³ããŒãã§ããŸãã
-mblock-move-inline-limit =NUM
ãŸãã¯ä»¥äžã®ãã¹ãŠã®ãããã¯ç§»åïŒãmemcpyãã®åŒã³åºããæ§é äœã®ã³ããŒãªã©ïŒãã€ã³ã©ã€ã³åãã
ã«çãã NUM ãã€ãã ã®æå°å€ NUM 32ãããã¿ãŒã²ããã§ã¯32ãã€ãã64
64ãããã¿ãŒã²ããã®ãã€ãã ããã©ã«ãå€ã¯ã¿ãŒã²ããåºæã§ãã
-G NUM
çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãã°ããŒãã«ããã³éçã¢ã€ãã ã以äžã«é 眮ããŸã NUM
éåžžã®ããŒã¿ãŸãã¯BSSã»ã¯ã·ã§ã³ã®ä»£ããã«ã¹ã¢ãŒã«ããŒã¿ãŸãã¯BSSã»ã¯ã·ã§ã³ã«ãã€ãã
ããã©ã«ãã§ã¯ã NUM ã¯8ã§ãã -G NUM ã¹ã€ããããªã³ã«ã«æž¡ãããŸãã ãã¹ãŠã®ã¢ãžã¥ãŒã«
åãã§ã³ã³ãã€ã«ããå¿ èŠããããŸã -G NUM ã®å€ã§ãã
-mregnames
-mno-regnames
System V.4ããã³çµã¿èŸŒã¿PowerPCã·ã¹ãã ã§ã¯ãã¬ãžã¹ã¿åãçºè¡ããŸãïŒçºè¡ããŸããïŒã
ã·ã³ããªãã¯åœ¢åŒã䜿çšããã¢ã»ã³ããªèšèªåºåã
-mlongcall
-mno-ãã³ã°ã³ãŒã«
ããã©ã«ãã§ã¯ããã¹ãŠã®é話ãé ãã«ãããšæ³å®ããŠãããããããé·ããããé«äŸ¡ã§ã
åŒã³åºãã·ãŒã±ã³ã¹ãå¿ èŠã§ãã ããã¯ã32ã¡ã¬ãã€ããè¶ ããé話ã«å¿ èŠã§ã
ïŒ33,554,432ãã€ãïŒçŸåšã®å Žæããã ã·ã§ãŒãã³ãŒã«ã¯ã
ã³ã³ãã€ã©ãŒã¯ãåŒã³åºããããã»ã©é ããªãããšãç¥ã£ãŠããŸãã ãã®èšå®ã¯æ¬¡ã®ããã«äžæžãã§ããŸã
ãshortcallãé¢æ°å±æ§ããŸãã¯ã#pragma ãã³ã°ã³ãŒã«ïŒ0ïŒã
äžéšã®ãªã³ã«ãŒã¯ãç¯å²å€ã®åŒã³åºããæ€åºããã°ã«ãŒã³ãŒããçæããããšãã§ããŸã
ã¯ãã ãããã®ã·ã¹ãã ã§ã¯ãé·ãåŒã³åºãã¯äžèŠã§ãããããé ãã³ãŒããçæããŸãã ãšããŠ
ãã®èšäºã®å·çæç¹ã§ã¯ãPowerPC / 64çšã®GNUãªã³ã«ãŒãšåæ§ã«ãAIXãªã³ã«ãŒããããå®è¡ã§ããŸãã ãã
ãã®æ©èœã32ãããPowerPCã·ã¹ãã ã®GNUãªã³ã«ãŒã«ãè¿œå ããäºå®ã§ãã
Darwin / PPCã·ã¹ãã ã§ã¯ããïŒpragma longcallãã¯ããjbsr calleeãL42ãã«å ããŠã ãã©ã³ã
島 ïŒã°ã«ãŒã³ãŒãïŒã XNUMXã€ã®ã¿ãŒã²ããã¢ãã¬ã¹ã¯ãåŒã³åºãå ãšãã©ã³ããè¡šããŸã
å°å³¶ã ããŒãŠã£ã³/PPCãªã³ã«ãŒã¯æåã®ã¢ãã¬ã¹ãåªå ãããblcalleeããçæããŸã
PPCã®ãblãåœä»€ãåŒã³åºãå ã«çŽæ¥å°éããå Žåã ãã以å€ã®å Žåããªã³ã«ãŒ
ãã©ã³ãã¢ã€ã©ã³ããåŒã³åºãããã«ãblL42ããçæããŸãã ãã©ã³ãã¢ã€ã©ã³ãã¯ã«è¿œå ãããŸã
åŒã³åºãå ã®é¢æ°ã®æ¬äœã åŒã³åºãå ã®å®å šãª32ãããã¢ãã¬ã¹ãèšç®ãã
ããã«ãžã£ã³ãããŸãã
Mach-OïŒDarwinïŒã·ã¹ãã ã§ã¯ããã®ãªãã·ã§ã³ã¯ã³ã³ãã€ã©ãŒã
ãã¹ãŠã®çŽæ¥åŒã³åºããããã³ããŒãŠã£ã³ãªã³ã«ãŒã¯ããã䜿çšãããç Žæ£ãããã決å®ããŸãã
å°æ¥ããªã³ã«ãŒã次ã®ããã«èªèãããŠããå ŽåãGCCã¯ãã¹ãŠã®longcallä»æ§ãç¡èŠããå¯èœæ§ããããŸã
æ¥çå€ãçæããŸãã
-mtls-ããŒã«ãŒ
-mno-tls-ããŒã«ãŒ
é¢æ°ãæå®ããåé 眮ã§ã__tls_get_addrããžã®åŒã³åºããããŒã¯ïŒããŒã¯ããªãïŒ
å£è«ã åé 眮ã«ããããªã³ã«ã¯é¢æ°åŒã³åºãã確å®ã«é¢é£ä»ããããšãã§ããŸã
TLSæé©åã®ããã®åŒæ°èšå®æé ãããã«ãããGCCã®æ¹åãå¯èœã«ãªããŸãã
ã·ãŒã±ã³ã¹ãã¹ã±ãžã¥ãŒã«ããŸãã
-pthread
ãã«ãã¹ã¬ããã®ãµããŒããè¿œå ããŸã pthread å³æžé€šã ãã®ãªãã·ã§ã³ã¯ããã©ã°ãèšå®ããŸã
ããªããã»ããµãšãªã³ã«ã®äž¡æ¹ã
-mã¬ã·ã
-mno-ã¬ã·ã
ãã®ãªãã·ã§ã³ã䜿çšãããšãéæ°æšå®ãšéæ°å¹³æ¹æ ¹æšå®ã䜿çšã§ããŸãã
代ããã«ç²ŸåºŠãäžããããã®è¿œå ã®ãã¥ãŒãã³ã©ããœã³ã¹ãããã䌎ãåœä»€
é€ç®ãŸãã¯å¹³æ¹æ ¹ãå®è¡ããæµ®åå°æ°ç¹åŒæ°ã«å¯ŸããŠé€ç®ããŸãã ããªãã¯äœ¿çšããå¿ èŠããããŸã
ã -ffast-æ°åŠ 䜿çšæã®ãªãã·ã§ã³ -mã¬ã·ã (ãŸãã¯å°ãªããšã -funsafe-æ°åŠã®æé©å,
-æéæ°åŠã®ã¿, -freciprocal-æ°åŠ ãš -fno-ãã©ãã-æ°åŠïŒã ã«æ³šæããŠãã ãã
ã·ãŒã±ã³ã¹ã®ã¹ã«ãŒãããã¯ãéåžžãéã·ãŒã±ã³ã¹ã®ã¹ã«ãŒããããããé«ããªããŸãã
çžäºåœä»€ã®å Žåãã·ãŒã±ã³ã¹ã®ç²ŸåºŠã¯æ倧2ulpäœäžããå¯èœæ§ããããŸã
ïŒã€ãŸãã1.0ã®éæ°ã¯0.99999994ã«çããïŒéæ°å¹³æ¹æ ¹ã®å Žåã
-mrecip =ãªãã
ãã®ãªãã·ã§ã³ã¯ã䜿çšã§ããçžäºæšå®åœä»€ãå¶åŸ¡ããŸãã ãªãã ã
ãªãã·ã§ã³ã®ã³ã³ãåºåããªã¹ããåã«ãïŒããä»ããããšãã§ããŸãã ãªãã·ã§ã³ãå転ããã«ã¯ïŒ
"all": ãã¹ãŠã®èŠç©ããåœä»€ãæå¹ã«ããã"default": ããã©ã«ãã®åœä»€ãæå¹ã«ããã
ã«çžåœ -mã¬ã·ãããnoneã: ãã¹ãŠã®èŠç©ããåœä»€ãç¡å¹ã«ããŸãã
-mno-ã¬ã·ã; "div": äž¡æ¹ã®ã·ã³ã°ã«ã«å¯ŸããŠéæ°è¿äŒŒåœä»€ãæå¹ã«ããŸãã
ããã³å粟床; "divf": å粟床éæ°è¿äŒŒãæå¹ã«ããŸã
æ瀺; "divd": å粟床éæ°è¿äŒŒãæå¹ã«ããŸã
æ瀺; "rsqrt": éæ°å¹³æ¹æ ¹è¿äŒŒåœä»€ãæå¹ã«ããŸã
å粟床ãšå粟床ã®äž¡æ¹ã "rsqrtf": å粟床éæ°ãæå¹ã«ããŸã
å¹³æ¹æ ¹è¿äŒŒåœä»€; "rsqrtd": å粟床ãæå¹ã«ããŸã
éå¹³æ¹æ ¹è¿äŒŒåœä»€;
ããšãã°ã -mrecip = allãïŒrsqrtd ãã¹ãŠã®çžäºæšå®ãæå¹ã«ããŸã
ãFRSQRTEãããXSRSQRTEDPããããã³ãXVRSQRTEDPãåœä»€ãé€ãåœä»€
å粟床ã®éæ°å¹³æ¹æ ¹èšç®ãåŠçããŸãã
-mrecip-粟床
-mno-recipe-precision
çžäºæšå®åœä»€ãããé«ããã®ãæäŸãããšä»®å®ããŸãïŒä»®å®ããªãã§ãã ããïŒ-
PowerPCABIã§çŸ©åä»ããããŠãããããæ£ç¢ºãªèŠç©ããã éžæ -mcpu = power6,
-mcpu = power7 or -mcpu = power8 èªåçã«éžæ -mrecip-粟床ã ããã«-
äœç²ŸåºŠã®å¹³æ¹æ ¹æšå®åœä»€ã¯ãããã©ã«ãã§ã¯çæãããŸããã
粟å¯æ©æ¢°ãXNUMXååŸã«åæããæšå®å€ãæäŸããªããã
æé ã
-mveclibabi =type
å€éšã©ã€ãã©ãªã䜿çšããŠçµã¿èŸŒã¿é¢æ°ããã¯ãã«åããããã«äœ¿çšããABIã¿ã€ããæå®ããŸãã
çŸåšãµããŒããããŠããå¯äžã®ã¿ã€ãã¯ãmassãã§ããããã¯ãIBM ã®
ã䜿çšããŠçµã¿èŸŒã¿é¢æ°ããã¯ãã«åããããã®æ°åŠå éãµãã·ã¹ãã (MASS) ã©ã€ãã©ãª
å€éšã©ã€ãã©ãªã GCC ã¯çŸåšããacosd2ãããacosf4ãããacoshd2ãã
ãacoshf4ãããasind2ãããasinf4ãããasinhd2ãããasinhf4ãããatan2d2ãããatan2f4ãããatand2ãã
ãatanf4ãããatanhd2ãããatanhf4ãããcbrtd2ãããcbrtf4ãããcosd2ãããcosf4ãããcoshd2ãã
ãcoshf4ãããerfcd2ãããerfcf4ãããerfd2ãããerff4ãããexp2d2ãããexp2f4ãããexpd2ãããexpf4ãã
"expm1d2"ã"expm1f4"ã"hypotd2"ã"hypotf4"ã"lgammad2"ã"lgammaf4"ã"log10d2"ã
"log10f4"ã"log1pd2"ã"log1pf4"ã"log2d2"ã"log2f4"ã"logd2"ã"logf4"ã"powd2"ã
ãpowf4ãããsind2ãããsinf4ãããsinhd2ãããsinhf4ãããsqrtd2ãããsqrtf4ãããtand2ãããtanf4ãã
power2 ã®ã³ãŒããçæããå Žåã¯ããtanhd4ãããã³ãtanhf7ãã äž¡æ¹ -ftree-ãã¯ãã«å ãš
-funsafe-æ°åŠã®æé©å ãŸããæå¹ã«ããå¿ èŠããããŸãã MASSã©ã€ãã©ãªã¯
ãªã³ã¯æã«æå®ãããŸãã
-mfriz
-mno-ããªãº
ãfrizãåœä»€ãçæããïŒçæããªãïŒå Žå -funsafe-æ°åŠã®æé©å
ãªãã·ã§ã³ã¯ãæµ®åå°æ°ç¹å€ã®64ãããæŽæ°ãžã®äžžããæé©åããããã«äœ¿çšãããŸãã
æµ®åå°æ°ç¹ã«æ»ããŸãã ãfrizãåœä»€ã¯ã次ã®å Žåã«åãå€ãè¿ããŸããã
æµ®åå°æ°ç¹æ°ã倧ããããŠæŽæ°ã«åãŸããŸããã
-mpointers-to-nested-functions
-mno-ãã¹ããããé¢æ°ãžã®ãã€ã³ã¿
ã¹ã¿ãã£ã㯠ãã§ãŒã³ ã¬ãžã¹ã¿ãããŒãããã³ãŒããçæããŸã (çæããŸãã) (r11ïŒ ãã€
é¢æ°ãã€ã³ã¿ãŒãååšããAIXããã³64ãããLinuxã·ã¹ãã äžã®ãã€ã³ã¿ãŒãä»ããåŒã³åºã
é¢æ°ã¢ãã¬ã¹ãããŒããããTOCå€ãäžãã3ã¯ãŒãèšè¿°åãæããŸã
ç»é² r2ãããã³ã¬ãžã¹ã¿ã«ããŒããããéçãã§ãŒã³å€ r11ãéžæããŸãã
-mpointers-to-nested-functions ããã©ã«ãã§ãªã³ã«ãªã£ãŠããŸãã ãã€ã³ã¿ãä»ããŠåŒã³åºãããšã¯ã§ããŸãã
ãã¹ããããé¢æ°ãŸãã¯ã䜿çšããä»ã®èšèªã§ã³ã³ãã€ã«ãããé¢æ°ãžã®ãã€ã³ã¿
éçãã§ãŒã³ã䜿çšããå Žå -mno-ãã¹ããããé¢æ°ãžã®ãã€ã³ã¿.
-msave-toc-éæ¥
-mno-save-toc-indirect
TOCå€ãäºçŽæžã¿ã¹ã¿ãã¯ã®å Žæã«ä¿åããã³ãŒããçæïŒçæããªãïŒ
é¢æ°ãAIXããã³64ãããäžã®ãã€ã³ã¿ãŒãä»ããŠåŒã³åºãå Žåã¯ãé¢æ°ããããŒã°ã§
Linuxã·ã¹ãã ã TOCå€ãããããŒã°ã«ä¿åãããŠããªãå Žåã¯ãçŽåã«ä¿åãããŸã
ãã€ã³ã¿ãä»ããåŒã³åºãã The -mno-save-toc-indirect ãªãã·ã§ã³ãããã©ã«ãã§ãã
-mcompat-align-parm
-mno-compat-align-parm
æ倧ã®é 眮ã§æ§é ãã©ã¡ãŒã¿ãŒãæž¡ãããã®ã³ãŒããçæããïŒçæããªãïŒ
å€ãããŒãžã§ã³ã®GCCãšã®äºææ§ã®ããã«64ãããã
å€ãããŒãžã§ã³ã®GCCïŒ4.9.0ããåïŒã¯ãæ§é ãã©ã¡ãŒã¿ãŒã誀ã£ãŠæŽåããŸããã§ãã
ãã®æ§é ã«128ããããå¿ èŠãšããã¡ã³ããŒãå«ãŸããŠããå Žåã®128ãããå¢ç
ã¢ã©ã€ã³ã¡ã³ãã ããã¯ãGCCã®ææ°ããŒãžã§ã³ã§ä¿®æ£ãããŠããŸãã ãã®ãªãã·ã§ã³ã䜿çšã§ããŸã
å€ãããŒãžã§ã³ã®ã§ã³ã³ãã€ã«ãããé¢æ°ãšäºææ§ã®ããã³ãŒããçæãã
GCCã
ãã® -mno-compat-align-parm ãªãã·ã§ã³ãããã©ã«ãã§ãã
RX ãªãã·ã§ã³
ãããã®ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã¯ãRXã¿ãŒã²ããã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-m64ãããããã«
-m32ãããããã«
ãdoubleãããŒã¿åã64ãããïŒ-m64ãããããã«ïŒãŸãã¯32ãããïŒ-m32ãããããã«)
ãµã€ãºã§ã ããã©ã«ã㯠-m32ãããããã«. 泚æ RXæµ®åå°æ°ç¹ããŒããŠã§ã¢ã®ã¿ãæ©èœããŸã
32ãããå€ã®å Žåããããããã©ã«ãã -m32ãããããã«.
-fpu
-ããã
æå¹ã«ããïŒ-fpuïŒãŸãã¯ç¡å¹ã«ããŸãïŒ-ãããïŒRXæµ®åå°æ°ç¹ããŒããŠã§ã¢ã®äœ¿çšã The
ããã©ã«ãã§ã¯ã RX600 ã·ãªãŒãºããã³ç¡å¹å RX200 ã·ãªãŒãºã
æµ®åå°æ°ç¹åœä»€ã¯ã32ãããæµ®åå°æ°ç¹å€ã«å¯ŸããŠã®ã¿çæãããŸãã
ãã ããFPUããŒããŠã§ã¢ã¯ã -m64ãããããã« ãªãã·ã§ã³ããã
äžå€ã
泚æ Status -fpu ãªãã·ã§ã³ãæå¹ã«ãªãã -funsafe-æ°åŠã®æé©å ãæå¹ã«ãªã£ãŠããŸã
èªåçã ããã¯ãRXFPUåœä»€èªäœãå®å šã§ã¯ãªãããã§ãã
-mcpu =å
ã¿ãŒã²ãããšããRXCPUã®ã¿ã€ããéžæããŸãã çŸåšãXNUMXã€ã®ã¿ã€ãããµããŒããããŠããŸãã
ãžã§ããªã㯠RX600 ãš RX200 ã·ãªãŒãºããŒããŠã§ã¢ãšç¹å®ã® RX610 CPUã ããã©ã«ãã¯
RX600.
å¯äžã®éã㯠RX600 ãš RX610 ã€ãŸã RX610 ããµããŒãããŠããŸãã
ãMVTIPLãåœä»€ã
ãã® RX200 ã·ãªãŒãºã«ã¯ããŒããŠã§ã¢æµ®åå°æ°ç¹ãŠããããªã©ããããŸãã -ããã æå¹ã«ãªã£ãŠããŸã
ãã®ã¿ã€ããéžæãããŠããå Žåãããã©ã«ãã§ã
-mbig-ãšã³ãã£ã¢ã³-ããŒã¿
-mlittle-ãšã³ãã£ã¢ã³-ããŒã¿
ããŒã¿ïŒã³ãŒãã§ã¯ãªãïŒãããã°ãšã³ãã£ã¢ã³åœ¢åŒã§ä¿åããŸãã ããã©ã«ãã¯
-mlittle-ãšã³ãã£ã¢ã³-ããŒã¿ãã€ãŸãããªãã«ãšã³ãã£ã¢ã³åœ¢åŒã§ããŒã¿ãä¿åããŸãã
-msmall-data-limit =N
é 眮ã§ããã°ããŒãã«å€æ°ãšéçå€æ°ã®æ倧ãµã€ãºããã€ãåäœã§æå®ããŸã
å°ããªããŒã¿é åã«ã å°ããªããŒã¿é åã䜿çšãããšãããå°ãããããéããªãå¯èœæ§ããããŸã
ã³ãŒãã§ãããé åã®ãµã€ãºã¯å¶éãããŠãããããã確èªããã®ã¯ããã°ã©ããŒæ¬¡ç¬¬ã§ãã
ãšãªã¢ã¯ãªãŒããŒãããŒããŸããã ãŸããå°ããªããŒã¿é åã䜿çšãããå ŽåãRXã®XNUMXã€
ã¬ãžã¹ã¿ïŒéåžžã¯ãr13ãïŒã¯ããã®é åãæãããã«äºçŽãããŠããããã
ã³ã³ãã€ã©ã§äœ¿çšã§ããããã«ãªããŸããã ããã«ãããé床ãäœäžãããã倧ãããªã£ããããå¯èœæ§ããããŸã
å€æ°ããã®ã¬ãžã¹ã¿ã«ä¿æãããã®ã§ã¯ãªããã¹ã¿ãã¯ã«ããã·ã¥ãããå Žåã®ã³ãŒãã
äžè¬çãªå€æ°ïŒåæåãããŠããªãå€æ°ïŒãšå®æ°ã¯
ã®ãã®ä»ã®ã»ã¯ã·ã§ã³ã«å²ãåœãŠãããŠãããããå°ããªããŒã¿é åã«ã¯é 眮ãããŸããã
åºåå®è¡å¯èœãã¡ã€ã«ã
ããã©ã«ãå€ã¯ãŒãã§ããã®æ©èœã¯ç¡å¹ã«ãªã£ãŠããŸãã ãã®æ©èœã¯ããã§ã¯ãªãããšã«æ³šæããŠãã ãã
ããé«ãæé©åã¬ãã«ã§ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãïŒ-O2 ãªã©ïŒã®ããã«
ã¬ãžã¹ã¿ãŒãäºçŽããããšã«ããæœåšçã«æ害ãªåœ±é¿ã ããã¯ããã°ã©ããŒæ¬¡ç¬¬ã§ã
ãã®æ©èœã圌ãã®ããã°ã©ã ã«æçã§ãããã©ãããå®éšããŠçºèŠããããšã èŠã
ã®èª¬æ -mpid å®éã®ã¬ãžã¹ã¿ãã©ã®ããã«
å°ããªããŒã¿é åã®ãã€ã³ã¿ãæŒãããŸãŸã«ããŸãã
-msim
-mno-sim
ã·ãã¥ã¬ãŒã¿ã©ã³ã¿ã€ã ã䜿çšããŸãã ããã©ã«ãã§ã¯ãlibglossããŒãåºæã®ã©ã³ã¿ã€ã ã䜿çšããŸãã
-mas100-æ§æ
-mno-as100-æ§æ
ã¢ã»ã³ãã©åºåãçæãããšãã¯ãã«ããµã¹ã®AS100ãšäºææ§ã®ããæ§æã䜿çšããŠãã ãã
ã¢ã»ã³ãã©ã ãã®æ§æã¯GASã¢ã»ã³ãã©ã§ãåŠçã§ããŸãããããã€ããããŸãã
å¶éããããããããã©ã«ãã§ã¯çæãããŸããã
-mmax-constant-size =N
ã§ãªãã©ã³ããšããŠäœ¿çšã§ããå®æ°ã®æ倧ãµã€ãºããã€ãåäœã§æå®ããŸã
RXåœä»€ã RXåœä»€ã»ããã§ã¯ãæ倧4ã®å®æ°ã䜿çšã§ããŸãã
åœä»€ã§äœ¿çšãããé·ãããã€ãã®å Žåãå€ãé·ãã»ã©é·ãããšã«ãªããŸã
åœä»€ã ãããã£ãŠãç¶æ³ã«ãã£ãŠã¯ããµã€ãºãå¶éããããšãæçãªå ŽåããããŸãã
åœä»€ã§äœ¿çšãããå®æ°ã 倧ããããå®æ°ã¯ä»£ããã«
å®æ°ããŒã«ã«é 眮ãããã¬ãžã¹ã¿ã®éæ¥åç §ãä»ããŠåç §ãããŸãã
å€ N 0ãã4ã®éã§æå®ã§ããŸãã0ïŒããã©ã«ãïŒãŸãã¯4ã®å€ã¯ã次ã®ããšãæå³ããŸãã
ä»»æã®ãµã€ãºã®å®æ°ã䜿çšã§ããŸãã
-mãªã©ãã¯ã¹
ãªã³ã«ãŒç·©åãæå¹ã«ããŸãã ãªã³ã«ãŒç·©åã¯ããªã³ã«ãŒãè©Šè¡ããããã»ã¹ã§ãã
ããŸããŸãªåœä»€ã®çãããŒãžã§ã³ãèŠã€ããããšã«ãããããã°ã©ã ã®ãµã€ãºãçž®å°ããŸãã
ããã©ã«ãã§ã¯ç¡å¹ã§ãã
-mint-register =N
é«éå²ã蟌ã¿ãã³ãã©é¢æ°çšã«äºçŽããã¬ãžã¹ã¿ã®æ°ãæå®ããŸãã The
å€ N 0ãã4ã®éã§æå®ã§ããŸããå€1ã¯ãã¬ãžã¹ã¿ãr13ããäºçŽãããŠããããšãæå³ããŸãã
é«éå²ã蟌ã¿ãã³ãã©å°çšã 2ã®å€ã¯ãr13ããäºçŽãã
ãr12ãã å€ã3ã®å Žåã¯ãr13ãããr12ãããr11ããäºçŽãããå€ã4ã®å Žåã¯ãr13ããäºçŽãããŸãã
ãr10ããŸã§ã ããã©ã«ãã®å€0ã¯ãã¬ãžã¹ã¿ãäºçŽããŸããã
-msave-acc-in-interrupts
å²ã蟌ã¿ãã³ãã©é¢æ°ãã¢ãã¥ã ã¬ãŒã¿ã¬ãžã¹ã¿ãä¿æããå¿ èŠãããããšãæå®ããŸãã
ããã¯ãéåžžã®ã³ãŒããã¢ãã¥ã ã¬ãŒã¿ã¬ãžã¹ã¿ã䜿çšããå Žåã«ã®ã¿å¿ èŠã§ãã
64ãããã®ä¹ç®ãå®è¡ããããã§ãã ããã©ã«ãã§ã¯ãã¢ãã¥ã ã¬ãŒã¿ã¯ç¡èŠãããŸã
ããã«ãããå²ã蟌ã¿ãã³ãã©ãé«éã«ãªããŸãã
-mpid
-mno-pid
äœçœ®ã«äŸåããªãããŒã¿ã®çæãæå¹ã«ããŸãã æå¹ã«ãããšã
å®æ°ããŒã¿ã¯ãã¬ãžã¹ã¿ã«ä¿æãããŠããããŒã¹ã¢ãã¬ã¹ããã®ãªãã»ãããä»ããŠè¡ãããŸãã ãã
å®è¡æã«å®æ°ããŒã¿ã®å Žæãç¹å®ããå¿ èŠããªãã
åé 眮ãããå®è¡å¯èœãã¡ã€ã«ãããã¯ãã¿ã€ããªçµã¿èŸŒã¿ã¢ããªã±ãŒã·ã§ã³ã«ãšã£ãŠã®å©ç¹ã§ãã
ã¡ã¢ãªã®å¶çŽã å€æŽå¯èœãªããŒã¿ã¯ããã®ãªãã·ã§ã³ã®åœ±é¿ãåããŸããã
ãã®æ©èœã䜿çšãããšãå®æ°ããŒã¿çšã«ã¬ãžã¹ã¿ïŒéåžžã¯ãr13ãïŒãäºçŽãããããšã«æ³šæããŠãã ããã
ããŒã¹ã¢ãã¬ã¹ã ããã«ãããç¹ã«è€éãªå Žåã«ãã³ãŒããé ããªã£ãã倧ãããªã£ããããå¯èœæ§ããããŸã
æ©èœããŸãã
äžå®ã®ããŒã¿ããŒã¹ã¢ãã¬ã¹ãä¿æããããã«éžæãããå®éã®ã¬ãžã¹ã¿ã¯ã
ã -msmall-ããŒã¿å¶é ããã³/ãŸã㯠-ãã³ãç»é² ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ãæå¹ã«ãªããŸãã
ã¬ãžã¹ã¿ãr13ãããå§ãŸããäžã«åãã£ãŠãã¬ãžã¹ã¿ãæåã«å²ãåœãŠãããŸãã
ã®èŠä»¶ãæºããããã« -ãã³ãç»é²ãã¿ãããããã®åŸã -mpid ãããŠæåŸã«
-msmall-ããŒã¿å¶éã ãããã£ãŠãã¹ã¢ãŒã«ããŒã¿ãšãªã¢ã¬ãžã¹ã¿ããr8ãã§ããå¯èœæ§ããããŸãã
äž¡æ¹ã®å Žå -mint-register = 4 ãš -mpid ã³ãã³ãã©ã€ã³ã§æå®ããŸãã
ããã©ã«ãã§ã¯ããã®æ©èœã¯æå¹ã«ãªã£ãŠããŸããã ããã©ã«ãã¯ã -mno-pid
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
-mno-warn-è€æ°ã®é«éå²ã蟌ã¿
-mwarn-è€æ°ã®é«éå²ã蟌ã¿
GCCãè€æ°ã®é«éå²ã蟌ã¿ãæ€åºããå Žåã«èŠåã¡ãã»ãŒãžãçºè¡ããªãããã«ããŸã
ãã¡ã€ã«ãã³ã³ãã€ã«ãããšãã®ãã³ãã©ãŒã ããã©ã«ãã§ã¯ãäœåãªãã®ããšã«èŠåãçºè¡ããŸã
RXã¯ãã®ãããªå²ã蟌ã¿ãXNUMXã€ãããµããŒãããŠããªããããé«éå²ã蟌ã¿ãã³ãã©ãèŠã€ãããŸããã
ã泚æ: äžè¬çãªGCCã³ãã³ãã©ã€ã³ãªãã·ã§ã³ -ä¿®æ£æžã¿-REG RXã«ãšã£ãŠç¹å¥ãªæå³ããããŸã
ãå²ã蟌ã¿ãé¢æ°å±æ§ãšãšãã«äœ¿çšããå Žåã®ããŒãã ãã®å±æ§ã¯ã
é«éå²ã蟌ã¿ãåŠçããããšãç®çãšããé¢æ°ã GCCã¯ãã¬ãžã¹ã¿ã®ã¿ã䜿çšããããšãä¿èšŒããŸã
ãr10ãããr11ãããr12ãããã³/ãŸãã¯ãr13ãã§ããã
察å¿ããã¬ãžã¹ã¿ã¯ã -ä¿®æ£æžã¿-REG or -ãã³ãç»é²
ã³ãã³ãã©ã€ã³ãªãã·ã§ã³ã
S / 390 ãš zã·ãªãŒãº ãªãã·ã§ã³
ãããã¯ã -m S/390ããã³zSeriesã¢ãŒããã¯ãã£ãŒçšã«å®çŸ©ããããªãã·ã§ã³ã
-mhard-float
-msoft-float
æµ®åå°æ°ç¹åœä»€ãšæµ®åå°æ°ç¹ã¬ãžã¹ã¿ã䜿çšããïŒäœ¿çšããªãïŒ-
ãã€ã³ãæäœã ã〠-msoft-float ãæå®ãããŠããå Žåã libgcc.a ãã«æ £ãã
æµ®åå°æ°ç¹æŒç®ãå®è¡ããŸãã ã〠-mhard-float æå®ãããŠããå Žåãã³ã³ãã€ã©
IEEEæµ®åå°æ°ç¹åœä»€ãçæããŸãã ãããããã©ã«ãã§ãã
-mhard-dfp
-mno-ããŒã-dfp
XNUMXé²æ°çšã®ããŒããŠã§ã¢XNUMXé²æ°æµ®åå°æ°ç¹åœä»€ã䜿çšããïŒäœ¿çšããªãïŒ-
æµ®åå°æ°ç¹æŒç®ã ã〠-mno-ããŒã-dfp ãæå®ãããŠããå Žåã libgcc.a ã
XNUMXé²æµ®åå°æ°ç¹æŒç®ãå®è¡ããããã«äœ¿çšãããŸãã ã〠-mhard-dfp æå®ãããŠããå Žåã
ã³ã³ãã€ã©ã¯ãXNUMXé²æµ®åå°æ°ç¹ããŒããŠã§ã¢åœä»€ãçæããŸãã ãããããã©ã«ãã§ã
for -march = z9-ec 以äžã§ãã
-mlong-double-64
-mlong-double-128
ãããã®ã¹ã€ããã¯ãããã³ã°ããã«ãã¿ã€ãã®ãµã€ãºãå¶åŸ¡ããŸãã 64ãããã®ãµã€ãºã¯
ãdoubleãã¿ã€ããšåçã®ãlongdoubleãã¿ã€ãã ãããããã©ã«ãã§ãã
-mbackchain
-mno-ããã¯ãã§ãŒã³
åŒã³åºãå ã®ãã¬ãŒã ã®ã¢ãã¬ã¹ãããã¯ãã§ãŒã³ãã€ã³ã¿ãšããŠã«ä¿åããŸãïŒä¿åããŸããïŒã
åŒã³åºãå ã®ã¹ã¿ãã¯ãã¬ãŒã ã 次ã®ãããªããŒã«ã䜿çšããŠãããã°ã§ããããã«ããã«ã¯ãããã¯ãã§ãŒã³ãå¿ èŠã«ãªãå ŽåããããŸãã
DWARF2ã®ã³ãŒã«ãã¬ãŒã æ å ±ãç解ããŠããŸããã ã〠-mno-packed-stack ã§ãã
ã€ãŸããããã¯ãã§ãŒã³ãã€ã³ã¿ã¯ã¹ã¿ãã¯ãã¬ãŒã ã®äžçªäžã«æ ŒçŽãããŸãã ãã€
-mpacked-ã¹ã¿ã㯠ãæå¹ã§ããå Žåãããã¯ãã§ãŒã³ã¯ã®æäžäœã®åèªã«é 眮ãããŸã
96/160ãã€ãã®ã¬ãžã¹ã¿ä¿åé åã
äžè¬çã«ã -mbackchain ã§ã³ã³ãã€ã«ãããã³ãŒããšã®åŒã³åºãäºææ§ããããŸã
-MMOããã¯ãã§ãŒã³; ãã ãããããã°ç®çã§ããã¯ãã§ãŒã³ã䜿çšããã«ã¯ãéåžžã
ãã€ããªå šäœãã§æ§ç¯ãããŠããããš -mbackchainã ã®çµã¿åããã«æ³šæããŠãã ãã
-mbackchain, -mpacked-ã¹ã¿ã㯠㚠-mhard-float ãµããŒããããŠããŸããã ãæ§ç¯ããããã«
Linuxã«ãŒãã«ã®äœ¿çš -msoft-float.
ããã©ã«ãã§ã¯ãããã¯ãã§ãŒã³ãç¶æããŸããã
-mpacked-ã¹ã¿ãã¯
-mno-packed-stack
ããã¯ã¹ã¿ãã¯ã¬ã€ã¢ãŠãã䜿çšããŸãïŒäœ¿çšããªãã§ãã ããïŒã ã〠-mno-packed-stack æå®ãããŠããå Žåã
ã³ã³ãã€ã©ãŒã¯ã96/160ãã€ãã®ã¬ãžã¹ã¿ãŒä¿ç®¡åã®ãã¹ãŠã®ãã£ãŒã«ãããããã®
ããã©ã«ãã®ç®ç; æªäœ¿çšã®ãã£ãŒã«ãã¯ãŸã ã¹ã¿ãã¯ã¹ããŒã¹ãå æããŸãã ã〠-mpacked-ã¹ã¿ã㯠is
æå®ãããå Žåãã¬ãžã¹ã¿ä¿åã¹ãããã¯ã¬ãžã¹ã¿ä¿åã®äžéšã«å¯éããŠããŸãã
ç¯å²; æªäœ¿çšã¹ããŒã¹ã¯ä»ã®ç®çã«åå©çšããããããããå¹ççã«äœ¿çšã§ããŸãã
䜿çšå¯èœãªã¹ã¿ãã¯ã¹ããŒã¹ã ãã ãã -mbackchain æäžäœãæå¹ã§ã
ä¿åé åã®ã¯ãŒãã¯ãããã¯ãã§ãŒã³ãšå·®åºäººäœæãæ ŒçŽããããã«åžžã«äœ¿çšãããŸã
ã¬ãžã¹ã¿ã¯åžžã«ããã¯ãã§ãŒã³ã®XNUMXã¯ãŒãäžã«ä¿åãããŸãã
ã¹ã¿ãã¯ãã¬ãŒã ããã¯ãã§ãŒã³ã䜿çšãããŠããªãéãã -mpacked-ã¹ã¿ãã¯
ã§çæãããã³ãŒããšã®åŒã³åºãäºææ§ããããŸã -mno-packed-stackã äžéšã®éFSFã«æ³šæããŠãã ãã
ã¹ã¿ãã¯ãã¬ãŒã ã䜿çšããS/2.95ãŸãã¯zSeriesã§çæãããã³ãŒãçšã®GCC390ã®ãªãªãŒã¹
ãããã°ç®çã ãã§ãªããå®è¡æã®ããã¯ãã§ãŒã³ã ãã®ãããªã³ãŒãã¯åŒã³åºãã§ã¯ãããŸãã-
ã§ã³ã³ãã€ã«ãããã³ãŒããšäºææ§ããããŸã -mpacked-ã¹ã¿ãã¯ã ãŸããã®çµã¿åããã«æ³šæããŠãã ãã
-mbackchain, -mpacked-ã¹ã¿ã㯠㚠-mhard-float ãµããŒããããŠããŸããã ãæ§ç¯ããããã«
Linuxã«ãŒãã«ã®äœ¿çš -msoft-float.
ããã©ã«ãã§ã¯ãããã¯ã¹ã¿ãã¯ã¬ã€ã¢ãŠãã¯äœ¿çšãããŸããã
-msmall-exec
-mno-small-exec
ãµãã«ãŒãã³ãå®è¡ããããã®ãbrasãåœä»€ã䜿çšããŠã³ãŒããçæããïŒãŸãã¯çæããªãïŒ
åŒã³åºããŸãã ããã¯ãå®è¡å¯èœãã¡ã€ã«ã®åèšãµã€ãºã64kãè¶ ããªãå Žåã«ã®ã¿ç¢ºå®ã«æ©èœããŸãã
ããã©ã«ãã§ã¯ã代ããã«ãbasrãåœä»€ã䜿çšããŸãããããã¯ãããŸãã
å¶éã
-m64
-m31
æ¥æ -m31 ãæå®ãããŠããå Žåã¯ãGNU / Linux for S /390ABIã«æºæ ããã³ãŒããçæããŸãã ãã€
-m64 ãæå®ãããŠããå Žåã¯ãGNU / Linux forzSeriesABIã«æºæ ããã³ãŒããçæããŸãã ãã
ç¹ã«GCCã64ãããåœä»€ãçæã§ããããã«ããŸãã ã®ããã« s390 ã¿ãŒã²ããã
ããã©ã«ã㯠-m31ãäžæ¹ã s390x ã¿ãŒã²ããã®ããã©ã«ã㯠-m64.
-mzach
-ã¡ãµ
æ¥æ -mzach ãæå®ãããŠããå Žåã¯ãã§å©çšå¯èœãªæé ã䜿çšããŠã³ãŒããçæããŸã
z/Architectureã ã〠-ã¡ãµ ãæå®ãããŠããå Žåã¯ãåœä»€ã䜿çšããŠã³ãŒããçæããŸã
ESA/390ã§å©çšã§ããŸãã ãäºæ¿ãã ãã -ã¡ãµ ã§ã¯äžå¯èœã§ã -m64ã çæãããšã
GNU / Linux for S / 390 ABIã«æºæ ããã³ãŒããããã©ã«ã㯠-ã¡ãµã çæãããšã
GNU / Linux for zSeries ABIã«æºæ ããã³ãŒããããã©ã«ã㯠-mzach.
-mmvcle
-mno-mvcle
ãmvcleãåœä»€ã䜿çšããŠãããã¯ãå®è¡ããã³ãŒããçæããïŒãŸãã¯çæããªãïŒ
移åããŸãã ã〠-mno-mvcle ãæå®ãããŠããå Žåã¯ã代ããã«ãmvcãã«ãŒãã䜿çšããŠãã ããã ãããããã©ã«ãã§ã
ãµã€ãºãæé©åããªãéãã
-mdebug
-mno-ãããã°
ã³ã³ãã€ã«æã«è¿œå ã®ãããã°æ å ±ãå°å·ããŸãïŒãŸãã¯å°å·ããŸããïŒã ããã©ã«ãã¯
ãããã°æ å ±ãåºåããŸããã
-XNUMXæ=CPUã¿ã€ã
ã§å®è¡ãããã³ãŒããçæãã CPUã¿ã€ããããã¯ã
ç¹å®ã®ããã»ããµã¿ã€ãã ã®å¯èœãªå€ CPUã¿ã€ã ã g5, g6, z900, z990, z9-109,
z9-ec, z10, z196, zEC12. ã§å©çšå¯èœãªæé ã䜿çšããŠã³ãŒããçæããå Žå
z/ã¢ãŒããã¯ãã£ãããã©ã«ã㯠-march = z900ã ãã以å€ã®å Žåãããã©ã«ã㯠-march = g5.
-mtune =CPUã¿ã€ã
ã«èª¿æŽãã CPUã¿ã€ã ABIãé€ããçæãããã³ãŒãã«è©²åœãããã¹ãŠã®ãã®
ããã³å©çšå¯èœãªåœä»€ã®ã»ããã ã®ãªã¹ã CPUã¿ã€ã å€ã¯ãšåãã§ã
-è¡é²ã ããã©ã«ãã¯ã«äœ¿çšãããå€ã§ã -è¡é².
-mtpf-ãã¬ãŒã¹
-mno-tpf-ãã¬ãŒã¹
ãã¬ãŒã¹ã«ãŒãã³ã«TPFOSåºæã®ãã©ã³ããè¿œå ããïŒè¿œå ããªãïŒã³ãŒããçæãã
ãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã§ã ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã«ããå Žåã§ããããã©ã«ãã§ãªãã«ãªã£ãŠããŸãã
TPFOSã
-æ··ä¹±-çã£ã
-mno-fusion-madd
æµ®åå°æ°ç¹ã®ç©åã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã
æ瀺ã ãããã®åœä»€ã¯ãããŒããŠã§ã¢æµ®åå°æ°ç¹ã®å Žåãããã©ã«ãã§çæãããŸã
䜿çšãããŠããã
-mwarn-framesize =ãã¬ãŒã ãµã€ãº
çŸåšã®é¢æ°ãæå®ããããã¬ãŒã ãµã€ãºãè¶ ããå Žåã«èŠåãçºããŸãã ããã¯
ã³ã³ãã€ã«æã®ãã§ãã¯ã¯ãããã°ã©ã ã®å®è¡æã«å®éã®åé¡ã§ããå¿ èŠã¯ãããŸããã ãã
ã¹ã¿ãã¯ãªãŒããŒãããŒãåŒãèµ·ããå¯èœæ§ãæãé«ãé¢æ°ãç¹å®ããããšãç®çãšããŠããŸãã ã§ã
Linuxã«ãŒãã«ãªã©ãã¹ã¿ãã¯ãµã€ãºãå¶éãããŠããç°å¢ã§äœ¿çšãããšäŸ¿å©ã§ãã
-mwarn-dynamicstack
é¢æ°ããallocaããåŒã³åºãããåçãªãµã€ãºã®é åã䜿çšããå Žåã¯ãèŠåãçºããŸãã ãã
ã¹ã¿ãã¯ãµã€ãºãéãããŠãããããäžè¬çã«ã¯ãå§ãã§ããŸããã
-mstack-guard =ã¹ã¿ãã¯ã¬ãŒã
-mstack-size =ã¹ã¿ãã¯ãµã€ãº
ãããã®ãªãã·ã§ã³ãæäŸãããŠããå ŽåãS/390ããã¯ãšã³ãã¯
ã¹ã¿ãã¯ãµã€ãºã次ã®å Žåã«ãã©ãããããªã¬ãŒããé¢æ°ããããŒã° ã¹ã¿ãã¯ã¬ãŒã äžèšã®ãã€ã
ã¹ã¿ãã¯ãµã€ãº ïŒS / 390ã®ã¹ã¿ãã¯ã¯äžåãã«ãªãããšã«æ³šæããŠãã ããïŒã ã®å Žå ã¹ã¿ãã¯ã¬ãŒã
ãªãã·ã§ã³ã¯çç¥ãããŸãã³ã³ãã€ã«ããããã¬ãŒã ãµã€ãºãã2倧ããæå°ã®çŽ¯ä¹
é¢æ°ãéžæãããŠããŸãã ãããã®ãªãã·ã§ã³ã¯ãã¹ã¿ãã¯ã®ãããã°ãæ¯æŽããããã«äœ¿çšããããšãç®çãšããŠããŸã
ãªãŒããŒãããŒã®åé¡ã è¿œå ã§çºè¡ãããã³ãŒãã¯ãããããªãªãŒããŒããããš
ãããã£ãŠãããã©ãŒãã³ã¹ãåäžãããããšãªããæ¬çªç°å¢ã®ãããªã·ã¹ãã ã§ã䜿çšã§ããŸãã
å£åã äžããããå€ã¯2ã®æ£ç¢ºãªçŽ¯ä¹ã§ãªããã°ãªããŸãã ã¹ã¿ãã¯ãµã€ãº ã§ããå¿ èŠããããŸã
è¶ãã ã¹ã¿ãã¯ã¬ãŒã 64kãè¶ ããã«ã å¹ççã«ããããã«äœåãª
ã³ãŒãã¯ãã¹ã¿ãã¯ãå€ã«æããããã¢ãã¬ã¹ããå§ãŸããšæ³å®ããŸã
ã«ãã£ãŠäžãããã ã¹ã¿ãã¯ãµã€ãºãéžæããŸãã ã¹ã¿ãã¯ã¬ãŒã ãªãã·ã§ã³ã¯ããšçµã¿åãããŠã®ã¿äœ¿çšã§ããŸã
ã¹ã¿ãã¯ãµã€ãº.
-mhotpatch =ãã¬ããŒãã¯ãŒã,ãã¹ãããŒãã¯ãŒã
ãããããããªãã·ã§ã³ãæå¹ã«ãªã£ãŠããå Žåãããããããããé¢æ°ããããŒã°ãçæãããŸãã
ã³ã³ãã€ã«åäœã®ãã¹ãŠã®é¢æ°ã æ©èœã©ãã«ã«ã¯ãæå®ããããã®ãä»å ãããŸã
XNUMXãã€ãã®NOPåœä»€ã®æ°ïŒãã¬ããŒãã¯ãŒããæ倧1000000ïŒã åŸã«
ã©ãã«ã2 * ãã¹ãããŒãã¯ãŒã åœä»€ã®ãããªæ倧ã®NOPã䜿çšããŠããã€ããè¿œå ãããŸã
ã¢ãŒããã¯ãã£ã§èš±å¯ãããŠããŸãïŒæ倧1000000ïŒã
äž¡æ¹ã®åŒæ°ããŒãã®å Žåãããããããã¯ç¡å¹ã«ãªããŸãã
ãã®ãªãã·ã§ã³ã¯ããhotpatchãå±æ§ãæã€åã ã®é¢æ°ã«å¯ŸããŠãªãŒããŒã©ã€ãã§ããŸãã
ã¹ã³ã¢ ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãã¹ã³ã¢ã®å®è£ ã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-meb
ããã°ãšã³ãã£ã¢ã³ã¢ãŒãã®ã³ãŒããã³ã³ãã€ã«ããŸãã ãããããã©ã«ãã§ãã
-ã¡ã«
ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã®ã³ãŒããã³ã³ãã€ã«ããŸãã
-mnhwloop
ãbcnzãåœä»€ã®çæãç¡å¹ã«ããŸãã
-ãã«ã¹
ã¢ã©ã€ã³ãããŠããªãããŒãããã³ã¹ãã¢åœä»€ã®çæãæå¹ã«ããŸãã
-mmac
ç©ååœä»€ã®äœ¿çšãæå¹ã«ããŸãã ããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ãŠããŸãã
-mscore5
ã¿ãŒã²ããã¢ãŒããã¯ãã£ãšããŠSCORE5ãæå®ããŸãã
-mscore5u
ã¿ãŒã²ããã¢ãŒããã¯ãã£ã®SCORE5Uãæå®ããŸãã
-mscore7
ã¿ãŒã²ããã¢ãŒããã¯ãã£ãšããŠSCORE7ãæå®ããŸãã ãããããã©ã«ãã§ãã
-mscore7d
ã¿ãŒã²ããã¢ãŒããã¯ãã£ãšããŠSCORE7Dãæå®ããŸãã
SH ãªãã·ã§ã³
ããŒãã³ -m SHå®è£ ã®ãªãã·ã§ã³ãå®çŸ©ãããŠããŸãã
-m1 SH1ã®ã³ãŒããçæããŸãã
-m2 SH2ã®ã³ãŒããçæããŸãã
-m2e
SH2eã®ã³ãŒããçæããŸãã
-m2a-nofpu
FPUãªãã®SH2aããŸãã¯SH2a-FPUã®ã³ãŒãã次ã®ããã«çæããŸãã
æµ®åå°æ°ç¹ãŠãããã¯äœ¿çšãããŸããã
-m2a-ã·ã³ã°ã«ã®ã¿
å粟床浮åå°æ°ç¹ããªãããã«ãSH2a-FPUã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m2a-ã·ã³ã°ã«
æµ®åå°æ°ç¹ãŠããããå粟床ã§ãããšä»®å®ããŠãSH2a-FPUã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯ã¢ãŒãã
-m2a
æµ®åå°æ°ç¹ãŠããããå粟床ã§ãããšä»®å®ããŠãSH2a-FPUã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯ã¢ãŒãã
-m3 SH3ã®ã³ãŒããçæããŸãã
-m3e
SH3eã®ã³ãŒããçæããŸãã
-m4-nofpu
æµ®åå°æ°ç¹ãŠããããªãã§SH4ã®ã³ãŒããçæããŸãã
-m4-ã·ã³ã°ã«ã®ã¿
ã·ã³ã°ã«ã®ã¿ããµããŒãããæµ®åå°æ°ç¹ãŠãããã䜿çšããŠSH4ã®ã³ãŒããçæããŸã-
粟床ã®é«ãæŒç®ã
-m4-ã·ã³ã°ã«
æµ®åå°æ°ç¹ãŠããããå粟床ã¢ãŒãã§ãããšä»®å®ããŠãSH4ã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯
-m4 SH4ã®ã³ãŒããçæããŸãã
-m4-100
SH4-100ã®ã³ãŒããçæããŸãã
-m4-100-nofpu
æµ®åå°æ°ç¹ãŠãããã䜿çšããªãããã«SH4-100ã®ã³ãŒããçæããŠãã ããã
-m4-100-ã·ã³ã°ã«
æµ®åå°æ°ç¹ãŠããããå粟床ã¢ãŒãã§ãããšä»®å®ããŠãSH4-100ã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯
-m4-100-ã·ã³ã°ã«ã®ã¿
å粟床浮åå°æ°ç¹ããªãããã«SH4-100ã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m4-200
SH4-200ã®ã³ãŒããçæããŸãã
-m4-200-nofpu
æµ®åå°æ°ç¹ãŠãããããªããããªæ¹æ³ã§SH4-200ã®ã³ãŒããçæãã
äžå€ã
-m4-200-ã·ã³ã°ã«
æµ®åå°æ°ç¹ãŠããããå粟床ã¢ãŒãã§ãããšä»®å®ããŠãSH4-200ã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯
-m4-200-ã·ã³ã°ã«ã®ã¿
å粟床浮åå°æ°ç¹ããªãããã«SH4-200ã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m4-300
SH4-300ã®ã³ãŒããçæããŸãã
-m4-300-nofpu
æµ®åå°æ°ç¹ãŠãããããªããããªæ¹æ³ã§SH4-300ã®ã³ãŒããçæãã
äžå€ã
-m4-300-ã·ã³ã°ã«
å粟床浮åå°æ°ç¹ããªãããã«SH4-300ã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m4-300-ã·ã³ã°ã«ã®ã¿
å粟床浮åå°æ°ç¹ããªãããã«SH4-300ã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m4-340
SH4-340ã®ã³ãŒããçæããŸãïŒMMUãªããFPUãªãïŒã
-m4-500
SH4-500ïŒFPUãªãïŒã®ã³ãŒããçæããŸãã ãã¹ -isa = sh4-nofpu ã¢ã»ã³ãã©ã«ã
-m4a-nofpu
SH4al-dspãŸãã¯SH4aã®ã³ãŒãããæµ®åå°æ°ç¹ã次ã®ããã«çæããŸãã
åäœã¯äœ¿çšããŸããã
-m4a-ã·ã³ã°ã«ã®ã¿
å粟床浮åå°æ°ç¹ããªãããã«ãSH4aã®ã³ãŒããçæããŸã
æäœã䜿çšãããŸãã
-m4a-ã·ã³ã°ã«
æµ®åå°æ°ç¹ãŠããããå粟床ã§ãããšä»®å®ããŠãSH4aã®ã³ãŒããçæããŸã
ããã©ã«ãã§ã¯ã¢ãŒãã
-m4a
SH4aã®ã³ãŒããçæããŸãã
-m4al
ãšåã -m4a-nofpuãæé»çã«ééããããšãé€ã㊠-dsp ã¢ã»ã³ãã©ã«ã GCC
çŸåšãDSPåœä»€ã¯çæãããŸããã
-m5-32ã¡ãã£ã¢
SHmediaçšã®32ãããã³ãŒããçæããŸãã
-m5-32ã¡ãã£ã¢-nofpu
æµ®åå°æ°ç¹ãŠãããããªãããã«ãSHmediaã®32ãããã³ãŒããçæããŸã
äžå€ã
-m5-64ã¡ãã£ã¢
SHmediaçšã®64ãããã³ãŒããçæããŸãã
-m5-64ã¡ãã£ã¢-nofpu
æµ®åå°æ°ç¹ãŠãããããªãããã«ãSHmediaã®64ãããã³ãŒããçæããŸã
äžå€ã
-m5-ã³ã³ãã¯ã
SHcompactã®ã³ãŒããçæããŸãã
-m5-ã³ã³ãã¯ã-nofpu
æµ®åå°æ°ç¹ãŠãããã䜿çšãããªãããã«ãSHcompactã®ã³ãŒããçæããŸãã
-mb ããã°ãšã³ãã£ã¢ã³ã¢ãŒãã§ããã»ããµã®ã³ãŒããã³ã³ãã€ã«ããŸãã
-ml ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã§ããã»ããµã®ã³ãŒããã³ã³ãã€ã«ããŸãã
-mdalign
ããã«ã¹ã64ãããå¢çã«æããŸãã ããã«ãããåŒã³åºãèŠçŽãå€æŽãããããšã«æ³šæããŠãã ããã
ãããã£ãŠãæšæºCã©ã€ãã©ãªã®äžéšã®é¢æ°ã¯ãåã³ã³ãã€ã«ããªãéãæ©èœããŸããã
ããã¯æåã« -mdalign.
-mãªã©ãã¯ã¹
å¯èœã§ããã°ããªã³ã¯æã«äžéšã®ã¢ãã¬ã¹åç §ãçãããŸãã ãªã³ã«ãŒãªãã·ã§ã³ã䜿çšããŸã
-ãªã©ãã¯ã¹.
-mbigtable
ãã¹ã€ãããããŒãã«ã§ã¯32ããããªãã»ããã䜿çšããŸãã ããã©ã«ãã§ã¯ã16ããããªãã»ããã䜿çšããŸãã
-mbitops
SH2Aã§ãããæäœåœä»€ã®äœ¿çšãæå¹ã«ããŸãã
-mfmovd
åœä»€ãfmovdãã®äœ¿çšãæå¹ã«ããŸãã å°åæ -mdalign ã¢ã©ã€ã³ã¡ã³ãå¶çŽçšã
-ã ã¬ããµã¹
Renesasã«ãã£ãŠå®çŸ©ãããåŒã³åºãèŠçŽã«æºæ ããŸãã
-mno-ã«ããµã¹
ã«ããµã¹ã®èŠçŽã®åã«GCCçšã«å®çŸ©ãããèŠçŽã«æºæ ãã
å©çšå¯èœã§ããã ãã®ãªãã·ã§ã³ã¯ãSHããŒã«ãã§ãŒã³ã®ãã¹ãŠã®ã¿ãŒã²ããã®ããã©ã«ãã§ãã
-mnomacsave
ãMACãã¬ãžã¹ã¿ãã³ãŒã«ã¯ãããŒãšããŠããŒã¯ããŸãã -ã ã¬ããµã¹ äžããããŸãã
-ãã£ãŒ
-mno-ieee
åŠçã«åœ±é¿ãäžããæµ®åå°æ°ç¹æ¯èŒã®IEEEã³ã³ãã©ã€ã¢ã³ã¹ãå¶åŸ¡ããŸã
æ¯èŒã®çµæãé åºä»ããããŠããªãå Žåã®äŸã ããã©ã«ãã§ã¯ -ãã£ãŒ is
æé»çã«æå¹ã«ãªããŸãã ããã -æéæ°åŠã®ã¿ æå¹ã«ãªã£ãŠããŸã -mno-ieee æé»çã«èšå®ããã
ããã«ãããæµ®åå°æ°ç¹ã®å€§çå€ãšéçå€ã®æ¯èŒãé«éåãããŸãã The
æé»ã®èšå®ã¯ã次ã®ãããããæå®ããããšã§ãªãŒããŒã©ã€ãã§ããŸã -ãã£ãŒ or -mno-ieee.
-minline-ic_invalidate
ãã¹ããããé¢æ°ãèšå®ããåŸã«åœä»€ãã£ãã·ã¥ãšã³ããªãç¡å¹ã«ããã€ã³ã©ã€ã³ã³ãŒã
ãã©ã³ããªã³ã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã¯å¹æããããŸããã -musermode æå¹ã§ãããéžæãããŠããŸã
ã³ãŒãçæãªãã·ã§ã³ïŒäŸïŒ -m4ïŒãicbiãåœä»€ã®äœ¿çšãèš±å¯ããŸããã
éžæããã³ãŒãçæãªãã·ã§ã³ã§ãicbiãã®äœ¿çšãèš±å¯ãããŠããªãå Žå
æ瀺ãããã³ -musermode æå¹ã§ã¯ãªãå Žåãã€ã³ã©ã€ã³åãããã³ãŒãã¯
é£æ³æžã蟌ã¿ã䜿çšããŠçŽæ¥åœä»€ãã£ãã·ã¥ã¢ãã¬ã¹é åã ããã ãã§ã¯ãããŸãã
å®è¡æã«ç¹æš©ã¢ãŒããå¿ èŠã§ããããã£ãã·ã¥ã©ã€ã³ã
TLBãä»ããŠãããã³ã°ããããããã³ã°ã解é€ãããŸããã
-ãã¹ãµã€ãº
åœä»€ã®ãµã€ãºãšå Žæãã¢ã»ã³ããªã³ãŒãã«ãã³ãããŸãã
-mpadstruct
ãã®ãªãã·ã§ã³ã¯éæšå¥šã§ãã æ§é äœã4ãã€ãã®åæ°ã«ããã£ã³ã°ããŸãã
SHABIãšäºææ§ããããŸããã
-matomic-model =
ã¢ãããã¯æäœã®ã¢ãã«ãšè¿œå ã®ãã©ã¡ãŒã¿ãŒãã³ã³ãåºåãã§èšå®ããŸã
ãªã¹ãã ã¢ãããã¯çµã¿èŸŒã¿é¢æ°ã®è©³çŽ°ã«ã€ããŠã¯ããåç §ããŠãã ããã __ã¢ããã㯠ãã«ãã€ã³ãéžæããŸãã
次ã®ã¢ãã«ãšãã©ã¡ãŒã¿ããµããŒããããŠããŸãã
ãªã
ã³ã³ãã€ã©ãçæããã¢ãããã¯ã·ãŒã±ã³ã¹ãç¡å¹ã«ããã¢ãããã¯ã®ã©ã€ãã©ãªåŒã³åºããçºè¡ããŸã
ãªãã¬ãŒã·ã§ã³ã ã¿ãŒã²ããããsh*-*-linux*ãã§ãªãå Žåããããããã©ã«ãã§ãã
ãœããã°ãµ
ã¢ãããã¯ãã«ãçšã®GNU/LinuxäºægUSAãœãããŠã§ã¢ã¢ãããã¯ã·ãŒã±ã³ã¹ãçæããŸã-
é¢æ°ã§ã çæãããã¢ãããã¯ã·ãŒã±ã³ã¹ã«ã¯ã
ã·ã¹ãã ã®å²ã蟌ã¿/äŸå€åŠçã³ãŒãã§ãããSH3*ããã³
SH4*ã·ã³ã°ã«ã³ã¢ã·ã¹ãã ã ãã®ãªãã·ã§ã³ã¯ãã¿ãŒã²ããã
ãsh*-*-linux*ãããã³ SH3* ãŸã㯠SH4*ã ã¿ãŒã²ããã SH4A ã®å Žåããã®ãªãã·ã§ã³ã
ããŒããŠã§ã¢ã®ã¢ãããã¯åœä»€ãmovli.lããšãmovco.lããéšåçã«å©çšããŠã
ãªãéããããå¹ççãªã³ãŒããäœæãã å³æ Œãª æå®ãããŠããŸãã
ãœããtcb
ã¹ã¬ããã³ã³ãããŒã«ã§å€æ°ã䜿çšãããœãããŠã§ã¢ã¢ãããã¯ã·ãŒã±ã³ã¹ãçæããŸã
ãããã¯ã ããã¯ãSH1*ã§ã䜿çšã§ããgUSAã·ãŒã±ã³ã¹ã®ããªãšãŒã·ã§ã³ã§ãã
ããã³SH2*ã¿ãŒã²ããã çæãããã¢ãããã¯ã·ãŒã±ã³ã¹ã«ã¯ã
ã·ã¹ãã ã®å²ã蟌ã¿/äŸå€åŠçã³ãŒãã§ããã
ã·ã³ã°ã«ã³ã¢ã·ã¹ãã ã ãã®ã¢ãã«ã䜿çšããå Žåã gbr-offset = ãã©ã¡ãŒã¿ã¯ã§ããå¿ èŠããããŸã
åæ§ã«æå®ãããŸãã
ãœããimask
èšå®ããããšã«ãããå²ã蟌ã¿ãäžæçã«ç¡å¹ã«ãããœãããŠã§ã¢ã¢ãããã¯ã·ãŒã±ã³ã¹ãçæããŸã
ãSR.IMASK=1111ãã ãã®ã¢ãã«ã¯ãããã°ã©ã ãç¹æš©ã¢ãŒãã§å®è¡ãããŠããå Žåã«ã®ã¿æ©èœããŸã
ã·ã³ã°ã«ã³ã¢ã·ã¹ãã ã«ã®ã¿é©ããŠããŸãã ããã®è¿œå ãµããŒã
ã·ã¹ãã ã®å²ã蟌ã¿/äŸå€åŠçã³ãŒãã¯å¿ èŠãããŸããã ãã®ã¢ãã«ã¯
ã¿ãŒã²ããããsh*-*-linux*ãããã³SH1*ãŸãã¯SH2*ã®å Žåãããã©ã«ãã§æå¹ã«ãªããŸãã
ããŒãLLC
ãmovli.lãããã³ãmovco.lãåœä»€ã䜿çšããŠããŒããŠã§ã¢ã¢ãããã¯ã·ãŒã±ã³ã¹ãçæããŸã
ããã ãã ããã¯SH4Aã§ã®ã¿äœ¿çšå¯èœã§ããããã«ãã³ã¢ã·ã¹ãã ã«é©ããŠããŸãã
ããŒããŠã§ã¢åœä»€ã¯32ãããã®ã¢ãããã¯å€æ°ã®ã¿ããµããŒãããŠããããã8ãžã®ã¢ã¯ã»ã¹
ãŸãã¯ã16ãããå€æ°ã¯32ãããã¢ã¯ã»ã¹ã§ãšãã¥ã¬ãŒããããŸãã ããã§ã³ã³ãã€ã«ãããã³ãŒã
ãªãã·ã§ã³ã¯ãä»ã®ãœãããŠã§ã¢ ã¢ããã㯠ã¢ãã«ãšãäºææ§ããããŸãã
SH4A ã·ã¹ãã ã§å®è¡ããå Žåã®å²ã蟌ã¿/äŸå€åŠçã·ã¹ãã ã è¿œå
ã·ã¹ãã ã®å²ã蟌ã¿/äŸå€åŠçã³ãŒãããã®ãµããŒãã¯å¿ èŠãããŸãã
ãã®ã¢ãã«ã®å Žåã
gbr-offset =
ãã®ãã©ã¡ãŒã¿ãŒã¯ãã¹ã¬ããå¶åŸ¡ã®å€æ°ã®ãªãã»ããããã€ãåäœã§æå®ããŸã
çæãããã¢ãããã¯ã·ãŒã±ã³ã¹ã§äœ¿çšããããããã¯æ§é
ãœããtcb ã¢ãã«ãéžæãããŸããã ä»ã®ã¢ãã«ã®å Žåããã®ãã©ã¡ãŒã¿ãŒã¯ç¡èŠãããŸãã
æå®ããå€ã¯ã0ã®æŽæ°åã§ã1020ãXNUMXã®ç¯å²ã§ããå¿ èŠããããŸãã
å³æ Œãª
ãã®ãã©ã¡ãŒã¿ãŒã¯ãè€æ°ã®ã¢ããã㯠ã¢ãã«ã®æ··å䜿çšãé²ããŸãã
äºææ§ããããã³ã³ãã€ã©ã«ã¢ãããã¯ã·ãŒã±ã³ã¹ãçæãããŸã
æå®æ©çš®ã®ã¿ã
-mtas
ã__atomic_test_and_setãã®ãtas.bããªãã³ãŒããçæããŸãã ã«å¿ããŠæ³šæããŠãã ãã
ç¹å®ã®ããŒããŠã§ã¢ããã³ãœãããŠã§ã¢æ§æããã«ãããå šäœçãªããã©ãŒãã³ã¹ãäœäžããå¯èœæ§ããããŸã
ãtas.bãåœä»€ã«ãã£ãŠæ瀺ããããªãã©ã³ããã£ãã·ã¥ã©ã€ã³ãã©ãã·ã¥ãåå ã§ãã ã®äž
ãã«ãã³ã¢SH4Aããã»ããµã®ãtas.bãåœä»€ã¯æ³šæããŠäœ¿çšããå¿ èŠããããŸãã
ç¹å®ã®ãã£ãã·ã¥æ§æã§ããŒã¿ãç Žæããå¯èœæ§ããããŸãã
-mprefergot
äœçœ®ã«äŸåããªãã³ãŒããçæããå Žåã¯ãã°ããŒãã«ãªãã»ããã䜿çšããŠé¢æ°åŒã³åºããçºè¡ããŸã
ããã·ãŒãžã£ãªã³ã±ãŒãžããŒãã«ã®ä»£ããã«ããŒãã«ã
-musermode
-mno-ãŠãŒã¶ãŒã¢ãŒã
ã³ã³ãã€ã©ãç¹æš©ã¢ãŒãã³ãŒããçæããããšãèš±å¯ïŒèš±å¯ïŒããªãã§ãã ããã æå®ãã
-musermode ãŸãæå³ããŸã -mno-inline-ic_invalidate ã€ã³ã©ã€ã³åãããã³ãŒããæ©èœããªãå Žå
ãŠãŒã¶ãŒã¢ãŒãã§ã -musermode ã¿ãŒã²ããããsh*-*-linux*ãã®å Žåã®ããã©ã«ãã§ãã ã®å Žå
ã¿ãŒã²ããã¯SH1*ãŸãã¯SH2*ã§ã -musermode ãŠãŒã¶ãŒã¢ãŒãããªããããå¹æã¯ãããŸããã
-ãã«ãã³ã¹ã=æ°
ä¹ç®insnã§æ³å®ããã³ã¹ããèšå®ããŸãã
-mdiv =æŠç¥
æŽæ°é€ç®æŒç®ã«äœ¿çšããé€ç®æŠç¥ãèšå®ããŸãã SHmediaã®å Žå
æŠç¥ 次ã®ããããã«ãªããŸãã
fp æµ®åå°æ°ç¹ã§æäœãå®è¡ããŸãã ããã«ã¯éåžžã«é«ãã¬ã€ãã³ã·ããããŸããã
ããã€ãã®åœä»€ãããªãã®ã§ãã³ãŒãã«ååãªæ°ãããå Žåã¯è¯ãéžæãããããŸãã
ã³ã³ãã€ã©ãæµ®åå°æ°ç¹ãã¹ã±ãžã¥ãŒã«ã§ããããã«ãããç°¡åã«å©çšã§ããILP
ä»ã®æ瀺ãšäžç·ã«æ瀺ã ãŒãé€ç®ã«ããã
æµ®åå°æ°ç¹äŸå€ã
INV æŽæ°æŒç®ã䜿çšããŠé€æ°ã®éæ°ãèšç®ãã次ã«
被é€æ°ã«éæ°ãæããŸãã ãã®æŠç¥ã«ãããCSEãšå·»ãäžããå¯èœã«ãªããŸã
éèšç®ã®ã ãŒãé€ç®ã¯ãäžç¹å®ã®çµæãèšç®ããŸãã
ãããããã©ããããŸããã
invïŒminlat
ã®å€çš® INV ããã§ãCSEãŸãã¯å·»ãäžãã®æ©äŒãèŠã€ãããªãã£ãå ŽåããŸãã¯
æäœå šäœãåãå Žæã«åŒãäžããããŸããã
éæ°èšç®ã¯ãå šäœãæžããããã«æçµçãªä¹ç®ãšçµ¡ã¿åã£ãŠããŸã
ã¬ã€ãã³ã·ãŒãããã€ãã®ããå€ãã®åœä»€ã䜿çšããããšãç ç²ã«ããŠããããã£ãŠããå°ãªããã®ãæäŸãã
ä»ã®ã³ãŒãã§æ©äŒãã¹ã±ãžã¥ãŒã«ããŸãã
ã³ãŒã«
éåžžã¯ãå®è£ ããã©ã€ãã©ãªé¢æ°ãåŒã³åºããŸã invïŒminlat ã¹ãã©ããžãŒã ãã
ãm5-*media-nofpuãã³ã³ãã€ã«ã«é«ãã³ãŒãå¯åºŠãæäŸããŸãã
call2
åãã©ã€ãã©ãªé¢æ°ã®å¥ã®ãšã³ããªãã€ã³ãã䜿çšããŸãã
ã«ãã¯ã¢ããããŒãã«ãžã®ãã€ã³ã¿ã¯ãã§ã«èšå®ãããŠããããã€ã³ã¿ã®è² è·ãæããã«ãªããŸã
CSEããã³ã³ãŒããã€ã¹ãã®æé©åã
invïŒcall
invïŒcall2
invïŒfp
INV åæã³ãŒãçæã®ã¢ã«ãŽãªãºã ã§ãããã³ãŒããæ®ã£ãŠããå Žå
æé©åãããŠããªãå Žåã¯ã ã³ãŒã«, call2ãŸã㯠fp ããããæŠç¥ã ãäºæ¿ãã ãã
ãŒãé€ç®ã®æœåšçã«ãã©ãããããå¯äœçšã¯ãå¥ã®
åœä»€ãªã®ã§ããã¹ãŠã®æŽæ°åœä»€ãåŒãäžããããå¯èœæ§ããããŸãã
ããããå¯äœçšã®ããŒã«ãŒã¯ãã®ãŸãŸã§ãã ãžã®çµæã
ãã®å Žåãæµ®åå°æ°ç¹æŒç®ãåŒã³åºãã¯ã§ããŸããã
inv20u
inv20l
ã®å€çš® invïŒminlat ã¹ãã©ããžãŒã éèšç®ã®å Žå
ä¹ç®ããåé¢ãããŠããªããããé åœãé©åããåå²ãé«éåãããŸã
ãã¹ããæ¿å ¥ããŠ20ãããïŒè©²åœããå Žåã¯ãã©ã¹èšå·ïŒã«å€æãã
ãã®å Žåã®æäœã ãã®ãã¹ãã¯ãé åœã倧ããå Žåã®é床ãäœäžãããŸãã
inv20u ãã®ãããªå°é¡ã®é åœã®å Žåã¯ããããããªããšä»®å®ãã inv20l
å¯èœæ§ãé«ããšæ³å®ããŠããŸãã
SHmedia以å€ã®ã¿ãŒã²ããã®å Žå æŠç¥ 次ã®ããããã«ãªããŸãã
åŒã³åºã-div1
ã·ã³ã°ã«ã¹ãããé€ç®åœä»€ãdiv1ãã䜿çšããã©ã€ãã©ãªé¢æ°ãåŒã³åºããŠã
æäœãå®è¡ããŸãã ãŒãé€ç®ã¯äžç¹å®ã®çµæãèšç®ãã
ãã©ããããªãã§ãã ããã ããã¯ãSH4ãSH2Aãããã³SHcompactãé€ãããã©ã«ãã§ãã
ã³ãŒã«FP
å粟床浮åå°æ°ç¹ã§æŒç®ãå®è¡ããã©ã€ãã©ãªé¢æ°ãåŒã³åºããŸã
ç¹ã ãŒãã«ããé€ç®ã¯ãæµ®åå°æ°ç¹äŸå€ãåŒãèµ·ãããŸãã ãããããã©ã«ãã§ã
FPUã䜿çšããSHcompactã®å Žåã ããã«ãæããªãã¿ãŒã²ããã«ãããæå®ãã
粟床 FPU ã¯ããã©ã«ãã§ãcall-div1ãã«ãªããŸãã
ã³ãŒã«ããŒãã«
å°ããªé€æ°ã®ã«ãã¯ã¢ããããŒãã«ã䜿çšããã©ã€ãã©ãªé¢æ°ãåŒã³åºããŸãã
倧ããªé€æ°ã®å Žåã¯å€§æåãšå°æåãåºå¥ãããdiv1ãåœä»€ã ãŒãé€ç®
äžç¹å®ã®çµæãèšç®ãããã©ããããŸããã ããã¯SH4ã®ããã©ã«ãã§ãã
åçã·ããåœä»€ãæããªãã¿ãŒã²ããã«å¯ŸããŠãããæå®ãããšã
ããã©ã«ãã¯ãcall-div1ãã§ãã
åå²æŠç¥ãæå®ãããŠããªãå Žåãããã©ã«ãã®æŠç¥ãéžæãããŸã
çŸåšã®ã¿ãŒã²ããã«åºã¥ããŠããŸãã SH2A ã®å Žåãããã©ã«ãã®æŠç¥ã¯ãdivãã䜿çšããããšã§ãã
ã©ã€ãã©ãªé¢æ°åŒã³åºãã®ä»£ããã«ãdivuãåœä»€ã
-maccumulate-çºä¿¡åŒæ°
é¢æ°ããããŒã°ã®åšãã§ã¯ãªããçºä¿¡åŒæ°çšã«XNUMXåã¹ããŒã¹ãäºçŽããŸã
ååŒã³åºãã äžè¬çã«ãããã©ãŒãã³ã¹ãšãµã€ãºã«ã¡ãªããããããŸãã å·»ãæ»ãã«ãå¿ èŠ
æ¡ä»¶ä»ãã³ãŒãã®åšãã®ã¹ã¿ãã¯ãã¬ãŒã ãå€æŽããªãããã«ããããã
-mdivsi3_libfunc =å
32ããã笊å·ä»ãé€ç®ã«äœ¿çšãããã©ã€ãã©ãªé¢æ°ã®ååãã«èšå®ããŸã åã ãã®
ã§äœ¿çšãããååã«ã®ã¿åœ±é¿ããŸã ã³ãŒã« ãš invïŒcall é€ç®æŠç¥ãããã³
ã³ã³ãã€ã©ãŒã¯ããããšåãå ¥å/åºå/ã¯ããŒããŒãããã¬ãžã¹ã¿ãŒã®ã»ãããåŒãç¶ãæåŸ ããŸãã
ãªãã·ã§ã³ããããŸããã§ããã
-mfixed-range =ã¬ãžã¹ã¿ç¯å²
æå®ãããã¬ãžã¹ã¿ç¯å²ãåºå®ã¬ãžã¹ã¿ãšããŠæ±ãã³ãŒããçæããŸãã åºå®ã¬ãžã¹ã¿
ã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã䜿çšã§ããªããã®ã§ãã ããã¯ãã«ãŒãã«ãã³ã³ãã€ã«ãããšãã«åœ¹ç«ã¡ãŸã
ã³ãŒãã ã¬ãžã¹ã¿ç¯å²ã¯ãããã·ã¥ã§åºåãããXNUMXã€ã®ã¬ãžã¹ã¿ãšããŠæå®ãããŸãã å€æ°
ã¬ãžã¹ã¿ç¯å²ã¯ãã³ã³ãã§åºåã£ãŠæå®ã§ããŸãã
-mindexed-addressing
SHmedia32/SHcompactã®ã€ã³ããã¯ã¹ä»ãã¢ãã¬ãã·ã³ã°ã¢ãŒãã®äœ¿çšãæå¹ã«ããŸãã ããã ãã§ã
ããŒããŠã§ã¢ãOSãã€ã³ããã¯ã¹ä»ãã®32ãããã©ããã¢ã©ãŠã³ãã»ãã³ãã£ã¯ã¹ãå®è£ ããŠããå Žåã¯å®å šã§ã
ã¢ãã¬ãã·ã³ã°ã¢ãŒãã ãã®ã¢ãŒããã¯ãã£ã«ããã64ãããã®ããã»ããµãå®è£ ã§ããŸã
MMUãOSã32ãããã¢ãã¬ã¹æå®ãååŸããããã«äœ¿çšã§ããŸãããçŸåšã®ããŒããŠã§ã¢ããªããã
å®è£ ã¯ãã€ã³ããã¯ã¹ä»ãã¢ãã¬ãã·ã³ã°ã¢ãŒããå®å šã«ããããã®ãã®æ¹æ³ãŸãã¯ãã®ä»ã®æ¹æ³ããµããŒãããŸã
32ãããABIã§äœ¿çšããå Žåãããã©ã«ã㯠-mno-indexed-addressing.
-mgettrcost =æ°
ãgettrãåœä»€ã«æ³å®ãããã³ã¹ãã次ã®ããã«èšå®ããŸã æ°ã ããã©ã«ãã¯2ã§ãã
-mpt-ä¿®æ£æžã¿ æå¹ã§ãããã以å€ã®å Žåã¯100ã§ãã
-mpt-ä¿®æ£æžã¿
ãpt*ãåœä»€ã¯ãã©ãããããªããšæ³å®ããŸãã ããã«ãããéåžžãããé©åã«ã¹ã±ãžã¥ãŒã«ãããã³ãŒããçæãããŸãã
ãã ããçŸåšã®ããŒããŠã§ã¢ã§ã¯å®å šã§ã¯ãããŸããã çŸåšã®ã¢ãŒããã¯ãã£å®çŸ©ã§ã¯ã
ãptabsããšãptrelãã¯ãã¿ãŒã²ããã3ã§ããå Žåã«ãã©ããããŸããããã«ã¯ã
ãããã®æ瀺ãåã«ã¹ã±ãžã¥ãŒã«ããããšãå±éºã«ãããããšã®æå³ããªã圱é¿
åå²ããããã«ãŒãããããããæã¡äžããŸãã ããšãã°ãã__ do_global_ctorsããã®äžéš
libgcc ããã°ã©ã ã®èµ·åæã«ã³ã³ã¹ãã©ã¯ã¿ãŒãå®è¡ãããªã¹ãå ã®é¢æ°ãåŒã³åºããŸãã
-1ã§åºåãããŸãã ãšãšãã« -mpt-ä¿®æ£æžã¿ ãªãã·ã§ã³ã®å Žåããptabsãã¯ãã¹ãåã«å®è¡ãããŸã
-1ã«å¯ŸããŠã ã€ãŸãããã¹ãŠã®ã³ã³ã¹ãã©ã¯ã¿ãŒãå°ãéãå®è¡ãããŸããã
ã«ãŒãããªã¹ãã®æåŸã«æ¥ããšããptabsãã-1ãããŒããããããããã°ã©ã ãã¯ã©ãã·ã¥ããŸãã
ã¿ãŒã²ããã¬ãžã¹ã¿ã
ãã®ãªãã·ã§ã³ã¯ãçŸåšã®ã¢ãŒããã¯ãã£ãå®è£ ããŠããããŒããŠã§ã¢ã«ãšã£ãŠå®å šã§ã¯ãªããã
ä»æ§ãããã©ã«ã㯠-mno-pt-ä¿®æ£æžã¿ã æ瀺çã«æå®ãããŠããªãéã
-mgettrcost, -mno-pt-ä¿®æ£æžã¿ ãŸãæå³ããŸã -mgettrcost = 100; ããã¯ç»é²ãé»æ¢ããŸã
éåžžã®æŽæ°ãæ ŒçŽããããã®ã¿ãŒã²ããã¬ãžã¹ã¿ã®äœ¿çšã«ããå²ãåœãŠã
-minvalid-ã·ã³ãã«
ã·ã³ãã«ãç¡å¹ã§ããå¯èœæ§ããããšæ³å®ããŸãã ã³ã³ãã€ã©ã«ãã£ãŠçæãããéåžžã®é¢æ°ã·ã³ãã«
ãmoviã/ãshoriã/ãptabsããŸãã¯ãmoviã/ãshoriã/ãptrelãã§ããŒãããã®ã¯åžžã«æå¹ã§ããã
ã¢ã»ã³ãã©ããªã³ã«ã®ããªãã¯ã䜿çšãããšãåå ãšãªãã·ã³ãã«ãçæããããšãã§ããŸã
ãã©ãããããptabsããŸãã¯ãptrelãã ãã®ãªãã·ã§ã³ã¯ã次ã®å Žåã«ã®ã¿æå³ããããŸã -mno-pt-ä¿®æ£æžã¿ ã§ãã
å¹æã ã¯ãã¹ããŒã·ãã¯ãããã¯CSEãå·»ãäžããããã³ã·ã³ãã«ã®ã»ãšãã©ã®ã¹ã±ãžã¥ãŒãªã³ã°ãé²æ¢ããŸã
è² è·ã ããã©ã«ã㯠-mno-ç¡å¹ãªã·ã³ãã«.
-mbranch-cost =NUM
æ³å®ãã NUM åå²åœä»€ã®ã³ã¹ãã«ãªããŸãã æ°å€ã倧ããã»ã©ã³ã³ãã€ã©ã¯äœæãããŸã
å¯èœã§ããã°ãããå€ãã®ãã©ã³ãããªãŒã³ãŒããçæããŠã¿ãŠãã ããã æå®ãããŠããªãå Žåãå€ã¯
ã³ã³ãã€ã«å¯Ÿè±¡ã®ããã»ããµã¿ã€ãã«å¿ããŠéžæãããŸãã
-mzdcbranch
-mno-zdcbranch
ãŒãå€äœæ¡ä»¶åå²åœä»€ããbtãã§ãããšä»®å®ããŸãïŒä»®å®ããªãã§ãã ããïŒã
ãbfãã¯é«éã§ãã ããã -mzdcbranch ãæå®ãããŠããå Žåãã³ã³ãã€ã©ã¯ãŒããåªå ããããšããŸã
眮æãã©ã³ã ã³ãŒã ã·ãŒã±ã³ã¹ã ããã¯ãã³ãŒãçææã«ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
SH4ãSH4Açšã æå®ããããšã§æ瀺çã«ç¡å¹ã«ããããšãã§ããŸã -mno-zdcbranch.
-æ··ä¹±-çã£ã
-mno-fusion-madd
æµ®åå°æ°ç¹ã®ç©åã䜿çšããïŒäœ¿çšããªãïŒã³ãŒããçæãã
æ瀺ã ãããã®åœä»€ã¯ãããŒããŠã§ã¢æµ®åå°æ°ç¹ã®å Žåãããã©ã«ãã§çæãããŸã
䜿çšãããŠããã ãã·ã³ã«äŸå -æ··ä¹±-çã£ã ãªãã·ã§ã³ããã·ã³ã«ããããããããã«ãªããŸãã-
ç¬ç«ããŸãã -ffp-contract = fast ãªãã·ã§ã³ãããã³ -mno-fusion-madd ã«ãããã³ã°ãããŠããŸã
-ffp-contract = off.
-mfsca
-mno-fsca
ã³ã³ãã€ã©ããµã€ã³ããã³ã³ãµã€ã³ã®ãfscaãåœä»€ãçºè¡ããããšãèš±å¯ãŸãã¯çŠæ¢ããŸã
è¿äŒŒã ãªãã·ã§ã³ã-mfscaãã¯ã
"-funsafe-math-optimizations". ã®ã³ãŒãçææã«ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
SH4Aã ã-mno-fscaãã䜿çšãããšããµã€ã³ããã³ã³ãµã€ã³è¿äŒŒãç¡å¹ã«ãªããŸãã
ã-funsafe-math-optimizationsããæå¹ã§ãã
-mfsrra
-mno-fsrra
ã³ã³ãã€ã©ãéæ°äºä¹ã®ãfsrraãåœä»€ãçºè¡ããããšãèš±å¯ãŸãã¯çŠæ¢ããŸã
ã«ãŒãè¿äŒŒã ãªãã·ã§ã³ã-mfsrraãã¯ã
ã-funsafe-math-optimizationsãããã³ã-ffinite-math-onlyãã ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã
SH4A ã®ã³ãŒããçæããŸãã ã-mno-fsrraãã䜿çšãããšãå¹³æ¹æ ¹ã®éæ°ãç¡å¹ã«ãªããŸã
ã-funsafe-math-optimizationsããšã-ffinite-math-onlyããå«ãŸããŠããå Žåã§ãè¿äŒŒ
å¹æã
-mpreend-cmove
æ¡ä»¶ä»ã移ååœä»€ã«ã¯ããŒãå€äœæ¡ä»¶ä»ãåå²ãåªå ããŸã
ãã¿ãŒã³ã ããã«ãããSH4ããã»ããµã®ã³ãŒããé«éã«ãªãå¯èœæ§ããããŸãã
ãœã©ãªã¹ 2 ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯Solaris2ã§ãµããŒããããŠããŸãïŒ
-mclear-hwcap
-mclear-hwcap ã«ãã£ãŠçæãããããŒããŠã§ã¢æ©èœãåé€ããããã«ã³ã³ãã€ã©ã«æ瀺ããŸã
Solarisã¢ã»ã³ãã©ã ããã¯ããªããžã§ã¯ããã¡ã€ã«ãISAæ¡åŒµæ©èœã䜿çšããŠããªãå Žåã«ã®ã¿å¿ èŠã§ãã
çŸåšã®ãã·ã³ã§ãµããŒããããŠããŸãããå®è¡æã«ãããã䜿çšãããã©ããã確èªããŠãã ããã
-mimpure-ããã¹ã
-mimpure-ããã¹ããã«å ããŠäœ¿çš -å ±æãã³ã³ãã€ã©ã«æž¡ããªãããã«æ瀺ããŸã -z íŽëŒì°ë êž°ë° AI/MLë° ê³ ì±ë¥ 컎íší ì íµí ëì§íž ížìì êž°ìŽ â Edward Hsu, Rescale CPO ë§ì ìì§ëìŽë§ ì€ì¬ êž°ì ìê² íŽëŒì°ëë R&Dëì§íž ì íì 첫 ëšê³ìŒ ë¿ì ëë€. íŽëŒì°ë ììì íì©íŽ ìì§ëìŽë§ íì ì ìœì íŽê²°íë ëšê³ë¥Œ ëìŽ, ì뮬ë ìŽì ìŽìì íµí©íê³ ìµì ííë©°, ê¶ê·¹ì ìŒë¡ë ëªšëž êž°ë°ì íì 곌 ìì¬ ê²°ì ì ì§ìíì¬ ì ì íì ê²°ì í ë ë°ìŽí° êž°ë° ìì§ëìŽë§ì ì ì©íê³ ì í©ëë€. Rescaleì ìŽë¬í íì ì ëêž° ìíŽ ì»Žíší ì¶ì² ìì§, íµí© ë°ìŽí° íšëžëŠ, ë©íë°ìŽí° êŽëŠ¬ ë±ì ê°ë°íê³ ììµëë€. ìŽë² ì늬륌 ë¹ë € ë¹ìŠëì€ ê²œìë ¥ ì ê³ ë¥Œ ìí ëì§íž ížì ë° ëì§íž ì€ë ë ì ëµ ê°ë° ë°©ë²ì ëí ìžì¬ìŽížë¥Œ ëëê³ ì í©ëë€. ããž
å ±æãªããžã§ã¯ãããªã³ã¯ãããšãã®ãªã³ã«ã ãã®ãªãã·ã§ã³ã䜿çšãããšãäœçœ®ããªã³ã¯ã§ããŸã-
å ±æãªããžã§ã¯ããžã®äŸåã³ãŒãã
-mimpure-ããã¹ã ãåé 眮ã¯å²ãåœãŠå¯èœã§ãããæžã蟌ã¿å¯èœã§ã¯ãªããŸãŸã§ããããæå¶ããŸã
ã»ã¯ã·ã§ã³ããªã³ã«ãŒãšã©ãŒã¡ãã»ãŒãžããã ããå¿ èŠãªåé 眮ã«ãããã³ããŒãªã³ãããªã¬ãŒãããŸãã
æžã蟌ã¿ãããã³å ±æãªããžã§ã¯ãã¯å®éã«ã¯ããã»ã¹éã§å ±æãããŸããã ãã以å€ã®
-mimpure-ããã¹ãããã¹ãŠã®ãœãŒã¹ã³ãŒãã次ã®ããã«ã³ã³ãã€ã«ããå¿ èŠããããŸã -fpic or -fPIC.
ãããã®ã¹ã€ããã¯ãSolaris2ã§äžèšã«å ããŠãµããŒããããŠããŸãã
-pã¹ã¬ãã
POSIXã¹ã¬ããã©ã€ãã©ãªã䜿çšãããã«ãã¹ã¬ããã®ãµããŒããè¿œå ããŸãã ãã®ãªãã·ã§ã³ã»ãã
ããªããã»ããµãšãªã³ã«ã®äž¡æ¹ã®ãã©ã°ã ãã®ãªãã·ã§ã³ã¯ã¹ã¬ããã«ã¯åœ±é¿ããŸãã
ã³ã³ãã€ã©ã«ãã£ãŠçæããããªããžã§ã¯ãã³ãŒããŸãã¯ã³ã³ãã€ã©ã«ä»å±ã®ã©ã€ãã©ãªã®å®å šæ§ã
-pthread
ããã¯ã®å矩èªã§ã -pã¹ã¬ãã.
SPARC ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯SPARCã§ãµããŒããããŠããŸãã
-mno-app-regs
-map-regs
æå® -map-regs ã°ããŒãã«ã¬ãžã¹ã¿2ãã4ã䜿çšããŠåºåãçæããŸãã
SPARCSVR4ABIã¯ã¢ããªã±ãŒã·ã§ã³çšã«äºçŽãããŠããŸãã ã°ããŒãã«ã¬ãžã¹ã¿1ãšåæ§ã«ãåã°ããŒãã«
ã¬ãžã¹ã¿ãŒ2ãã4ã¯ãå²ãåœãŠå¯èœãªã¬ãžã¹ã¿ãŒãšããŠæ±ãããŸãã
é¢æ°åŒã³åºãã ãããããã©ã«ãã§ãã
ããã©ãŒãã³ã¹ã®äœäžãç ç²ã«ããŠSVR4ABIã«å®å šã«æºæ ããã«ã¯ã次ã®ããã«æå®ããŸãã
-mno-app-regsã ãã®ãªãã·ã§ã³ã䜿çšããŠãã©ã€ãã©ãªãšã·ã¹ãã ãœãããŠã§ã¢ãã³ã³ãã€ã«ããå¿ èŠããããŸãã
-mãã©ãã
-mno-ãã©ãã
é£çµ¡å -mãã©ãããã³ã³ãã€ã©ã¯ä¿å/埩å åœä»€ãçæããã
ããã©ããããŸãã¯ã·ã³ã°ã«ã¬ãžã¹ã¿ãŠã£ã³ããŠã¢ãã«ã ãã®ã¢ãã«ã¯éåžžã®ã¢ãã«ãšäºææ§ããããŸã
ã¬ãžã¹ã¿ãŠã£ã³ããŠã¢ãã«ã ããŒã«ã«ã¬ãžã¹ã¿ãšå ¥åã¬ãžã¹ã¿ïŒ0ã5ïŒã¯ãŸã æ®ã£ãŠããŸã
ãåŒã³åºãä¿åãã¬ãžã¹ã¿ãšããŠæ±ãããå¿ èŠã«å¿ããŠã¹ã¿ãã¯ã«ä¿åãããŸãã
é£çµ¡å -mno-ãã©ãã ïŒããã©ã«ãïŒãã³ã³ãã€ã©ãŒã¯ä¿å/埩å åœä»€ãçæããŸãïŒãã ã
ãªãŒãæ©èœçšïŒã ããã¯éåžžã®åäœã¢ãŒãã§ãã
-mfpu
-mhard-float
æµ®åå°æ°ç¹åœä»€ãå«ãåºåãçæããŸãã ãããããã©ã«ãã§ãã
-mno-fpu
-msoft-float
æµ®åå°æ°ç¹ã®ã©ã€ãã©ãªåŒã³åºããå«ãåºåãçæããŸãã èŠåïŒ å¿ èŠæ¡ä»¶
ã©ã€ãã©ãªã¯ããã¹ãŠã®SPARCã¿ãŒã²ããã§äœ¿çšã§ããããã§ã¯ãããŸããã éåžžã
ãã·ã³ã®éåžžã®Cã³ã³ãã€ã©ã䜿çšãããŸããããããã¯ãã¹ã§çŽæ¥å®è¡ããããšã¯ã§ããŸããã
ã³ã³ãã€ã«ã é©åãªã©ã€ãã©ãªãæäŸããã«ã¯ãç¬èªã®æé ãè¡ãå¿ èŠããããŸã
ã¯ãã¹ã³ã³ãã€ã«ã®ããã®é¢æ°ã åã蟌ãŸããã¿ãŒã²ãã sparc-*-aout ãš ã¹ãã¯ã©ã€ã-*-*
ãœãããŠã§ã¢æµ®åå°æ°ç¹ãµããŒããæäŸããŸãã
-msoft-float åºåãã¡ã€ã«ã®åŒã³åºãèŠçŽãå€æŽããŸãã ãããã£ãŠãããã¯
ã³ã³ãã€ã«ããå Žåã«äŸ¿å©ã§ã ã ãã®ãªãã·ã§ã³ã䜿çšããããã°ã©ã ã®ç¹ã«ãããªãã¯ããå¿ èŠããããŸã
ã³ã³ãã€ã« libgcc.aãGCCã«ä»å±ããã©ã€ãã©ãª -msoft-float ãã®ããã«
åäœããããã«ã
-mhard-quad-float
ã¯ã¢ããã¯ãŒãïŒlong doubleïŒæµ®åå°æ°ç¹åœä»€ãå«ãåºåãçæããŸãã
-msoft-quad-float
ã¯ã¢ããã¯ãŒãïŒlong doubleïŒæµ®åå°æ°ç¹ã®ã©ã€ãã©ãªåŒã³åºããå«ãåºåãçæããŸã
æ瀺ã åŒã³åºãããé¢æ°ã¯ãSPARCABIã§æå®ãããŠããé¢æ°ã§ãã ããã¯
ããã©ã«ãã
ãã®èšäºã®å·çæç¹ã§ã¯ãããŒããŠã§ã¢ããµããŒãããSPARCå®è£ ã¯ãããŸããã
ã¯ã¯ããã¯ãŒãæµ®åå°æ°ç¹åœä»€ã ãããã¯ãã¹ãŠã次ã®ããããã®ãã©ãããã³ãã©ãŒãåŒã³åºããŸãã
ãããã®åœä»€ããããŠãã©ãããã³ãã©ãŒã¯åœä»€ã®å¹æããšãã¥ã¬ãŒãããŸãã
ãã©ãããã³ãã©ã®ãªãŒããŒãããã®ãããããã¯ABIã©ã€ãã©ãªãåŒã³åºããããã¯ããã«äœéã§ãã
ã«ãŒãã³ã ãããã£ãŠã -msoft-quad-float ãªãã·ã§ã³ãããã©ã«ãã§ãã
-mno-unaligned-doubles
-äžæŽåããã«ã¹
doubleã«ã¯8ãã€ãã®ã¢ã©ã€ã³ã¡ã³ãããããšæ³å®ããŸãã ãããããã©ã«ãã§ãã
é£çµ¡å -äžæŽåããã«ã¹ãGCCã¯ãdoubleã8ãã€ãã®ã¢ã©ã€ã³ã¡ã³ããæã£ãŠãããšæ³å®ããã®ã¯ã
å¥ã®ã¿ã€ãã«å«ãŸããŠããå ŽåããŸãã¯çµ¶å¯Ÿã¢ãã¬ã¹ãããå Žåã ããã§ãªããã°ããã
ãããã4ãã€ãã®ã¢ã©ã€ã³ã¡ã³ããæã£ãŠãããšä»®å®ããŸãã ãã®ãªãã·ã§ã³ãæå®ãããšããŸããªåé¡ãåé¿ã§ããŸã
ä»ã®ã³ã³ãã€ã©ã«ãã£ãŠçæãããã³ãŒããšã®äºææ§ã®åé¡ã ããã©ã«ãã§ã¯ãããŸãã
ç¹ã«æµ®åå°æ°ç¹ã³ãŒãã®å Žåãããã©ãŒãã³ã¹ãäœäžããããã§ãã
-ãã¥ãŒã¶ãŒã¢ãŒã
-mno-ãŠãŒã¶ãŒã¢ãŒã
ã¹ãŒããŒãã€ã¶ãŒã¢ãŒãã§ã®ã¿å®è¡ã§ããã³ãŒããçæããªãã§ãã ããã ããã¯ã«ã®ã¿é¢é£ããŸã
LEON3 ããã»ããµçšã«çºè¡ããããcasaãåœä»€ã ããã©ã«ãã¯
-mno-ãŠãŒã¶ãŒã¢ãŒã.
-mno-faster-structs
-mfaster-æ§é äœ
é£çµ¡å -mfaster-æ§é äœãã³ã³ãã€ã©ã¯ãæ§é äœã8ãã€ãã§ãããšæ³å®ããŸã
ã¢ã©ã€ã³ã¡ã³ãã ããã«ãããã³ããŒã«ãlddããšãstdãã®åœä»€ã®ãã¢ã䜿çšã§ããããã«ãªããŸã
æ§é äœã®å²ãåœãŠã§ã¯ããldããšãstãã®ãã¢ã®XNUMXåã®ä»£ããã«ã ããã
ãã®å€æŽãããé 眮ã䜿çšãããšãSPARCABIã«çŽæ¥éåããŸãã ãããã£ãŠãããã¯æå³ãããŠããŸã
çµæã®ã³ãŒãã
ABIã®èŠåã«çŽæ¥äžèŽããŠããŸããã
-mcpu =cpu_type
ã®åœä»€ã»ãããã¬ãžã¹ã¿ã»ãããããã³åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã
ãã·ã³ã¿ã€ã cpu_typeã ãµããŒããããŠããå€ cpu_type ã v7, ãµã€ãã¬ã¹, v8, ã¹ãŒããŒã¹ããŒã¯,
ãã€ããŒã¹ããŒã¯, ã¬ãªã³, leon3, ã¬ãªã³3v7, ã¹ãã¯ã©ã€ã, f930, f934, ã¹ãã¯ã©ã€ã86x, ã¹ãã¯ã¬ãã,
tsc701, v9, ãŠã«ãã©ã¹ããŒã¯, ãŠã«ãã©ã¹ããŒã¯3, ãã€ã¢ã¬ã©, ãã€ã¢ã¬ã©2, ãã€ã¢ã¬ã©3 ãš ãã€ã¢ã¬ã©4.
ãã€ãã£ãSolarisããã³GNU/LinuxããŒã«ãã§ãŒã³ãå€ããµããŒãããŸã ãã€ãã£ãããéžæããŸã
ãã¹ãããã»ããµã«æé©ãªã¢ãŒããã¯ãã£ãªãã·ã§ã³ã -mcpu = native 次ã®å Žåã¯å¹æããããŸãã
GCCã¯ããã»ããµãèªèããŸããã
ããã©ã«ãã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ã¯ã
ã¢ãŒããã¯ãã£ã§ãããå®è£ ã§ã¯ãããŸããã ããã㯠v7, v8, ã¹ãã¯ã©ã€ã, ã¹ãã¯ã¬ãã, v9.
ãµããŒããããŠããåã¢ãŒããã¯ãã£ãšãµããŒããããŠããå®è£ ã®ãªã¹ãã次ã«ç€ºããŸãã
v7ããããleon3v7
v8 supersparcãhypersparcãleonãleon3
ã¹ãã¯ã©ã€ã
f930ãf934ãsparclite86x
ã¹ãã¯ã¬ãã
tsc701
v9 ultrasparcãultrasparc3ãniagaraãniagara2ãniagara3ãniagara4
ããã©ã«ãã§ã¯ïŒç¹ã«èšå®ãããŠããªãéãïŒãGCCã¯V7ããªã¢ã³ãã®ã³ãŒããçæããŸã
SPARCã¢ãŒããã¯ãã£ã ãš -mcpu = cypressãã³ã³ãã€ã©ã¯ããã«ãããæé©åããŸã
SPARCStation /SPARCServer7xxã·ãªãŒãºã§äœ¿çšãããŠããCypressCY602C3ãããã ããã¯
å€ãSPARCStation1ã2ãIPXãªã©ã«ãé©ããŠããŸãã
é£çµ¡å -mcpu = v8ãGCCã¯ãSPARCã¢ãŒããã¯ãã£ã®V8ããªã¢ã³ãã®ã³ãŒããçæããŸãã The
V7ã³ãŒããšã®å¯äžã®éãã¯ãã³ã³ãã€ã©ãæŽæ°ã®ä¹ç®ãš
SPARC-V8ã«ã¯ååšããããSPARC-V7ã«ã¯ååšããªãæŽæ°é€ç®åœä»€ã ãš
-mcpu = supersparcãã³ã³ãã€ã©ã¯ããã«ãSuperSPARCãããçšã«æé©åããŸãã
SPARCStation 10ã1000ãããã³2000ã·ãªãŒãºã§äœ¿çšãããŸãã
é£çµ¡å -mcpu = sparcliteãGCCã¯ãSPARCã®SPARCliteããªã¢ã³ãã®ã³ãŒããçæããŸã
建ç¯ã ããã«ãããæŽæ°ã®ä¹ç®ãæŽæ°ã®é€ç®ã®ã¹ããããšã¹ãã£ã³ïŒ "ffs"ïŒãè¿œå ãããŸãã
SPARCliteã«ã¯ååšããããSPARC-V7ã«ã¯ååšããªãåœä»€ã ãš -mcpu = f930
ã³ã³ãã€ã©ã¯ããã«ãå ã®å¯å£«éMB86930ãããçšã«æé©åããŸã
SPARCliteãFPUãªãã ãš -mcpu = f934ãã³ã³ãã€ã©ã¯ããã«ãããæé©åããŸã
FPUãæèŒããææ°ã®SPARCliteã§ããFujitsuMB86934ãããã
é£çµ¡å -mcpu = sparcletãGCCã¯ãSPARCã®SPARCletããªã¢ã³ãã®ã³ãŒããçæããŸã
建ç¯ã ããã«ãããæŽæ°ã®ä¹ç®ãä¹ç®/环ç©ãæŽæ°ã®é€ç®ãè¿œå ãããŸã
SPARCletã«ã¯ååšããããSPARC-V7ã«ã¯ååšããªãã¹ãããã¢ã³ãã¹ãã£ã³ïŒ "ffs"ïŒåœä»€ã ãš
-mcpu = tsc701ãã³ã³ãã€ã©ã¯ããã«TEMICSPARCletãããçšã«æé©åããŸãã
é£çµ¡å -mcpu = v9ãGCCã¯ãSPARCã¢ãŒããã¯ãã£ã®V9ããªã¢ã³ãã®ã³ãŒããçæããŸãã ãã
64ãããæŽæ°ããã³æµ®åå°æ°ç¹ç§»ååœä»€ãè¿œå ããããã«3ã€ã®æµ®åå°æ°ç¹ãè¿œå ããŸã
æ¡ä»¶ã³ãŒãã¬ãžã¹ã¿ãšæ¡ä»¶ä»ã移ååœä»€ã ãš -mcpu = ultrasparc,
ã³ã³ãã€ã©ã¯ããã«ãSun UltraSPARC I / II/IIiãããçšã«æé©åããŸãã ãš
-mcpu = ultrasparc3ãã³ã³ãã€ã©ã¯ããã«SunUltraSPARCçšã«æé©åããŸã
III / III + / IIIi / IIIi + / IV /IV+ãããã ãš -mcpu = niagaraãã³ã³ãã€ã©ã¯ããã«
SunUltraSPARCT1ãããçšã«æé©åããŸãã ãš -mcpu = niagara2ãã³ã³ãã€ã©
ããã«ãSunUltraSPARCT2ãããçšã«æé©åããŸãã ãš -mcpu = niagara3
ã³ã³ãã€ã©ã¯ããã«ãSunUltraSPARCT3ãããçšã«æé©åããŸãã ãš -mcpu = niagara4,
ã³ã³ãã€ã©ã¯ããã«ãSunUltraSPARCT4ãããçšã«æé©åããŸãã
-mtune =cpu_type
ãã·ã³ã¿ã€ãã®åœä»€ã¹ã±ãžã¥ãŒãªã³ã°ãã©ã¡ãŒã¿ãèšå®ããŸã cpu_typeããã ãèšå®ããªã
ãªãã·ã§ã³ã®åœä»€ã»ãããŸãã¯ã¬ãžã¹ã¿ã»ãã -mcpu =cpu_type ãããŸããã
ã®åãå€ -mcpu =cpu_type 以äžã®ããã«äœ¿çšããããšãã§ããŸã -mtune =cpu_typeããããå¯äž
æçšãªå€ã¯ãç¹å®ã®CPUå®è£ ãéžæããå€ã§ãã ãããã¯
ãµã€ãã¬ã¹, ã¹ãŒããŒã¹ããŒã¯, ãã€ããŒã¹ããŒã¯, ã¬ãªã³, leon3, ã¬ãªã³3v7, f930, f934, ã¹ãã¯ã©ã€ã86x,
tsc701, ãŠã«ãã©ã¹ããŒã¯, ãŠã«ãã©ã¹ããŒã¯3, ãã€ã¢ã¬ã©, ãã€ã¢ã¬ã©2, ãã€ã¢ã¬ã©3 ãš ãã€ã¢ã¬ã©4
ãã€ãã£ãSolarisããã³GNU/LinuxããŒã«ãã§ãŒã³ã ãã€ãã£ã ã䜿çšããããšãã§ããã
-mv8plus
-mno-v8plus
é£çµ¡å -mv8plusãGCCã¯SPARC-V8+ABIã®ã³ãŒããçæããŸãã V8ãšã®éã
ABIã¯ãã°ããŒãã«ã¬ãžã¹ã¿ãšåºåã¬ãžã¹ã¿ã64ãããå¹ ãšèŠãªãããããšã§ãã ããã¯æå¹ã§ã
ããã©ã«ãã§ã¯ããã¹ãŠã®SPARC-V32ããã»ããµã®9ãããã¢ãŒãã®Solarisã
-mvis
-mno-vis
é£çµ¡å -mvisãGCCã¯ãUltraSPARCVisualãå©çšããã³ãŒããçæããŸã
åœä»€ã»ããæ¡åŒµã ããã©ã«ã㯠-mno-vis.
-mvis2
-mno-vis2
é£çµ¡å -mvis2ãGCCã¯ãUltraSPARCã®ããŒãžã§ã³2.0ãå©çšããã³ãŒããçæããŸã
ããžã¥ã¢ã«ã€ã³ã¹ãã©ã¯ã·ã§ã³ã»ããã®æ¡åŒµæ©èœã ããã©ã«ã㯠-mvis2 ãã®CPUãã¿ãŒã²ããã«ãããšã
UltraSPARC-III以éãªã©ã®ãã®ãããªåœä»€ããµããŒãããŸãã èšå® -mvis2 ãŸã
ã»ãã -mvis.
-mvis3
-mno-vis3
é£çµ¡å -mvis3ãGCCã¯ãUltraSPARCã®ããŒãžã§ã³3.0ãå©çšããã³ãŒããçæããŸã
ããžã¥ã¢ã«ã€ã³ã¹ãã©ã¯ã·ã§ã³ã»ããã®æ¡åŒµæ©èœã ããã©ã«ã㯠-mvis3 ãã®CPUãã¿ãŒã²ããã«ãããšã
niagara-3以éãªã©ã®ãã®ãããªåœä»€ããµããŒãããŸãã èšå® -mvis3 ã»ããã
-mvis2 ãš -mvis.
-mcbcond
-mno-cbcond
é£çµ¡å -mcbcondãGCCã¯ãæ¯èŒãšåå²ãå©çšããã³ãŒããçæããŸã
SparcArchitecture2011ã§å®çŸ©ãããŠããåœä»€ãããã©ã«ã㯠-mcbcond ãã€
niagara-4以éãªã©ã®ãã®ãããªåœä»€ããµããŒãããCPUãã¿ãŒã²ããã«ããŸãã
-mpopc
-mno-popc
é£çµ¡å -mpopcãGCCã¯ãUltraSPARCããã¥ã¬ãŒã·ã§ã³ãå©çšããã³ãŒããçæããŸã
ã«ãŠã³ãåœä»€ã ããã©ã«ã㯠-mpopc ãã®ãããªãã®ããµããŒãããCPUãã¿ãŒã²ããã«ããå Žå
Niagara-2以éãªã©ã®æ瀺ã
-mfmaf
-mno-fmaf
é£çµ¡å -mfmafãGCCã¯ãUltraSPARCFusedMultiplyãå©çšããã³ãŒããçæããŸã-
æµ®åå°æ°ç¹æ¡åŒµãè¿œå ããŸãã ããã©ã«ã㯠-mfmaf ãã®CPUãã¿ãŒã²ããã«ãããšã
Niagara-3以éãªã©ã®ãã®ãããªåœä»€ããµããŒãããŸãã
-mfix-at697f
AtmelAT697Fããã»ããµã®åäžã®æ£èª€è¡šã«ã€ããŠææžåãããåé¿çãæå¹ã«ããŸã
ïŒAT13Eããã»ããµã®ãšã©ãã¿ïŒ697ã«å¯Ÿå¿ããŸãïŒã
-mfix-ut699
æµ®åå°æ°ç¹ãšã©ãã¿ãšããŒã¿ãã£ãã·ã¥ã®ææžåãããåé¿çãæå¹ã«ãã
UT699ããã»ããµã®ãšã©ãã¿ãç¡å¹ã«ããŸãã
ããŒãã³ -m 9ãããã®SPARC-V64ããã»ããµã§ã¯ãäžèšã«å ããŠãªãã·ã§ã³ããµããŒããããŠããŸã
ç°å¢ïŒ
-m32
-m64
32ããããŸãã¯64ãããç°å¢çšã®ã³ãŒããçæããŸãã 32ãããç°å¢ã¯intãèšå®ããŸãã
longããã³32ããããžã®ãã€ã³ã¿ã 64ãããç°å¢ã§ã¯ãintã32ãããããã³longã«èšå®ãããŸãã
64ããããžã®ãã€ã³ã¿ã
-mcmodel =which
ã³ãŒãã¢ãã«ã次ã®ããããã«èšå®ããŸã
ã¡ãããŠ
ããã£ã¢ã /ããŒã³ãŒãã¢ãã«ïŒ64ãããã¢ãã¬ã¹ãããã°ã©ã ã¯ããŒ32ã§ãªã³ã¯ããå¿ èŠããããŸã
ã¡ã¢ãªã®ãããã ããã°ã©ã ã¯éçãŸãã¯åçã«ãªã³ã¯ã§ããŸãã
ãããããã
ããã£ã¢ã /ããã«ã³ãŒãã¢ãã«ïŒ64ãããã¢ãã¬ã¹ãããã°ã©ã ã¯ããŒã§ãªã³ã¯ããå¿ èŠããããŸã
44ãããã®ã¡ã¢ãªãããã¹ãããã³ããŒã¿ã»ã°ã¡ã³ãã®ãµã€ãºã¯2GBæªæºã§ããå¿ èŠããããŸãã
ããŒã¿ã»ã°ã¡ã³ãã¯ãããã¹ãã»ã°ã¡ã³ããã2GB以å ã«é 眮ããå¿ èŠããããŸãã
ã¡ãã³
äž/ã©ãã§ãã³ãŒãã¢ãã«ïŒ64ãããã¢ãã¬ã¹ãããã°ã©ã ã¯ã©ãã«ã§ããªã³ã¯ã§ããŸã
ã¡ã¢ãªå ã§ã¯ãããã¹ãã»ã°ã¡ã³ããšããŒã¿ã»ã°ã¡ã³ãã®ãµã€ãºãšããŒã¿ã®ãµã€ãºã¯2GBæªæºã§ããå¿ èŠããããŸã
ã»ã°ã¡ã³ãã¯ãããã¹ãã»ã°ã¡ã³ããã2GB以å ã«é 眮ããå¿ èŠããããŸãã
åã蟌ã¿
çµã¿èŸŒã¿ã·ã¹ãã ã®Medium/Anywhereã³ãŒãã¢ãã«ïŒ64ãããã¢ãã¬ã¹ãããã¹ã
ããŒã¿ã»ã°ã¡ã³ãã®ãµã€ãºã¯2GBæªæºã§ããå¿ èŠããããã©ã¡ããã¡ã¢ãªå ã®ã©ãããã§ãéå§ã§ããŸã
ïŒãªã³ã¯æã«æ±ºå®ãããŸãïŒã ã°ããŒãã«ã¬ãžã¹ã¿ïŒ g4ã¯ããŒã¿ã®ããŒã¹ãæããŸã
ã»ã°ã¡ã³ãã ããã°ã©ã ã¯éçã«ãªã³ã¯ãããŠãããPICã¯ãµããŒããããŠããŸããã
-mmemory-model =ã¡ã¢ãªã¢ãã«
ããã»ããµã§æå¹ãªã¡ã¢ãªã¢ãã«ã次ã®ããããã«èšå®ããŸãã
ããã©ã«ã
ããã»ããµãšãªãã¬ãŒãã£ã³ã°ã·ã¹ãã ã®ããã©ã«ãã®ã¡ã¢ãªã¢ãã«ã
RMO ãªã©ãã¯ã¹ããã¡ã¢ãªé åº
pso éšåçãªã¹ãã¢æ³šæ
tso ç·åºè泚æ
sc é次äžè²«æ§
ãããã®ã¡ã¢ãªã¢ãã«ã¯ãSparcV9ã¢ãŒããã¯ãã£ã®ä»é²Dã§æ£åŒã«å®çŸ©ãããŠããŸãã
ããã»ããµã®ãPSTATE.MMããã£ãŒã«ãã«èšå®ãããŠããæåã
-mstack-ãã€ã¢ã¹
-mno-ã¹ã¿ãã¯ãã€ã¢ã¹
é£çµ¡å -mstack-ãã€ã¢ã¹ãGCCã¯ãã¹ã¿ãã¯ãã€ã³ã¿ãããã³ååšããå Žåã¯ãã¬ãŒã ãã€ã³ã¿ãæ³å®ããŸãã
ã¹ã¿ãã¯ãã¬ãŒã åç §ãäœæãããšãã«è¿œå ãçŽãå¿ èŠããã-2047ã«ãã£ãŠãªãã»ãããããŸãã ãã
64ãããã¢ãŒãã®ããã©ã«ãã§ãã ãã以å€ã®å Žåã¯ããã®ãããªãªãã»ãããååšããªããšæ³å®ããŸãã
SPU ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯SPUã§ãµããŒããããŠããŸãã
-mwarn-åé 眮
-merror-reloc
SPUã®ããŒããŒã¯ãåçãªåé 眮ãåŠçããŸããã ããã©ã«ãã§ã¯ãGCCã¯
åçãªåé 眮ãå¿ èŠãšããã³ãŒããçæãããšãã«ãšã©ãŒãçºçããŸãã -mno-error-reloc
ãšã©ãŒãç¡å¹ã«ãã -mwarn-åé 眮 代ããã«èŠåãçæããŸãã
-msafe-dma
-ã ã³ã»ãŒã-dma
DMAã®å®äºãéå§ãŸãã¯ãã¹ãããåœä»€ã¯ã次ã®ã³ãã³ãã§äžŠã¹æ¿ããããšã¯ã§ããŸããã
ã¢ã¯ã»ã¹ãããŠããã¡ã¢ãªã®ããŒããšã¹ãã¢ã«é¢ããŠã ãš -ã ã³ã»ãŒã-dma
ã¡ã¢ãªã¢ã¯ã»ã¹ãä¿è·ããã«ã¯ãvolatileãããŒã¯ãŒãã䜿çšããå¿ èŠããããŸãããããã«ããã
ã¡ã¢ãªãå€æŽãããªãããšãããã£ãŠããå Žæã§ã®éå¹ççãªã³ãŒãã ããŒã¯ããã®ã§ã¯ãªã
æ®çºæ§ãšããŠã®ã¡ã¢ãªãããªãã¯äœ¿çšããããšãã§ããŸã -msafe-dma DMAãåŠçããããã«ã³ã³ãã€ã©ã«æ瀺ããŸã
ãã¹ãŠã®ã¡ã¢ãªã«åœ±é¿ãäžããå¯èœæ§ã®ããåœä»€ã
-mbranch-ãã³ã
ããã©ã«ãã§ã¯ãGCCã¯ããã€ãã©ã€ã³ã¹ããŒã«ãåé¿ããããã®åå²ãã³ãåœä»€ãçæããŸãã
åžžã«åãããããŸãã¯ããããåããããã©ã³ãã ãã³ãã¯8ããè¿ãã§ã¯çæãããŸãã
ãã®ãã©ã³ãããé¢ããæ瀺ã ããããç¡å¹ã«ããçç±ã¯ã»ãšãã©ãããŸããã
ãããã°ç®çããŸãã¯ãªããžã§ã¯ããå°ãå°ããããããã
-msmall-mem
-mlarge-mem
ããã©ã«ãã§ã¯ãGCCã¯ã¢ãã¬ã¹ã18ããããè¶ ããªãããšãåæãšããŠã³ãŒããçæããŸãã
é£çµ¡å -mlarge-mem å®å šãª32ãããã¢ãã¬ã¹ãæ³å®ããã³ãŒããçæãããŸãã
-mstdmain
ããã©ã«ãã§ã¯ãGCCã¯SPUã¹ã¿ã€ã«ã®ã¡ã€ã³æ©èœãæ³å®ããã¹ã¿ãŒãã¢ããã³ãŒãã«å¯ŸããŠãªã³ã¯ããŸã
ã€ã³ã¿ãŒãã§ã€ã¹ïŒåã«ã¯ãŸããªããã©ã¡ãŒã¿ãªã¹ãããããŸãïŒã ãš -mstdmainãGCCãªã³ã¯
ãã¡ã€ã³ããžã®C99ã¹ã¿ã€ã«ã®ã€ã³ã¿ãŒãã§ãŒã¹ãæ³å®ããã¹ã¿ãŒãã¢ããã³ãŒãã«å¯Ÿããããã°ã©ã ã
ãargvãæååã®ããŒã«ã«ã³ããŒãå«ã¿ãŸãã
-mfixed-range =ã¬ãžã¹ã¿ç¯å²
æå®ãããã¬ãžã¹ã¿ç¯å²ãåºå®ã¬ãžã¹ã¿ãšããŠæ±ãã³ãŒããçæããŸãã åºå®ã¬ãžã¹ã¿
ã¬ãžã¹ã¿ã¢ãã±ãŒã¿ã䜿çšã§ããªããã®ã§ãã ããã¯ãã«ãŒãã«ãã³ã³ãã€ã«ãããšãã«åœ¹ç«ã¡ãŸã
ã³ãŒãã ã¬ãžã¹ã¿ç¯å²ã¯ãããã·ã¥ã§åºåãããXNUMXã€ã®ã¬ãžã¹ã¿ãšããŠæå®ãããŸãã å€æ°
ã¬ãžã¹ã¿ç¯å²ã¯ãã³ã³ãã§åºåã£ãŠæå®ã§ããŸãã
-mea32
-mea64
ã__eaããä»ããŠã¢ã¯ã»ã¹ãããPPUã¢ãã¬ã¹ç©ºéãžã®ãã€ã³ã¿ãæ³å®ããŠã³ãŒããã³ã³ãã€ã«ããŸã
ååä»ãã¢ãã¬ã¹ç©ºé修食åã¯ã32ãããå¹ ãŸãã¯64ãããå¹ ã®ããããã§ãã ããã©ã«ãã¯32ãããã§ãã
ããã¯ABIãå€æŽãããªãã·ã§ã³ã§ãããããå®è¡å¯èœãã¡ã€ã«å ã®ãã¹ãŠã®ãªããžã§ã¯ãã³ãŒããã³ã³ãã€ã«ããå¿ èŠããããŸã
åãèšå®ã§ã
-maddress-space-conversion
-mno-ã¢ãã¬ã¹ç©ºéå€æ
ã__eaãã¢ãã¬ã¹ç©ºéãç·ç§°ã¢ãã¬ã¹ã®ã¹ãŒããŒã»ãããšããŠæ±ãããšãèš±å¯/çŠæ¢
ã¹ããŒã¹ã ããã«ãããã__ eaããšãžã§ããªãã¯ãã€ã³ã¿ã®éã®æ瀺çãªåãã£ã¹ããããã³
ãžã§ããªãã¯ãã€ã³ã¿ããã__eaããã€ã³ã¿ãžã®æé»ã®å€æã ããã©ã«ãã§ã¯ã
ã¢ãã¬ã¹ç©ºéãã€ã³ã¿ã®å€æã
-mcache-size =ãã£ãã·ã¥ãµã€ãº
ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ãå®è¡å¯èœãã¡ã€ã«ã«ãªã³ã¯ããlibgccã®ããŒãžã§ã³ãå¶åŸ¡ããŸã
ã__eaãã¢ãã¬ã¹ã®å€æ°ã«ã¢ã¯ã»ã¹ããããã®ãœãããŠã§ã¢ç®¡çãã£ãã·ã¥ãéžæããŸã
ç¹å®ã®ãã£ãã·ã¥ãµã€ãºã®ã¹ããŒã¹ã å¯èœãªãªãã·ã§ã³ ãã£ãã·ã¥ãµã€ãº ã 8, 16, 32, 64
ãš 128ã ããã©ã«ãã®ãã£ãã·ã¥ãµã€ãºã¯64KBã§ãã
-matomic-ã¢ããããŒã
-mno-atomic-updates
ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ãå®è¡å¯èœãã¡ã€ã«ã«ãªã³ã¯ããlibgccã®ããŒãžã§ã³ãå¶åŸ¡ããŸã
PPUåŽã®å€æ°ã®ãœãããŠã§ã¢ç®¡çãã£ãã·ã¥ãã¢ãããã¯ã«æŽæ°ãããã©ãããéžæããŸã
䜿çšãããŠããŸãã ã¢ãããã¯æŽæ°ã䜿çšããå Žåã¯ãã䜿çšããŠSPUã³ãŒãããPPUå€æ°ã«å€æŽããŸãã
ã__eaããšããååã®ã¢ãã¬ã¹ç©ºé修食åã¯ãä»ã®PPUãžã®å€æŽã劚ããŸãã
PPUã³ãŒãããåããã£ãã·ã¥ã©ã€ã³ã«ããå€æ°ã ã¢ãããã¯ã䜿çšããªãå Žå
æŽæ°ããã®ãããªå¹²æžãçºçããå¯èœæ§ããããŸãã ãã ãããã£ãã·ã¥ã©ã€ã³ãæžãæ»ãããšã¯ããå€ãã®ããšã§ã
å¹ççã ããã©ã«ãã®åäœã§ã¯ãã¢ãããã¯æŽæ°ã䜿çšããŸãã
-mdual-nops
-mdual-nops =n
ããã©ã«ãã§ã¯ãGCCã¯nopsãæ¿å ¥ããŠããã¥ã¢ã«ã€ã·ã¥ãŒãå¢å ãããšäºæ³ããããšãã«ãã¥ã¢ã«ã€ã·ã¥ãŒãå¢å ãããŸã
ããã©ãŒãã³ã¹ã n 0ãã10ãŸã§ã®å€ã«ããããšãã§ããŸãã n ããå°ãªãnopsãæ¿å ¥ããŸãã 10ã¯
ããã©ã«ãã®0ã¯ãšåãã§ã -mno-dual-nopsã ã§ç¡å¹ã« -ãªã¹.
-mhint-max-nops =n
ãã©ã³ããã³ãã«æ¿å ¥ããnopã®æ倧æ°ã ãã©ã³ããã³ãã¯å°ãªããšã8ã§ãªããã°ãªããŸãã
ããã圱é¿ããŠãããã©ã³ãããé¢ããåœä»€ã GCCã¯æ倧 n ã«ããŒã
ããã匷å¶ããŸããããããªããšããã©ã³ããã³ããçæãããŸããã
-mhint-max-distance =n
åå²ãã³ãåœä»€ã®ãšã³ã³ãŒãã«ããããã³ãã¯256以å ã«å¶éãããŸã
ããã圱é¿ããŠãããã©ã³ãã®æ瀺ã ããã©ã«ãã§ã¯ãGCCã¯ãããç¯å²å ã«ããããšã確èªããŸã
125.
-msafe-ãã³ã
SPUãç¡æéã«ã¹ããŒã«ããåå ãšãªãããŒããŠã§ã¢ãã°ãåé¿ããŸãã ããã©ã«ãã§ã¯ãGCC
ãã®ã¹ããŒã«ãçºçããªãããã«ããhbrpãåœä»€ãæ¿å ¥ããŸãã
ãªãã·ã§ã³ for ãšã³ãã«ã㌠V
ãããã®è¿œå ãªãã·ã§ã³ã¯ãä»ã®ãªãã·ã§ã³ãšã®äºææ§ã®ããã«SystemVãªãªãŒã¹4ã§äœ¿çšã§ããŸãã
ãããã®ã·ã¹ãã äžã®ã³ã³ãã€ã©ïŒ
-G å ±æãªããžã§ã¯ããäœæããŸãã ããå§ãããŸã -ã·ã³ããªã㯠or -å ±æ 代ããã«äœ¿çšããŠãã ããã
-Qy ã.identãã¢ã»ã³ãã©ã§ãã³ã³ãã€ã©ã䜿çšããåããŒã«ã®ããŒãžã§ã³ãèå¥ããŸã
åºåã®ãã£ã¬ã¯ãã£ãã
-Qn ã.identããã£ã¬ã¯ãã£ããåºåãã¡ã€ã«ã«è¿œå ããªãã§ãã ããïŒãããããã©ã«ãã§ãïŒã
-YPãDirs
ãã£ã¬ã¯ããªãæ€çŽ¢ãã Dirsãã§æå®ãããã©ã€ãã©ãªã®å Žåã¯ä»ã«ãããŸãã -l.
-ããŒããDIR
ãã£ã¬ã¯ããªãèŠãŠãã ãã DIR M4ããªããã»ããµãæ€çŽ¢ããŸãã ã¢ã»ã³ãã©ã¯ããã䜿çšããŸã
ãªãã·ã§ã³ãéžæããŸãã
ã¿ã€ã«Gx ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯TILE-Gxã§ãµããŒããããŠããŸãã
-mcmodel = small
å°ããªã¢ãã«ã®ã³ãŒããçæããŸãã çŽéé»è©±ã®è·é¢ã¯500Mã«å¶éãããŠããŸã
ã©ã¡ãã®æ¹åã«ãã PCçžå¯Ÿã¢ãã¬ã¹ã¯32ãããã§ãã 絶察ã¢ãã¬ã¹ã®ãµããŒã
å®å šãªã¢ãã¬ã¹ç¯å²ã
-mcmodel = large
ã©ãŒãžã¢ãã«ã®ã³ãŒããçæããŸãã é話è·é¢ã«å¶éã¯ãããŸãããpc-
çžå¯Ÿã¢ãã¬ã¹ããŸãã¯çµ¶å¯Ÿã¢ãã¬ã¹ã
-mcpu =å
察象ãšãªãCPUã®çš®é¡ãéžæããŸãã çŸåšãµããŒããããŠããã¿ã€ã㯠ã¿ã€ã«ã°ãã¯ã¹.
-m32
-m64
32ããããŸãã¯64ãããç°å¢çšã®ã³ãŒããçæããŸãã 32ãããç°å¢ã¯intãèšå®ããŸãã
longãããã³32ããããžã®ãã€ã³ã¿ã 64ãããç°å¢ã§ã¯ãintã32ãããããã³longã«èšå®ãããŸãã
64ããããžã®ãã€ã³ã¿ã
-mbig-ãšã³ãã£ã¢ã³
-mlittle-ãšã³ãã£ã¢ã³
ããããããã°/ãªãã«ãšã³ãã£ã¢ã³ã¢ãŒãã§ã³ãŒããçæããŸãã
ã¿ã€ã«ãã ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯TILEProã§ãµããŒããããŠããŸãïŒ
-mcpu =å
察象ãšãªãCPUã®çš®é¡ãéžæããŸãã çŸåšãµããŒããããŠããã¿ã€ã㯠ã¿ã€ã«ãã.
-m32
intãlongãããã³ãã€ã³ã¿ãŒã32ãããã«èšå®ãã32ãããç°å¢çšã®ã³ãŒããçæããŸãã
ããããµããŒããããŠããå¯äžã®åäœã§ããããããã©ã°ã¯åºæ¬çã«ç¡èŠãããŸãã
VïŒïŒ ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãV850å®è£ çšã«å®çŸ©ãããŠããŸãã
-mlong-calls
-mno-long-calls
ãã¹ãŠã®é話ãé ãïŒè¿ãïŒãšããŠæ±ããŸãã é話ãé ãã«ãããšæ³å®ãããå Žåã
ã³ã³ãã€ã©ã¯åžžã«é¢æ°ã®ã¢ãã¬ã¹ãã¬ãžã¹ã¿ã«ããŒãããéæ¥çã«åŒã³åºããŸã
ãã€ã³ã¿ãä»ããŠã
-mno-ep
-ã¡ãã
åãã€ã³ããã¯ã¹ãã€ã³ã¿4以äžã䜿çšããåºæ¬ãããã¯ãæé©åïŒæé©åïŒããªãã§ãã ãã
ãã€ã³ã¿ããepãã¬ãžã¹ã¿ã«ã³ããŒããçããsldããšãsstãã䜿çšããåæ°
æ瀺ã The -ã¡ãã æé©åãããšããªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªããŸãã
-mno-ããããŒã°é¢æ°
-mprolog-é¢æ°
ããããŒã°ã§ã¬ãžã¹ã¿ãä¿åããã³åŸ©å ããããã«å€éšé¢æ°ã䜿çšããªãïŒäœ¿çšããªãïŒ
é¢æ°ã®ãšãããŒã°ã å€éšé¢æ°ã¯é ããªããŸããã䜿çšããã³ãŒãã¯å°ãªããªããŸã
è€æ°ã®é¢æ°ãåãæ°ã®ã¬ãžã¹ã¿ãä¿åããå Žåã¯ã¹ããŒã¹ã The
-mprolog-é¢æ° æé©åãããšããªãã·ã§ã³ã¯ããã©ã«ãã§ãªã³ã«ãªããŸãã
-mspace
ã³ãŒããã§ããã ãå°ããããããã«ããŠãã ããã çŸåšãããã¯ãã ãªã³ã«ãªããŸã -ã¡ãã
ãš -mprolog-é¢æ° ãªãã·ã§ã³ã
-mtda =n
ãµã€ãºãã§ããéçå€æ°ãŸãã¯ã°ããŒãã«å€æ°ãé 眮ããŸã n å°ããªããŒã¿é åã«ãã€ã以äž
ãã®ã¬ãžã¹ã¿ãepãã¯ãæããŸãã å°ããªããŒã¿é åã¯ãåèšã§æ倧256ãã€ããä¿æã§ããŸã
ïŒãã€ãåç §ã®å Žåã¯128ãã€ãïŒã
-msda =n
ãµã€ãºãã§ããéçå€æ°ãŸãã¯ã°ããŒãã«å€æ°ãé 眮ããŸã n å°ããªããŒã¿é åã«ãã€ã以äž
ãã®ã¬ãžã¹ã¿ãgpããæãã å°ããªããŒã¿é åã¯æ倧64ãããã€ããä¿æã§ããŸãã
-mzda =n
ãµã€ãºãã§ããéçå€æ°ãŸãã¯ã°ããŒãã«å€æ°ãé 眮ããŸã n æåã®32ãã€ã以äž
ãããã€ãã®ã¡ã¢ãªã
-mv850
ã¿ãŒã²ããããã»ããµãV850ã§ããããšãæå®ããŸãã
-mv850e3v5
ã¿ãŒã²ããã»ããã»ããµãŒãV850E3V5ã§ããããšãæå®ããŸãã ããªããã»ããµå®æ°
__v850e3v5__ ãã®ãªãã·ã§ã³ã䜿çšãããå Žåã«å®çŸ©ãããŸãã
-mv850e2v4
ã¿ãŒã²ããã»ããã»ããµãŒãV850E3V5ã§ããããšãæå®ããŸãã ããã¯ã®ãšã€ãªã¢ã¹ã§ã
-mv850e3v5 ãªãã·ã§ã³ãéžæããŸãã
-mv850e2v3
ã¿ãŒã²ããã»ããã»ããµãŒãV850E2V3ã§ããããšãæå®ããŸãã ããªããã»ããµå®æ°
__v850e2v3__ ãã®ãªãã·ã§ã³ã䜿çšãããå Žåã«å®çŸ©ãããŸãã
-mv850e2
ã¿ãŒã²ããã»ããã»ããµãŒãV850E2ã§ããããšãæå®ããŸãã ããªããã»ããµå®æ° __v850e2__
ãã®ãªãã·ã§ã³ã䜿çšãããå Žåã«å®çŸ©ãããŸãã
-mv850e1
ã¿ãŒã²ããã»ããã»ããµãŒãV850E1ã§ããããšãæå®ããŸãã ããªããã»ããµå®æ°
__v850e1__ ãš __v850e__ ãã®ãªãã·ã§ã³ã䜿çšãããšå®çŸ©ãããŸãã
-mv850es
ã¿ãŒã²ããã»ããã»ããµãŒãV850ESã§ããããšãæå®ããŸãã ããã¯ã®ãšã€ãªã¢ã¹ã§ã -mv850e1
ãªãã·ã§ã³ãéžæããŸãã
-mv850e
ã¿ãŒã²ãã ããã»ããµã V850E ã§ããããšãæå®ããŸãã ããªããã»ããµå®æ° __v850e__
ãã®ãªãã·ã§ã³ã䜿çšãããå Žåã«å®çŸ©ãããŸãã
ã©ã¡ãã§ããªãå Žå -mv850 ãŸã -mv850e ãŸã -mv850e1 ãŸã -mv850e2 ãŸã -mv850e2v3 ãŸã -mv850e3v5
ãå®çŸ©ãããããããã©ã«ãã®ã¿ãŒã²ããããã»ããµãéžæãããé¢é£ãã __v850 * __
ããªããã»ããµå®æ°ãå®çŸ©ãããŠããŸãã
ããªããã»ããµå®æ° __v850 ãš __v851__ ã©ã¡ãã«é¢ä¿ãªããåžžã«å®çŸ©ãããŸã
ããã»ããµããªã¢ã³ããã¿ãŒã²ããã§ãã
-mdisable-callt
-mno-disable-callt
ãã®ãªãã·ã§ã³ã¯ãv850eãv850e1ã®ãCALLTãåœä»€ã®çæãæå¶ããŸãã
v850ã¢ãŒããã¯ãã£ã®v2e850ãv2e3v850ãããã³v3e5v850ãã¬ãŒããŒã
ãã®ãªãã·ã§ã³ã¯ãRH850 ABIã䜿çšãããŠããå Žåãããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãïŒãåç §ïŒã -mrh850-abiïŒãåã³
GCC ABIã䜿çšãããŠããå Žåãããã©ã«ãã§ã¯ç¡å¹ã«ãªã£ãŠããŸãã ãCALLTãåœä»€ãå®è¡ãããŠããå Žå
çæããããšãC ããªããã»ããµ ã·ã³ãã« "__V850_CALLT__" ãå®çŸ©ãããŸãã
-mãªã©ãã¯ã¹
-mno-ãªã©ãã¯ã¹
æž¡ãïŒãŸãã¯æž¡ããªãïŒ -mãªã©ãã¯ã¹ ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ãã¢ã»ã³ãã©ã«è¿œå ããŸãã
-mlong-ãžã£ã³ã
-mno-ãã³ã°ãžã£ã³ã
PCçžå¯Ÿãžã£ã³ãåœä»€ã®çæãç¡å¹ïŒãŸãã¯å床æå¹ïŒã«ããŸãã
-msoft-float
-mhard-float
ããŒããŠã§ã¢æµ®åå°æ°ç¹åœä»€ã®çæãç¡å¹ïŒãŸãã¯å床æå¹ïŒã«ããŸãã ãã
ãªãã·ã§ã³ã¯ãã¿ãŒã²ããã¢ãŒããã¯ãã£ã V850E2V3 以äžã ããã
ããŒããŠã§ã¢æµ®åå°æ°ç¹åœä»€ãçæãããŠãããCããªããã»ããµ
ã·ã³ãã« "__FPU_OK__" ãå®çŸ©ãããŸããããã§ãªãå Žåãã·ã³ãã« "__NO_FPU__" ãå®çŸ©ãããŸãã
å®çŸ©ãããã
-ã ã«ãŒã
e3v5LOOPåœä»€ã®äœ¿çšãæå¹ã«ããŸãã ãã®åœä»€ã®äœ¿çšã¯ããã§ã¯ãããŸãã
e3v5ã¢ãŒããã¯ãã£ãéžæãããŠããå Žåããã®äœ¿çšã¯ãŸã æå¹ã§ãããããããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
å®éšçã
-mrh850-abi
-ã ã°ã
V850ABIã®RH850ããŒãžã§ã³ã®ãµããŒããæå¹ã«ããŸãã ãããããã©ã«ãã§ãã ãš
ãã®ããŒãžã§ã³ã®ABIã«ã¯ã次ã®ã«ãŒã«ãé©çšãããŸãã
· æŽæ°ãµã€ãºã®æ§é äœãšå ±çšäœã¯ãã¡ã¢ãª ãã€ã³ã¿ã§ã¯ãªãã¡ã¢ãª ãã€ã³ã¿ãä»ããŠè¿ãããŸãã
ã¬ãžã¹ã¿ãŒã
· 倧ããªæ§é äœãšå ±çšäœ (ãµã€ãºã 8 ãã€ããè¶ ãã) ã¯ãå€ã«ãã£ãŠæž¡ãããŸãã
· é¢æ°ã¯ 16 ãããå¢çã«æããããŸãã
ã» -m8byte-align ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ããµããŒããããŠããŸãã
ã» -mdisable-callt ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸãã ã®
-mno-disable-callt ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ã¯ãµããŒããããŠããŸããã
ãã®ããŒãžã§ã³ã®ABIãæå¹ã«ãªã£ãŠããå ŽåãCããªããã»ããµã·ã³ãã«ã__V850_RH850_ABI__ã
ãå®çŸ©ãããã
-mgcc-ã¢ã
V850ABIã®å€ãGCCããŒãžã§ã³ã®ãµããŒããæå¹ã«ããŸãã ãã®ããŒãžã§ã³ã®ABIã§ã¯
次ã®èŠåãé©çšãããŸãã
· æŽæ°ãµã€ãºã®æ§é äœãšå ±çšäœã¯ãã¬ãžã¹ã¿ "r10" ã«è¿ãããŸãã
· 倧ããªæ§é äœãšå ±çšäœ (ãµã€ãºã 8 ãã€ããè¶ ãã) ã¯ãåç §ã«ãã£ãŠæž¡ãããŸãã
· ãµã€ãºãæé©åããªãéããé¢æ°ã¯ 32 ãããå¢çã«æããããŸãã
ã» -m8byte-align ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ã¯ãµããŒããããŠããŸããã
ã» -mdisable-callt ã³ãã³ã ã©ã€ã³ ãªãã·ã§ã³ã¯ãµããŒããããŠããŸãããããã©ã«ãã§ã¯æå¹ã«ãªã£ãŠããŸããã
ãã®ããŒãžã§ã³ã®ABIãæå¹ã«ãªã£ãŠããå ŽåãCããªããã»ããµã·ã³ãã«ã__V850_GCC_ABI__ã
ãå®çŸ©ãããã
-m8byte-align
-mno-8byte-align
ãdoubleãããã³ãlong longãåã®ãµããŒãã 8 ãã€ãã§æŽåã§ããããã«ããŸãã
å¢çã ããã©ã«ãã§ã¯ããã¹ãŠã®ãªããžã§ã¯ãã®é 眮ãæ倧ã§
4 ãã€ãã ã〠-m8byte-align å®éã«ã¯ C ããªããã»ããµ ã·ã³ãã«ã§ãã
ã__V850_8BYTE_ALIGN__ããå®çŸ©ãããŸãã
-mbig ã¹ã€ãã
倧ããªã¹ã€ããããŒãã«ã«é©ããã³ãŒããçæããŸãã ãã®ãªãã·ã§ã³ã¯ã
ã¢ã»ã³ãã©/ãªã³ã«ã¯ãã¹ã€ããããŒãã«å ã®ç¯å²å€ã®åå²ã«ã€ããŠæå¥ãèšããŸãã
-map-regs
ãã®ãªãã·ã§ã³ã«ãããã³ã³ãã€ã©ãŒã«ãã£ãŠçæãããã³ãŒãã§r2ãšr5ã䜿çšãããŸãã ãã
èšå®ãããã©ã«ãã§ãã
-mno-app-regs
ãã®ãªãã·ã§ã³ã«ãããr2ãšr5ã¯åºå®ã¬ãžã¹ã¿ãšããŠæ±ãããŸãã
VAX ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯VAXã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-munix
Unixã¢ã»ã³ãã©ãå®è¡ããç¹å®ã®ãžã£ã³ãåœä»€ïŒãaobleqããªã©ïŒãåºåããªãã§ãã ãã
VAXã¯é·è·é¢ãåŠçã§ããŸããã
-mgnu
GNUã¢ã»ã³ãã©ã
äžå€ã
-mg D圢åŒã§ã¯ãªãG圢åŒã®æµ®åå°æ°ç¹æ°ã®åºåã³ãŒãã
VMS ãªãã·ã§ã³
ããŒãã³ -m ãªãã·ã§ã³ã¯ãVMSå®è£ ã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-mvms-ãªã¿ãŒã³ã³ãŒã
ãã¡ã€ã³ãããVMSæ¡ä»¶ã³ãŒããè¿ããŸãã ããã©ã«ãã§ã¯ãPOSIXã¹ã¿ã€ã«ã®æ¡ä»¶ãè¿ããŸã
ïŒäŸïŒãšã©ãŒïŒã³ãŒãã
-mdebug-main =æ¥é èŸ
ååãã§å§ãŸãæåã®ã«ãŒãã³ã«ãã©ã°ãç«ãŠãŸã æ¥é èŸ ã®ã¡ã€ã³ã«ãŒãã³ãšããŠ
ãããã¬ã
-mmalloc64
ããã©ã«ãã¯64ãããã®ã¡ã¢ãªå²ãåœãŠã«ãŒãã³ã§ãã
-mpointer-size =ãµã€ãº
ãã€ã³ã¿ã®ããã©ã«ããµã€ãºãèšå®ããŸãã å¯èœãªãªãã·ã§ã³ ãµã€ãº ã 32 or çã 32ãããçš
ãã€ã³ã¿ã 64 or é·ã 64ããããã€ã³ã¿ã®å Žåãããã³ ããã 32ããããã€ã³ã¿ã®ã¿ããµããŒãããŸãã
åŸè ã®ãªãã·ã§ã³ã¯ãpragmapointer_sizeããç¡å¹ã«ããŸãã
VxWorks ãªãã·ã§ã³
ãã®ã»ã¯ã·ã§ã³ã®ãªãã·ã§ã³ã¯ããã¹ãŠã®VxWorksã¿ãŒã²ããã«å¯ŸããŠå®çŸ©ãããŠããŸãã ã«åºæã®ãªãã·ã§ã³
ã¿ãŒã²ããããŒããŠã§ã¢ã¯ããã®ã¿ãŒã²ããã®ä»ã®ãªãã·ã§ã³ãšãšãã«äžèŠ§è¡šç€ºãããŸãã
-mrtp
GCCã¯ãVxWorksã«ãŒãã«ãšãªã¢ã«ã¿ã€ã ããã»ã¹ïŒRTPïŒã®äž¡æ¹ã®ã³ãŒããçæã§ããŸãã ãã
ãªãã·ã§ã³ã¯åè ããåŸè ã«åãæ¿ãããŸãã ãŸããããªããã»ããµãã¯ããå®çŸ©ããŸã
ã__RTP__ãã
-ééç
éçã©ã€ãã©ãªã§ã¯ãªãå ±æã©ã€ãã©ãªã«å¯ŸããŠRTPå®è¡å¯èœãã¡ã€ã«ããªã³ã¯ããŸãã The
ãªãã·ã§ã³ -éç ãš -å ±æ RTPã«ã䜿çšã§ããŸãã -éç ããã©ã«ãã§ãã
-Bã¹ã¿ãã£ãã¯
-ããã€ãããã¯
ãããã®ãªãã·ã§ã³ã¯ãªã³ã«ãŒã«æž¡ãããŸãã ãããã¯ãšã®äºææ§ã®ããã«å®çŸ©ãããŠããŸã
ãã£ã¢ãã
-Xbind-lazy
é¢æ°åŒã³åºãã®é 延ãã€ã³ãã£ã³ã°ãæå¹ã«ããŸãã ãã®ãªãã·ã§ã³ã¯ã -Wlã-zãnow ãšã§ãã
Diabãšã®äºææ§ã®ããã«å®çŸ©ãããŠããŸãã
-Xbind-ä»
é¢æ°åŒã³åºãã®é 延ãã€ã³ãã£ã³ã°ãç¡å¹ã«ããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§ããã
Diabãšã®äºææ§ã
x86-64 ãªãã·ã§ã³
ãããã¯ä»¥äžã«ãªã¹ããããŠããŸã
ãšã¯ã¹ã¹ããŒããŒ16 ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãXstormy16ã«å¯ŸããŠå®çŸ©ãããŠããŸãã
-msim
ã·ãã¥ã¬ãŒã¿ã«é©ããã¹ã¿ãŒãã¢ãããã¡ã€ã«ãšãªã³ã«ã¹ã¯ãªãããéžæããŸãã
ãšã¯ã¹ãã³ãµ ãªãã·ã§ã³
ãããã®ãªãã·ã§ã³ã¯ãXtensaã¿ãŒã²ããã§ãµããŒããããŠããŸãã
-mconst16
-mno-const16
å®æ°å€ãããŒãããããã®ãCONST16ãåœä»€ã®äœ¿çšãæå¹ãŸãã¯ç¡å¹ã«ããŸãã The
ãCONST16ãåœä»€ã¯çŸåšããã³ã·ãªã«ã®æšæºãªãã·ã§ã³ã§ã¯ãããŸããã ãã€
æå¹ã«ãããšãæšæºã®ãL16Rãã®ä»£ããã«ãCONST32ãåœä»€ãåžžã«äœ¿çšãããŸã
æ瀺ã ãCONST16ãã®äœ¿çšã¯ããL32Rãã®å Žåã«ã®ã¿ããã©ã«ãã§æå¹ã«ãªããŸã
åœä»€ã¯å©çšã§ããŸããã
-æ··ä¹±-çã£ã
-mno-fusion-madd
ã§ã®èåãããä¹ç®/å ç®ããã³ä¹ç®/æžç®åœä»€ã®äœ¿çšãæå¹ãŸãã¯ç¡å¹ã«ããŸã
æµ®åå°æ°ç¹ãªãã·ã§ã³ã æµ®åå°æ°ç¹ãªãã·ã§ã³ãããã§ãªãå Žåãããã¯å¹æããããŸãã
æå¹ã èåãããä¹ç®/å ç®ããã³ä¹ç®/æžç®åœä»€ãç¡å¹ã«ãããšã匷å¶çã«
ã³ã³ãã€ã©ã¯ãä¹ç®ããã³å ç®/æžç®æäœã«å¥ã ã®åœä»€ã䜿çšããŸãã
ããã¯ãIEEE754ã«æºæ ããå³å¯ãªçµæãåŸãããå Žåã«æãŸããå ŽåããããŸãã
å¿ é ïŒèåãããä¹ç®ã®å ç®/æžç®åœä»€ã¯äžéãäžžããŸãã
çµæãããã«ãã£ãŠçµæãçæããŸã ä»ã«ã¯ïŒ ã«ãã£ãŠæå®ãããããã粟床ã®ããã
IEEEæšæºã èåãããä¹ç®ã®å ç®/æžç®åœä»€ãç¡å¹ã«ãããšã次ã®ããšãä¿èšŒãããŸãã
ããã°ã©ã åºåã¯ãä¹ç®ãšä¹ç®ãçµã¿åãããã³ã³ãã€ã©ã®æ©èœã«åœ±é¿ãããŸããã
å ç®/æžç®æäœã
-mserialize-volatile
-mno-serialize-volatile
ãã®ãªãã·ã§ã³ãæå¹ã«ãããšãGCCã¯ãæ®çºæ§ãã¡ã¢ãªã®åã«ãMEMWãåœä»€ãæ¿å ¥ããŸã
é次äžè²«æ§ãä¿èšŒããããã®åç §ã ããã©ã«ã㯠-mserialize-volatile.
ã -mno-serialize-volatile ãMEMWãåœä»€ãçç¥ããŸãã
-mforce-no-pic
GNU / Linuxã®ããã«ããã¹ãŠã®ãŠãŒã¶ãŒã¢ãŒãã®Xtensaã³ãŒããäœçœ®ã«ããå¿ èŠãããã¿ãŒã²ããã®å Žå-
ç¬ç«ã³ãŒãïŒPICïŒããã®ãªãã·ã§ã³ã¯ãã«ãŒãã«ã³ãŒããã³ã³ãã€ã«ããããã®PICãç¡å¹ã«ããŸãã
-mtext-ã»ã¯ã·ã§ã³ãªãã©ã«
-mno-text-section-literals
ãªãã©ã«ããŒã«ã®åŠçãå¶åŸ¡ããŸãã ããã©ã«ã㯠-mno-text-section-literals,
åºåãã¡ã€ã«ã®å¥ã®ã»ã¯ã·ã§ã³ã«ãªãã©ã«ãé 眮ããŸãã ããã«ããã
ãªãã©ã« ããŒã«ãããŒã¿ RAM/ROM ã«é 眮ãããªã³ã«ãçµåããããšãã§ããŸãã
åé·ãªãªãã©ã«ãåé€ããŠã³ãŒããæ¹åããããã®åå¥ã®ãªããžã§ã¯ã ãã¡ã€ã«ããã®ãªãã©ã« ããŒã«
ãµã€ãºã ãš -mtext-ã»ã¯ã·ã§ã³ãªãã©ã«ããªãã©ã«ã¯ããã¹ãã»ã¯ã·ã§ã³ã«æ£åšããŠããŸã
ããããåç §ã«ã§ããã ãè¿ã¥ããããã«ã ããã¯å¿ èŠãããããŸãã
倧ããªã¢ã»ã³ã㪠ãã¡ã€ã«ã®å Žåã
-mtarget-align
-mno-ã¿ãŒã²ãã-ã¢ã©ã€ã³
ãã®ãªãã·ã§ã³ãæå¹ã«ãããšãGCCã¯ã¢ã»ã³ãã©ã«èªåçã«æŽåããããã«æ瀺ããŸã
ã³ãŒãå¯åºŠãããããç ç²ã«ããŠãã©ã³ãããã«ãã£ãæžããããã®æ瀺ã The
ã¢ã»ã³ãã©ã¯ãå¯åºŠåœä»€ãåºããŠãã©ã³ãã¿ãŒã²ãããš
åŒã³åºãæ瀺ã«ç¶ãæ瀺ã å è¡ããé庫ãååã«ãªãå Žå
ã¿ãŒã²ãããæŽåãããããã®å¯åºŠåœä»€ãæ¡å€§ã¯å®è¡ãããŸããã ããã©ã«ãã¯
-mtarget-alignã ãããã®ãªãã·ã§ã³ã¯ãèªå調æŽã®åŠçã«ã¯åœ±é¿ããŸããã
ãLOOPãã®ãããªåœä»€ãããã¯ãã¢ã»ã³ãã©ãæ¡åŒµããããšã«ãã£ãŠåžžã«æŽåããŸãã
å¯åºŠåœä»€ãŸãã¯NOPåœä»€ãæ¿å ¥ããããšã«ãã£ãŠã
-mlongcalls
-mno-longcalls
ãã®ãªãã·ã§ã³ãæå¹ã«ãããšãGCCã¯ã¢ã»ã³ãã©ã«çŽæ¥åŒã³åºãã次ã®ããã«å€æããããã«æ瀺ããŸãã
çŽæ¥é話ã®ã¿ãŒã²ããã
åŒã³åºãåœä»€ã§èš±å¯ãããç¯å²ã ãã®å€æã¯éåžžã
ä»ã®ãœãŒã¹ãã¡ã€ã«ã®é¢æ°ã å ·äœçã«ã¯ãã¢ã»ã³ãã©ã¯çŽæ¥å€æããŸã
ãCALLãåœä»€ããL32Rãã«å€æããç¶ããŠãCALLXãåœä»€ãå®è¡ããŸãã ããã©ã«ãã¯
-mno-longcallsã ãã®ãªãã·ã§ã³ã¯ãã³ãŒã«ã¿ãŒã²ãããã§ããããã°ã©ã ã§äœ¿çšããå¿ èŠããããŸã
ç¯å²å€ã®å¯èœæ§ããããŸãã ãã®ãªãã·ã§ã³ã¯ãã¢ã»ã³ãã©ã§ã¯ãªããã¢ã»ã³ãã©ã«å®è£ ãããŠããŸãã
ã³ã³ãã€ã©ã§ãããããGCCã«ãã£ãŠçæãããã¢ã»ã³ããªã³ãŒãã¯åŒãç¶ãçŽæ¥åŒã³åºãã瀺ããŸã
åœä»€---å®éã®åœä»€ã確èªããã«ã¯ãå解ããããªããžã§ã¯ãã³ãŒãã確èªããŠãã ããã
ã¢ã»ã³ãã©ã¯ããã¡ã€ã«éã®åŒã³åºãã ãã§ãªãããã¹ãŠã®ã¯ãã¹ãã¡ã€ã«åŒã³åºãã«éæ¥åŒã³åºãã䜿çšããããšã«æ³šæããŠãã ããã
æ¬åœã«ç¯å²å€ã®ãã®ã
zã·ãªãŒãº ãªãã·ã§ã³
ãããã¯ä»¥äžã«ãªã¹ããããŠããŸã
ãªãã·ã§ã³ for Code äžä»£ è¡šèš
ãããã®ãã·ã³ã«äŸåããªããªãã·ã§ã³ã¯ãã³ãŒãã§äœ¿çšãããã€ã³ã¿ãŒãã§ã€ã¹èŠåãå¶åŸ¡ããŸã
äžä»£ã
ãããã®ã»ãšãã©ã«ã¯ãæ£ãšè² ã®äž¡æ¹ã®åœ¢åŒããããŸãã ã®è² ã®åœ¢åŒ -ãµãµãŒ is
-fno-fooã 以äžã®è¡šã«ã¯ããã©ãŒã ã®XNUMXã€ã ãããªã¹ããããŠããŸã---ãã©ãŒã ã§ã¯ãªããã®
ãã£ãã©ã«ãã ããªãã¯ã©ã¡ãããåé€ããããšã«ãã£ãŠä»ã®ãã©ãŒã ãç解ããããšãã§ããŸã NO- ãŸãã¯ãããè¿œå ããŸãã
-fbounds-ãã§ãã¯
ããããµããŒãããããã³ããšã³ãã®å Žåãè¿œå ã®ã³ãŒããçæããŠãã€ã³ããã¯ã¹ã以åã«äœ¿çšãããããšã確èªããŸã
ã¢ã¯ã»ã¹ã¢ã¬ã€ã¯å®£èšãããç¯å²å ã«ãããŸãã ããã¯çŸåšã
Javaããã³Fortranããã³ããšã³ãããã®ãªãã·ã§ã³ã®ããã©ã«ãã¯trueããã³falseã§ãã
ã
-fstack-reuse =åå©çšã¬ãã«
ãã®ãªãã·ã§ã³ã¯ããŠãŒã¶ãŒã宣èšããããŒã«ã«/èªåå€æ°ã®ã¹ã¿ãã¯ã¹ããŒã¹ã®åå©çšãå¶åŸ¡ããŸãã
ã³ã³ãã€ã©ãäžæçã«çæããŸãã åå©çšã¬ãã« ããããšãã§ããŸã ã, ååä»ãå€æ°ãŸã㯠ãªã. ã
ãã¹ãŠã®ããŒã«ã«å€æ°ãšäžæå€æ°ã®ã¹ã¿ãã¯ã®åå©çšãå¯èœã«ããŸãã ååä»ãå€æ° ãã®
ååãæã€ãŠãŒã¶ãŒå®çŸ©ã®ããŒã«ã«å€æ°ã«å¯ŸããŠã®ã¿åå©çšãã ãªã ã¹ã¿ãã¯ã®åå©çšãç¡å¹ã«ããŸã
å®å šã«ã ããã©ã«ãå€ã¯ ãã ããã°ã©ã ãæ¡åŒµãããšãã«ãªãã·ã§ã³ãå¿ èŠã§ã
ã¹ã³ãŒãä»ãããŒã«ã«å€æ°ãŸãã¯ã³ã³ãã€ã©ãäžæçã«çæããããã®ã®åç¶æéãè¶ ããŠ
èšèªã«ãã£ãŠå®çŸ©ããããšã³ããã€ã³ãã å€æ°ã®æå¹æéãçµäºãããšããããã³
å€æ°ã¯ã¡ã¢ãªå ã«ååšããæé©åã³ã³ãã€ã©ã¯ã¹ã¿ãã¯ãåå©çšããèªç±ããããŸã
ã©ã€ãç¯å²ããªãä»ã®äžæå€æ°ãŸãã¯ã¹ã³ãŒãããŒã«ã«å€æ°ãšã®ã¹ããŒã¹
ãããšéãªããŸãã ããŒã«ã«ã®æå¹æéã延é·ããã¬ã¬ã·ãŒ ã³ãŒãã¯ã
ã¹ã¿ãã¯åå©çšã®æé©åã
ããšãã°ã
int * p;
{
int ããŒã«ã« 1;
p =ïŒlocal1;
ããŒã«ã«1 = 10;
....
}
{
int ããŒã«ã« 2;
ããŒã«ã«2 = 20;
...
}
ifïŒ* p == 10ïŒ//local1ã®ã¹ã³ãŒãå€äœ¿çš
{
}
å¥ã®äŸïŒ
æ§é äœA
{
AïŒint kïŒïŒiïŒkïŒãjïŒkïŒ{}
int i;
int j;
};
* ap;
void fooïŒconst AïŒarïŒ
{
ap =ïŒar;
}
void barïŒïŒ
{
fooïŒAïŒ10ïŒïŒ; // fooãæ»ããšãäžæãªããžã§ã¯ãã®æå¹æéãçµäºããŸã
{
A aïŒ20ïŒ;
....
}
ap-> i + = 10; //apã¯ã¹ã³ãŒãå€ã®tempãåç §ããŸã
//ã§åå©çšãããŸãã ap-> iã®å€ã¯äœã§ããïŒ
}
ã³ã³ãã€ã©ã«ãã£ãŠçæãããäžæçãªãã®ã®åç¶æéã¯ãC++æšæºã«ãã£ãŠæ確ã«å®çŸ©ãããŠããŸãã
äžæçãªãã®ã®åç¶æéãçµäºããäžæçãªãã®ãã¡ã¢ãªã«ååšããå Žåã
æé©åã³ã³ãã€ã©ã«ã¯ãã¹ã¿ãã¯ã¹ããŒã¹ãä»ã®äžæçãªãã®ãšåå©çšããèªç±ããããŸãã
ã©ã€ãç¯å²ãéè€ããªãã¹ã³ãŒãä»ãããŒã«ã«å€æ°ã ãã ããäžéšã®
ã¬ã¬ã·ãŒã³ãŒãã¯ãäžæçãªã¹ã¿ãã¯ãååšããå€ãã³ã³ãã€ã©ã®åäœã«äŸåããŠããŸã
ã¹ããŒã¹ã¯åå©çšãããŸãããã¹ã¿ãã¯ãç©æ¥µçã«åå©çšãããšãã©ã³ã¿ã€ã ãšã©ãŒãçºçããå¯èœæ§ããããŸãã ãã
ãªãã·ã§ã³ã¯ãäžæã¹ã¿ãã¯ã®åå©çšã®æé©åãå¶åŸ¡ããããã«äœ¿çšãããŸãã
-ftrapv
ãã®ãªãã·ã§ã³ã¯ãå ç®ãæžç®ã
ä¹ç®æŒç®ã
-fwrapv
ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã©ã«ãã®ç¬Šå·ä»ãç®è¡ãªãŒããŒãããŒãæ³å®ããããã«æ瀺ããŸãã
å ç®ãæžç®ãä¹ç®ã¯XNUMXã®è£æ°ã䜿çšããŠã©ããã¢ã©ãŠã³ãããŸã
è¡šçŸã ãã®ãã©ã°ã¯ãäžéšã®æé©åãæå¹ã«ããä»ã®æé©åãç¡å¹ã«ããŸãã ãã
Javaèšèªã§èŠæ±ãããããã«ããªãã·ã§ã³ã¯Javaããã³ããšã³ãã§ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
ä»æ§ã
-äŸå€
äŸå€åŠçãæå¹ã«ããŸãã äŸå€ãäŒæããããã«å¿ èŠãªè¿œå ã®ã³ãŒããçæããŸãã çºã«
äžéšã®ã¿ãŒã²ããã§ã¯ãããã¯GCCããã¹ãŠã®æ©èœã®ãã¬ãŒã ã¢ã³ã¯ã€ã³ãæ å ±ãçæããããšãæå³ããŸãã
圱é¿ã¯ãããŸããããããªãã®ããŒã¿ãµã€ãºã®ãªãŒããŒããããçºçããå¯èœæ§ããããŸã
å®è¡ã ãã®ãªãã·ã§ã³ãæå®ããªãå ŽåãGCCã¯èšèªã«å¯ŸããŠããã©ã«ãã§ãã®ãªãã·ã§ã³ãæå¹ã«ããŸã
éåžžã¯äŸå€åŠçãå¿ èŠãšããC++ã®ããã«ã次ã®ãããªèšèªã§ã¯äŸå€åŠçãç¡å¹ã«ããŸãã
éåžžãããå¿ èŠãšããªãCã ãã ãã次ã®å Žåã«ãã®ãªãã·ã§ã³ãæå¹ã«ããå¿ èŠãããå ŽåããããŸã
èšè¿°ãããäŸå€ãã³ãã©ãŒãšé©åã«çžäºéçšããå¿ èŠãããCã³ãŒãã®ã³ã³ãã€ã«
C++ã§ã å€ãC++ãã³ã³ãã€ã«ããå Žåã¯ããã®ãªãã·ã§ã³ãç¡å¹ã«ããããšãã§ããŸãã
äŸå€åŠçã䜿çšããªãããã°ã©ã ã
-fnon-call-äŸå€
ãã©ããåœä»€ãäŸå€ãã¹ããŒã§ããããã«ããã³ãŒããçæããŸãã ããã«æ³šæããŠãã ãã
ã©ãã«ãååšããªããã©ãããã©ãŒã åºæã®ã©ã³ã¿ã€ã ãµããŒããå¿ èŠã§ãã ããã«ã
ããã¯èš±å¯ããã ãã§ã ãã©ããã³ã° äŸå€ãã¹ããŒããããã®åœä»€ãã€ãŸãã¡ã¢ãªåç §ãŸãã¯
æµ®åå°æ°ç¹åœä»€ã ä»»æã®ããäŸå€ãã¹ããŒããããšã¯ã§ããŸãã
ãSIGALRMããªã©ã®ã·ã°ãã«ãã³ãã©ãŒã
-fdelete-dead-äŸå€
äŸå€ãã¹ããŒããå¯èœæ§ããããããã以å€ã®å Žåã¯å¯äžããªãåœä»€ãèæ ®ããŠãã ãã
ããã°ã©ã ã®å®è¡ãæé©åããããšãã§ããŸãã ãã®ãªãã·ã§ã³ã¯ããã©ã«ãã§æå¹ã«ãªã£ãŠããŸã
Adaèšèªä»æ§ã§èš±å¯ãããŠããããã«ãAdaããã³ããšã³ãã®å Žåã æé©å
ãããäŸå€ãåé€ãããã¹ã¯ãç°ãªãå Žæã§åå¥ã«æå¹ã«ãªããŸã
æé©åã¬ãã«ã
-funwind-ããŒãã«
ãã㊠-äŸå€ããã ããå¿ èŠãªéçããŒã¿ãçæããã ãã§ããã
çæãããã³ãŒãã«ä»ã®æ¹æ³ã§åœ±é¿ãäžããããšã¯ãããŸããã éåžžãããå¿ èŠã¯ãããŸãã
ãã®ãªãã·ã§ã³ãæå¹ã«ããŸãã 代ããã«ããã®åŠçãå¿ èŠãšããèšèªããã»ããµããããå¯èœã«ããŸã
ããªãã«ä»£ãã£ãŠã
-fasynchronous-unwind-tables
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããå Žåã¯ãDWARF2圢åŒã§ã¢ã³ã¯ã€ã³ãããŒãã«ãçæããŸãã ããŒãã«ã¯
ååœä»€å¢çã§æ£ç¢ºã§ãããããã¹ã¿ãã¯ã®å·»ãæ»ãã«äœ¿çšã§ããŸãã
éåæã€ãã³ãïŒãããã¬ãŒãã¬ããŒãžã³ã¬ã¯ã¿ãŒãªã©ïŒã
-fno-gnu-ãŠããŒã¯
æè¿ã®GNUã¢ã»ã³ãã©ãšCã©ã€ãã©ãªãåããã·ã¹ãã ã§ã¯ãC++ã³ã³ãã€ã©ã¯
ãã³ãã¬ãŒãéçããŒã¿ã¡ã³ããŒã®å®çŸ©ã確èªããããã®ãSTB_GNU_UNIQUEããã€ã³ãã£ã³ã°
ã€ã³ã©ã€ã³é¢æ°ã®éçããŒã«ã«å€æ°ã¯ã
"RTLD_LOCAL"; ããã¯ãXNUMXã€ã®ç°ãªãã©ã€ãã©ãªã§äœ¿çšãããã©ã€ãã©ãªã®åé¡ãåé¿ããããã«å¿ èŠã§ãã
ãRTLD_LOCALããã©ã°ã€ã³ã¯ããã®ãã¡ã®XNUMXã€ã§å®çŸ©ã«äŸåããŠããããã
ã·ã³ãã«ã®çµåã«ã€ããŠä»ã®äººãšæèŠãåããªãã ããããããã¯åå ã«ãªããŸã
圱é¿ãåããDSOã§ã¯ãdlcloseãã¯ç¡èŠãããŸãã ããã°ã©ã ãååæåã«äŸåããŠããå Žå
ãdlcloseãããã³ãdlopenããä»ããDSOã®å Žåã次ã䜿çšã§ããŸãã -fno-gnu-ãŠããŒã¯.
-fpcc-æ§é äœ-ãªã¿ãŒã³
ãçãããæ§é äœããšãå ±çšäœãã®å€ããé·ãå€ã§ã¯ãªããé·ãå€ã®ããã«ã¡ã¢ãªã«è¿ããŸãã
ã¬ãžã¹ã¿ã ãã®èŠåã¯å¹çãäœããªããŸããã次ã®ããšãã§ãããšããå©ç¹ããããŸãã
GCCã§ã³ã³ãã€ã«ããããã¡ã€ã«ãšä»ã®ã³ã³ãã€ã©ã§ã³ã³ãã€ã«ããããã¡ã€ã«éã®çžäºåŒã³åºãå¯èœæ§
ç¹ã«ããŒã¿ãã«Cã³ã³ãã€ã©ïŒpccïŒã
ã¡ã¢ãªå ã®æ§é ãè¿ãããã®æ£ç¢ºãªèŠåã¯ãã¿ãŒã²ããã«ãã£ãŠç°ãªããŸã
æ§æãã¯ãã
çãæ§é ãšãŠããªã³ã¯ããµã€ãºãšé 眮ãäžéšã®ãã®ãšäžèŽãããã®ã§ãã
æŽæ°åã
èŠåïŒ ã§ã³ã³ãã€ã«ãããã³ãŒã -fpcc-æ§é äœ-ãªã¿ãŒã³ ã¹ã€ããã¯ãã€ããªäºæã§ã¯ãããŸãã
ã§ã³ã³ãã€ã«ãããã³ãŒã㧠-freg-æ§é äœ-ãªã¿ãŒã³ ã¹ã€ããã éã«æºæ ããããã«ããã䜿çšããŠãã ãã
ããã©ã«ãã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã
-freg-æ§é äœ-ãªã¿ãŒã³
å¯èœãªå Žåã¯ãã¬ãžã¹ã¿ã®ãstructãå€ãšãunionãå€ãè¿ããŸãã ããã¯ããå¹ççã§ã
å°ããªæ§é ç©ã®å Žå -fpcc-æ§é äœ-ãªã¿ãŒã³.
ã©ã¡ããæå®ããªãå Žå -fpcc-æ§é äœ-ãªã¿ãŒã³ ãŸã -freg-æ§é äœ-ãªã¿ãŒã³ãGCCã®ããã©ã«ãã¯
ã¿ãŒã²ããã®æšæºã®èŠåã æšæºçãªèŠåããªãå Žåã¯ã
GCCã®ããã©ã«ã㯠-fpcc-æ§é äœ-ãªã¿ãŒã³ãGCCãããªã³ã·ãã«ã§ããã¿ãŒã²ãããé€ã
ã³ã³ãã€ã©ã ãã®ãããªå Žåã¯ãæšæºãéžæã§ããããå¹ççãªãã®ãéžæããŸãã
代æ¿ãç»é²ããŸãã
èŠåïŒ ã§ã³ã³ãã€ã«ãããã³ãŒã -freg-æ§é äœ-ãªã¿ãŒã³ ã¹ã€ããã¯ãã€ããªäºæã§ã¯ãããŸãã
ã§ã³ã³ãã€ã«ãããã³ãŒã㧠-fpcc-æ§é äœ-ãªã¿ãŒã³ ã¹ã€ããã éã«æºæ ããããã«ããã䜿çšããŠãã ãã
ããã©ã«ãã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã
-fshort-åæå
宣èšãããç¯å²ã«å¿ èŠãªãã€ãæ°ã ãããåæåãã¿ã€ãã«å²ãåœãŠãŸãã
å¯èœãªå€ã å ·äœçã«ã¯ããåæåãã¿ã€ãã¯æå°ã®æŽæ°ã«çžåœããŸã
äœè£ã®ããã¿ã€ãã
èŠåïŒ ã -fshort-åæå ã¹ã€ããã䜿çšãããšãGCCã¯ãã€ããªã§ã¯ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ããããŸãã éã«æºæ ããããã«ããã䜿çšããŠãã ãã
ããã©ã«ãã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã
-fshort-double
ãããã«ãã¯ããããŒãããšåããµã€ãºã䜿çšããŠãã ããã
èŠåïŒ ã -fshort-double ã¹ã€ããã䜿çšãããšãGCCã¯ãã€ããªã§ã¯ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ããããŸãã éã«æºæ ããããã«ããã䜿çšããŠãã ãã
ããã©ã«ãã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã
-fshort-wchar
ã®åºã«ãªãåããªãŒããŒã©ã€ãããŸã wchar_t ããã«ããã«ã¯ çã 眲åãããŠããªã intå ãã®ä»£ããã«
ã¿ãŒã²ããã®ããã©ã«ãã ãã®ãªãã·ã§ã³ã¯ãå®è¡ããããã°ã©ã ãäœæããå Žåã«äŸ¿å©ã§ãã
ã¯ã€ã³ã
èŠåïŒ ã -fshort-wchar ã¹ã€ããã䜿çšãããšãGCCã¯ãã€ããªã§ã¯ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ããããŸãã éã«æºæ ããããã«ããã䜿çšããŠãã ãã
ããã©ã«ãã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã
-fno-common
Cã³ãŒãã§ã¯ãåæåãããŠããªãã°ããŒãã«å€æ°ã®é 眮ãå¶åŸ¡ããŸãã UnixCã³ã³ãã€ã©
åŸæ¥ããã®ãããªå€æ°ã®è€æ°ã®å®çŸ©ãç°ãªããã®ã§èš±å¯ããŠããŸãã
å€æ°ãå ±éã®ãããã¯ã«é 眮ããããšã«ããã³ã³ãã€ã«åäœã ãããåäœã§ã
ã«ãã£ãŠæå®ããã -fcommonãããã³ã»ãšãã©ã®ã¿ãŒã²ããã§ã®GCCã®ããã©ã«ãã§ãã äžæ¹ã§ã
ãã®åäœã¯ISOCã§ã¯å¿ èŠãããŸãããäžéšã®ã¿ãŒã²ããã§ã¯ãé床ãŸãã¯ã³ãŒããå«ãŸããå ŽåããããŸãã
å€æ°åç §ã®ãµã€ãºããã«ãã£ã The -fno-common ãªãã·ã§ã³ã¯ã
ã³ã³ãã€ã©ã¯ãåæåãããŠããªãã°ããŒãã«å€æ°ããªããžã§ã¯ãã®ããŒã¿ã»ã¯ã·ã§ã³ã«é 眮ããå¿ èŠããããŸã
ããããå ±éã®ãããã¯ãšããŠçæããã®ã§ã¯ãªãããã¡ã€ã«ã ããã«ã¯ã
XNUMXã€ã®ç°ãªãã³ã³ãã€ã«ã§åãå€æ°ãïŒãexternããªãã§ïŒå®£èšããããšã
ãããããªã³ã¯ãããšãè€æ°å®çŸ©ãšã©ãŒãçºçããŸãã ãã®å Žåãã§ã³ã³ãã€ã«ããå¿ èŠããããŸã
-fcommon 代ããã¯ã ã§ã³ã³ãã€ã« -fno-common ããã察象ãšãªãã¿ãŒã²ããã«åœ¹ç«ã¡ãŸã
ããè¯ãããã©ãŒãã³ã¹ãæäŸããŸãããŸãã¯ããã°ã©ã ãåäœããããšã確èªãããå Žå
åæåãããŠããªãå€æ°å®£èšãåžžã«ãã®ããã«æ±ãä»ã®ã·ã¹ãã ã
-fno-ident
ç¡èŠãã #identity æ什ã
-finhibit ãµã€ãº ãã£ã¬ã¯ãã£ã
ã.sizeãã¢ã»ã³ãã©ãã£ã¬ã¯ãã£ããªã©ãåé¡ãåŒãèµ·ãããããªãã®ã¯åºåããªãã§ãã ããã
é¢æ°ãäžå€®ã§åå²ãããXNUMXã€ã®ååãé ãã®å Žæã«é 眮ãããŠããå Žå
ã¡ã¢ãªå ã§é¢ããŠã ãã®ãªãã·ã§ã³ã¯ãã³ã³ãã€ã«æã«äœ¿çšãããŸã crtstuff.c; ããªãã¯å¿ èŠãªãã¯ãã§ã
ä»ã®çšéã«äœ¿çšããŸãã
-fverbose-asm
çæãããã¢ã»ã³ããªã³ãŒãã«è¿œå ã®è§£èª¬æ å ±ãè¿œå ããŠãããå€ãã®æ å ±ãäœæããŸã
èªã¿åãå¯èœã ãã®ãªãã·ã§ã³ã¯éåžžãå®éã«èªãå¿ èŠããã人ã«ã®ã¿äœ¿çšãããŸãã
çæãããã¢ã»ã³ããªã³ãŒãïŒããããã³ã³ãã€ã©èªäœã®ãããã°äžïŒã
-fno-verbose-asmãããã©ã«ãã§ã¯ãè¿œå æ å ±ãçç¥ããã
XNUMXã€ã®ã¢ã»ã³ãã©ãã¡ã€ã«ãæ¯èŒãããšãã«äŸ¿å©ã§ãã
-frecord-gcc-ã¹ã€ãã
ãã®ã¹ã€ããã«ãããã³ã³ãã€ã©ãŒã®åŒã³åºãã«äœ¿çšãããã³ãã³ãã©ã€ã³ãèšé²ãããŸãã
äœæäžã®ãªããžã§ã¯ããã¡ã€ã«ã ãã®ã¹ã€ããã¯äžéšã«ã®ã¿å®è£ ãããŠããŸã
ã¿ãŒã²ãããšèšé²ã®æ£ç¢ºãªåœ¢åŒã¯ãã¿ãŒã²ãããšãã€ããªãã¡ã€ã«åœ¢åŒã§ãã
äŸåããŸãããéåžžã¯ASCIIããã¹ããå«ãã»ã¯ã·ã§ã³ã®åœ¢åŒãåããŸãã ãã
ã¹ã€ããã¯ã«é¢é£ããŠããŸã -fverbose-asm ã¹ã€ãããããããã®ã¹ã€ããã¯èšé²ããã ãã§ã
ã¢ã»ã³ãã©åºåãã¡ã€ã«å ã®æ å ±ã¯ã³ã¡ã³ããšããŠè¡šç€ºãããããããªããžã§ã¯ãã«å°éããããšã¯ãããŸãã
ãã¡ã€ã«ã ãåç §ããŠãã ãã -grecord-gcc-ã¹ã€ãã ã³ã³ãã€ã©ãªãã·ã§ã³ãã«æ ŒçŽããå¥ã®æ¹æ³
ãªããžã§ã¯ããã¡ã€ã«ã
-fpic
å ±æã©ã€ãã©ãªã§ã®äœ¿çšã«é©ããäœçœ®ç¬ç«ã³ãŒãïŒPICïŒãçæããå Žå
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããŸãã ãã®ãããªã³ãŒãã¯ã
ã°ããŒãã«ãªãã»ããããŒãã«ïŒGOTïŒã ãã€ãããã¯ããŒããŒã¯ã次ã®å Žåã«GOTãšã³ããªã解決ããŸãã
ããã°ã©ã ãèµ·åããŸãïŒãã€ãããã¯ããŒããŒã¯GCCã®äžéšã§ã¯ãªãããªãã¬ãŒãã£ã³ã°ã®äžéšã§ãã
ã·ã¹ãã ïŒã ãªã³ã¯ãããå®è¡å¯èœãã¡ã€ã«ã®GOTãµã€ãºããã·ã³åºæã®æ倧å€ãè¶ ããå Žå
ãµã€ãºã®å Žåããªã³ã«ãŒãã次ã®ãããªãšã©ãŒã¡ãã»ãŒãžã衚瀺ãããŸãã -fpic åäœããŸãã; ã®
ãã®å Žåã¯ãã§åã³ã³ãã€ã«ããŸã -fPIC 代ããã¯ã ïŒãããã®æ倧å€ã¯ãSPARCã§ã¯8kã32kã§ãã
m68k ãš RS/6000 ã§ã 386 ã«ã¯ãã®ãããªå¶éã¯ãããŸããã)
äœçœ®ã«äŸåããªãã³ãŒãã«ã¯ç¹å¥ãªãµããŒããå¿ èŠã§ããããã
ç¹å®ã®ãã·ã³ã 386 ã®å ŽåãGCC 㯠System V ã® PIC ããµããŒãããŸãããSun ã® PIC ã¯ãµããŒãããŸãã
386iã IBM RS / 6000çšã«çæãããã³ãŒãã¯ãåžžã«äœçœ®ã«äŸåããŸããã
ãã®ãã©ã°ãèšå®ãããŠããå Žåããã¯ãã__pic__ãããã³ã__PIC__ãã¯1ã«å®çŸ©ãããŸãã
-fPIC
ã¿ãŒã²ãããã·ã³ã§ãµããŒããããŠããå Žåã¯ãäœçœ®ã«äŸåããªãã³ãŒããçºè¡ããŸãã
åçãªã³ã¯ãšã°ããŒãã«ãªãã»ããããŒãã«ã®ãµã€ãºã®å¶éã®åé¿ã ãã
ãªãã·ã§ã³ã¯ãm68kãPowerPCãããã³SPARCã§éããçã¿ãŸãã
äœçœ®ã«äŸåããªãã³ãŒãã«ã¯ç¹å¥ãªãµããŒããå¿ èŠã§ããããã
ç¹å®ã®ãã·ã³ã
ãã®ãã©ã°ãèšå®ãããŠããå Žåããã¯ãã__pic__ãããã³ã__PIC__ãã¯2ã«å®çŸ©ãããŸãã
-fpie
-fPIE
ãããã®ãªãã·ã§ã³ã¯æ¬¡ã®ããã«ãªããŸã -fpic ãš -fPICããã ããäœçœ®ã«äŸåããªãã³ãŒããçæ
å®è¡å¯èœãã¡ã€ã«ã«ã®ã¿ãªã³ã¯ã§ããŸãã éåžžããããã®ãªãã·ã§ã³ã¯æ¬¡ã®å Žåã«äœ¿çšãããŸã -ã〠GCC
ãªãã·ã§ã³ã¯ãªã³ã¯äžã«äœ¿çšãããŸãã
-fpie ãš -fPIE ã©ã¡ãããã¯ãã__pie__ããšã__PIE__ããå®çŸ©ããŸãã ãã¯ãã«ã¯
ã®å€1 -fpie ãš2çš -fPIE.
-fno-ãžã£ã³ãããŒãã«
ããå¹ççãªå Žåã§ããswitchã¹ããŒãã¡ã³ãã«ãžã£ã³ãããŒãã«ã䜿çšããªãã§ãã ãã
ä»ã®ã³ãŒãçææŠç¥ãããã ãã®ãªãã·ã§ã³ã¯ã
-fpic or -fPIC ãã€ãããã¯ãªã³ã«ã®äžéšã圢æããã§ããªãã³ãŒããæ§ç¯ãããã
ãžã£ã³ãããŒãã«ã®ã¢ãã¬ã¹ãåç §ããŸãã äžéšã®ã¿ãŒã²ããã§ã¯ããžã£ã³ãããŒãã«ã¯å¿ èŠãããŸãã
GOTãšãã®ãªãã·ã§ã³ã¯å¿ èŠãããŸããã
-ä¿®æ£æžã¿-REG
ååã®ä»ããã¬ãžã¹ã¿ãæ±ããŸã REG åºå®ã¬ãžã¹ã¿ãšããŠ; çæãããã³ãŒãã¯æ±ºããŠåç §ããŠã¯ãªããŸãã
ããïŒããããã¹ã¿ãã¯ãã€ã³ã¿ããã¬ãŒã ãã€ã³ã¿ããŸãã¯ãã®ä»ã®åºå®ããã圹å²ãé€ãïŒã
REG ã¬ãžã¹ã¿ã®ååã§ããå¿ èŠããããŸãã åãå ¥ããããã¬ãžã¹ã¿åã¯ãã·ã³åºæã§ã
ããã³ã¯ããã·ã³èšè¿°ãã¯ããã¡ã€ã«ã®ãREGISTER_NAMESããã¯ãã§å®çŸ©ãããŠããŸãã
ãã®ãã©ã°ã¯ãXNUMXæ¹åã®éžæãæå®ãããããè² ã®åœ¢åŒã«ã¯ãªããŸããã
-fcall-used-REG
ååã®ä»ããã¬ãžã¹ã¿ãæ±ããŸã REG é¢æ°ã«ãã£ãŠç Žå£ãããå²ãåœãŠå¯èœãªã¬ãžã¹ã¿ãšããŠ
åŒã³åºããŸãã ããã¯ãäžæçãŸãã¯å€æ°ã«å²ãåœãŠãããå¯èœæ§ããããŸãã
é»è©±ã ãã®æ¹æ³ã§ã³ã³ãã€ã«ãããé¢æ°ã¯ãã¬ãžã¹ã¿ãä¿åããã³åŸ©å ããŸãã REG.
ãã®ãã©ã°ããã¬ãŒã ãã€ã³ã¿ãŸãã¯ã¹ã¿ãã¯ãã€ã³ã¿ã§äœ¿çšãããšãšã©ãŒã«ãªããŸãã ããã®äœ¿çš
ãã·ã³ã®å®è¡ã§åºç¯ãªåœ¹å²ãåºå®ãããŠããä»ã®ã¬ãžã¹ã¿ã®ãã©ã°
ã¢ãã«ã¯æ²æšãªçµæãçã¿åºããŸãã
ãã®ãã©ã°ã¯ãXNUMXæ¹åã®éžæãæå®ãããããè² ã®åœ¢åŒã«ã¯ãªããŸããã
-fcall-ä¿åæžã¿-REG
ååã®ä»ããã¬ãžã¹ã¿ãæ±ããŸã REG é¢æ°ã«ãã£ãŠä¿åãããå²ãåœãŠå¯èœãªã¬ãžã¹ã¿ãšããŠã ããããç¥ããªã
ã³ãŒã«å šäœã«ååšããäžæçãŸãã¯å€æ°ã«ãå²ãåœãŠãããŸãã æ©èœ
ãã®æ¹æ³ã§ã³ã³ãã€ã«ãããšãã¬ãžã¹ã¿ãä¿åããã³åŸ©å ãããŸã REG 圌ããããã䜿çšããå Žåã
ãã®ãã©ã°ããã¬ãŒã ãã€ã³ã¿ãŸãã¯ã¹ã¿ãã¯ãã€ã³ã¿ã§äœ¿çšãããšãšã©ãŒã«ãªããŸãã ããã®äœ¿çš
ãã·ã³ã®å®è¡ã§åºç¯ãªåœ¹å²ãåºå®ãããŠããä»ã®ã¬ãžã¹ã¿ã®ãã©ã°
ã¢ãã«ã¯æ²æšãªçµæãçã¿åºããŸãã
ã¬ãžã¹ã¿ã«ãã®ãã©ã°ã䜿çšãããšãå¥ã®çš®é¡ã®çœå®³ãçºçããŸãã
é¢æ°å€ãè¿ãããå ŽåããããŸãã
ãã®ãã©ã°ã¯ãXNUMXæ¹åã®éžæãæå®ãããããè² ã®åœ¢åŒã«ã¯ãªããŸããã
-fpack-struct [=n]
å€ãæå®ããã«ããã¹ãŠã®æ§é äœéšæãç©Žãªãã§äžç·ã«æ¢±å ããŸãã ãã€
å€ãæå®ãããŠããïŒXNUMXã®å°ããªçŽ¯ä¹ã§ããå¿ èŠããããŸãïŒãæ§é äœã¡ã³ããŒãããã¯ããŸã
ãã®å€ã«åŸã£ãŠãæ倧ã®é 眮ãè¡šããŸãïŒã€ãŸãã
ãããã倧ããããã©ã«ãã®ã¢ã©ã€ã¡ã³ãèŠä»¶ã¯ãæœåšçã«ã¢ã©ã€ã¡ã³ããããŠããªãç¶æ ã§åºåãããŸãã
次ã®ãã£ããã£ã³ã°å Žæã
èŠåïŒ ã -fpack-æ§é äœ ã¹ã€ããã䜿çšãããšãGCCã¯ãã€ããªã§ã¯ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ããããŸãã ããã«ãããã¯ã³ãŒããäœããŸã
æé©ã§ã¯ãããŸããã ããã䜿çšããŠãããã©ã«ã以å€ã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã«æºæ ããŸãã
-finstrument-é¢æ°
é¢æ°ãžã®å ¥ãå£ãšåºå£ã®ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³åŒã³åºããçæããŸãã æ©èœçŽåŸ
ãšã³ããªããã³é¢æ°çµäºã®çŽåã«ã次ã®ãããã¡ã€ãªã³ã°é¢æ°ãåŒã³åºãããŸãã
çŸåšã®é¢æ°ã®ã¢ãã¬ã¹ãšãã®åŒã³åºããµã€ãã ïŒäžéšã®ãã©ãããã©ãŒã ã§ã¯ã
ã__builtin_return_addressãã¯çŸåšã®æ©èœãè¶ ããŠæ©èœããªããããåŒã³åºããµã€ã
ããããªããšããããã¡ã€ãªã³ã°æ©èœã§æ å ±ãå©çšã§ããªãå ŽåããããŸããïŒ
void __cyg_profile_func_enterïŒvoid * this_fnã
void * call_siteïŒ;
void __cyg_profile_func_exitïŒvoid * this_fnã
void * call_siteïŒ;
æåã®åŒæ°ã¯ãçŸåšã®é¢æ°ã®éå§ã¢ãã¬ã¹ã§ãã
ã·ã³ãã«ããŒãã«ã§æ£ç¢ºã«èª¿ã¹ãŸããã
ãã®ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ã¯ãä»ã®é¢æ°ã§ã€ã³ã©ã€ã³ã«æ¡åŒµãããé¢æ°ã«å¯ŸããŠãå®è¡ãããŸãã
ãããã¡ã€ãªã³ã°åŒã³åºãã¯ãæŠå¿µçã«ã¯ãã€ã³ã©ã€ã³é¢æ°ãå ¥åãããå Žæãš
çµäºããŸããã ããã¯ããã®ãããªé¢æ°ã®ã¢ãã¬ã¹å¯èœãªããŒãžã§ã³ãå©çšå¯èœã§ãªããã°ãªããªãããšãæå³ããŸãã ããã
é¢æ°ã®ãã¹ãŠã®äœ¿çšã¯ã€ã³ã©ã€ã³ã§æ¡åŒµãããŸããããã¯ãè¿œå ã®æ¡åŒµãæå³ããå ŽåããããŸã
ã³ãŒããµã€ãºã 䜿çšããå Žå å€éš ã€ã³ã©ã€ã³ ããªãã®Cã³ãŒãã§ã¯ããã®ãããªã¢ãã¬ã¹æå®å¯èœãªããŒãžã§ã³
æ©èœãæäŸããå¿ èŠããããŸãã ïŒãšã«ããããã¯éåžžã®å Žåã§ãããéãè¯ããã°
ãªããã£ãã€ã¶ãŒã¯åžžã«é¢æ°ãã€ã³ã©ã€ã³ã§å±éããŸãã
éçã³ããŒãæäŸããã«ã)
é¢æ°ã«å±æ§ãno_instrument_functionããæå®ã§ããŸãããã®å Žåãããã¯
èšè£ ã¯è¡ãããŸããã ããã¯ãããšãã°ããããã¡ã€ãªã³ã°ã«äœ¿çšã§ããŸã
äžèšã®é¢æ°ãåªå 床ã®é«ãå²ã蟌ã¿ã«ãŒãã³ãããã³ãã®å ãšãªãé¢æ°
ãããã¡ã€ãªã³ã°é¢æ°ãå®å šã«åŒã³åºãããšã¯ã§ããŸããïŒãããããã·ã°ãã«ãã³ãã©ãŒã®å Žå
ãããã¡ã€ãªã³ã°ã«ãŒãã³ã¯ãåºåãçæããããã¡ã¢ãªãå²ãåœãŠãŸãïŒã
-finstrument-functions-exclude-file-list =file,fileã...
ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ããé€å€ãããæ©èœã®ãªã¹ããèšå®ããŸãïŒèª¬æãåç §ããŠãã ããïŒ
ã-finstrument-functionsãã®ïŒã é¢æ°å®çŸ©ãå«ããã¡ã€ã«ãäžèŽããå Žå
ã®ãããããš fileããã®å Žåããã®é¢æ°ã¯ã€ã³ã¹ãã«ã¡ã³ããããŸããã è©Šåã¯äžã§è¡ãããŸã
ãµãã¹ããªã³ã°ïŒ file ãã©ã¡ãŒã¿ã¯ãã¡ã€ã«åã®ãµãã¹ããªã³ã°ã§ããã次ã®ããã«èŠãªãããŸãã
äžèŽããã
äŸïŒ
-finstrument-functions-exclude-file-list = / bits / stlãinclude / sys
ãã¹åã«ã/bits/stlããŸãã¯
ãã€ã³ã¯ã«ãŒã/ã·ã¹ãã
äœããã®çç±ã§ãæåã,ãã symã æžããŸã 'ã'ã çºã«
äŸ: "-finstrument-functions-exclude-file-list=',,tmp'" (äžéåŒçšç¬Šã«æ³šæããŠãã ãã)
ãªãã·ã§ã³ãå²ãïŒã
-finstrument-functions-exclude-function-list =sym,symã...
ããã¯ã-finstrument-functions-exclude-file-listãã«äŒŒãŠããŸããããã®ãªãã·ã§ã³ã¯
ã€ã³ã¹ãã«ã¡ã³ããŒã·ã§ã³ããé€å€ãããé¢æ°åã®ãªã¹ãã ãžã®é¢æ°å
äžèŽããã®ã¯ãããã¯ã¿ãŒããªã©ã®ãŠãŒã¶ãŒã«è¡šç€ºãããååã§ãã äœãšãïŒå®æ°ãã¯ãã«&)",
å éšãã³ã°ã«å (äŸ: "_Z4blahRSt6vectorIiSaiEE") ã§ã¯ãããŸããã è©Šåã¯çµäº
éšåæååã«ã€ããŠ: sym ãã©ã¡ãŒã¿ã¯é¢æ°åã®éšåæååã§ãã
äžèŽãããšèŠãªãããŸãã C99 ããã³ C++ æ¡åŒµèå¥åã®å Žåãé¢æ°å
ãŠãããŒãµã«æååã䜿çšããã«ãUTF-8 ã§æå®ããå¿ èŠããããŸãã
-fstack-ãã§ãã¯
ã¹ã¿ãã¯ã®å¢çãè¶ ããªãããšã確èªããã³ãŒããçæããŸãã åã¯
è€æ°ã®ã¹ã¬ãããããç°å¢ã§å®è¡ããŠããå Žåã¯ããã®ãã©ã°ãæå®ããå¿ èŠããããŸãã
ãã ããã¹ã¿ãã¯ä»¥éãã·ã³ã°ã«ã¹ã¬ããç°å¢ã§æå®ããå¿ èŠãããããšã¯ãã£ãã«ãããŸããã
ã¹ã¿ãã¯ãXNUMXã€ãããªãå ŽåããªãŒããŒãããŒã¯ã»ãŒãã¹ãŠã®ã·ã¹ãã ã§èªåçã«æ€åºãããŸãã
ãã®åãæ¿ãã«ãã£ãŠå®éã«ãã§ãã¯ãè¡ãããããã§ã¯ãªãããšã«æ³šæããŠãã ããã éå¶
ã·ã¹ãã ãŸãã¯èšèªã©ã³ã¿ã€ã ããããè¡ãå¿ èŠããããŸãã ã¹ã€ããã«ãããã³ãŒããçæãããŸãã
ã¹ã¿ãã¯ãæ¡åŒµãããŠããããšã確èªããŠãã ããã
ããã«æååãã©ã¡ãŒã¿ãŒãæå®ã§ããŸãããnoãã¯ãã§ãã¯ãªãããgenericãã¯ãgenericããæå³ããŸãã
å€ãã¹ã¿ã€ã«ã®ãã§ãã¯ã®äœ¿çšã匷å¶ããããšãæå³ãããç¹å®ãã¯æè¯ã®ãã§ãã¯ã䜿çšããããšãæå³ããŸã
ã¡ãœããã§ãbare ãšåçã§ã -fstack-ãã§ãã¯.
å€ãã¹ã¿ã€ã«ã®ãã§ãã¯ã¯ãç¹å®ã®ã¿ãŒã²ãããµããŒããå¿ èŠãšããªãäžè¬çãªã¡ã«ããºã ã§ãã
ã³ã³ãã€ã©ã§ããã次ã®æ¬ ç¹ããããŸãã
1.ã©ãŒãžãªããžã§ã¯ãã®å€æŽãããå²ãåœãŠæŠç¥ïŒãããã¯åžžã«å²ãåœãŠãããŸã
ãµã€ãºãåºå®ãããå€ãè¶ ããå Žåã¯åçã«ã
2.é¢æ°ã®éçãã¬ãŒã ã®ãµã€ãºã®å¶éãä¿®æ£ããŸããã
ç¹å®ã®æ©èœãã¹ã¿ãã¯ãã§ãã¯ã¯ä¿¡é Œã§ãããèŠåãçºè¡ãããŸã
ã³ã³ãã€ã©ã
3.éå¹çæ§ïŒå€æŽãããå²ãåœãŠæŠç¥ãšäžè¬çãª
å®è£ ã§ã¯ãã³ãŒãã®ããã©ãŒãã³ã¹ã劚ããããŸãã
å€ãã¹ã¿ã€ã«ã®ã¹ã¿ã㯠ãã§ãã¯ã¯ããç¹å®ãã®ãã©ãŒã«ãã㯠ã¡ãœããã§ãããããšã«æ³šæããŠãã ããã
ã¿ãŒã²ããã®ãµããŒããã³ã³ãã€ã©ã«è¿œå ãããŸããã
-fstack-limit-register =REG
-fstack-limit-symbol =sym
-fno-ã¹ã¿ãã¯å¶é
ã¹ã¿ãã¯ãç¹å®ã®å€ãè¶ ããªãããã«ããããã®ã³ãŒããçæããŸã
ã¬ãžã¹ã¿ã®å€ãŸãã¯ã·ã³ãã«ã®ã¢ãã¬ã¹ã ãã倧ããªã¹ã¿ãã¯ãå¿ èŠãªå Žåã¯ã
ä¿¡å·ã¯å®è¡æã«çºçããŸãã ã»ãšãã©ã®ã¿ãŒã²ããã§ã¯ãä¿¡å·ã¯ã¹ã¿ãã¯ã®åã«çºçããŸã
å¢çãè¶ããŠããŸãã®ã§ãç¹å¥ãªããšãããã«ä¿¡å·ããã£ããããããšãå¯èœã§ã
äºé²æªçœ®
ããšãã°ãã¹ã¿ãã¯ã絶察ã¢ãã¬ã¹ã§å§ãŸãå Žå 0x80000000 äžåãã«æé·ãã
ããªãã¯æã䜿ãããšãã§ããŸã -fstack-limit-symbol = __ stack_limit ãš
-Wlã--defsymã__ stack_limit = 0x7ffe0000 128KBã®ã¹ã¿ãã¯å¶éãé©çšããŸãã ãäºæ¿ãã ãã
ããã¯GNUãªã³ã«ãŒã§ã®ã¿æ©èœããå¯èœæ§ããããŸãã
-fsplit-ã¹ã¿ãã¯
ã¹ã¿ãã¯ããªãŒããŒãããŒããåã«ã¹ã¿ãã¯ãèªåçã«åå²ããã³ãŒããçæããŸãã çµæãšããŠ
ããã°ã©ã ã«ã¯äžé£ç¶ãªã¹ã¿ãã¯ããããããã°ã©ã ããªãŒããŒãããŒã§ããªãå Žåã«ã®ã¿ãªãŒããŒãããŒããå¯èœæ§ããããŸã
ãã以äžã®ã¡ã¢ãªãå²ãåœãŠãŸãã ããã¯ãã¹ã¬ããåãããããã°ã©ã ãå®è¡ãããšãã«æã圹ç«ã¡ãŸãã
åã¹ã¬ããã«äœ¿çšããé©åãªã¹ã¿ãã¯ãµã€ãºãèšç®ããå¿ èŠããªããªããŸããã ããã¯
çŸåšãGNU/Linux ãå®è¡ããŠãã i386 ããã³ x86_64 ããã¯ãšã³ãã«å¯ŸããŠã®ã¿å®è£ ãããŠããŸãã
ã³ãŒããã³ã³ãã€ã«ããå Žå -fsplit-ã¹ã¿ã㯠ãªãã§ã³ã³ãã€ã«ãããã³ãŒããåŒã³åºã -fsplit-ã¹ã¿ãã¯ã ãã
åŸè ã®ã³ãŒããå®è¡ããããã«å©çšã§ããã¹ã¿ãã¯ã¹ããŒã¹ãããŸããªãå ŽåããããŸãã ãã¹ãŠãã³ã³ãã€ã«ããå Žå
ã©ã€ãã©ãªã³ãŒããå«ãã³ãŒã -fsplit-ã¹ã¿ã㯠ãªãã·ã§ã³ã§ã¯ãªãå Žåããªã³ã«ãŒã¯æ¬¡ã®ããšãã§ããŸã
ãããã®åŒã³åºããä¿®æ£ããŠãã³ãŒããã³ã³ãã€ã«ããã«ã³ã³ãã€ã«ããããã«ããŸã -fsplit-ã¹ã¿ã㯠垞ã«å€§ãã
ã¹ã¿ãã¯ã ããã®ãµããŒãã¯ãGNUbinutilsãªãªãŒã¹ã®ãŽãŒã«ããªã³ã«ãŒã«å®è£ ãããŠããŸã
2.21以éã
-fleading-ã¢ã³ããŒã¹ã³ã¢
ãã®ãªãã·ã§ã³ãšããã«å¯Ÿå¿ãããã®ã -fno-å é ã®ã¢ã³ããŒã¹ã³ã¢ã匷å¶çã«æ¹æ³ãå€æŽããC
ã·ã³ãã«ã¯ãªããžã§ã¯ããã¡ã€ã«ã§è¡šãããŸãã XNUMXã€ã®çšéã¯ãã¬ã¬ã·ãŒãšã®ãªã³ã¯ãæ¯æŽããããšã§ã
ã¢ã»ã³ããªã³ãŒãã
èŠåïŒ ã -fleading-ã¢ã³ããŒã¹ã³ã¢ ã¹ã€ããã䜿çšãããšãGCCã¯ããã§ãªãã³ãŒããçæããŸã
ãã®ã¹ã€ãããªãã§çæãããã³ãŒããšäºææ§ã®ãããã€ããªã ã«æºæ ããããã«äœ¿çšããŸã
ããã©ã«ã以å€ã®ã¢ããªã±ãŒã·ã§ã³ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã ãã¹ãŠã®ã¿ãŒã²ãããå®å šãªãµããŒããæäŸããããã§ã¯ãããŸãã
ãã®ã¹ã€ããçšã
-ftls-model =
䜿çšããã¹ã¬ããããŒã«ã«ã¹ãã¬ãŒãžã¢ãã«ãå€æŽããŸãã The åŒæ°ã¯æ¬¡ã®ããããã§ããå¿ èŠããããŸã
ãglobal-dynamicãããlocal-dynamicãããinitial-execãããŸãã¯ãlocal-execãã 泚æããŠãã ãã
éžæã¯æé©åã®å¯Ÿè±¡ã§ããã³ã³ãã€ã©ã¯ãããå¹ççãªã¢ãã«ã䜿çšããå ŽåããããŸãã
翻蚳åäœã®å€ã«èšå·ã衚瀺ãããªãå ŽåããŸã㯠-fpic ã«äžããããŠããªã
ã³ãã³ãã©ã€ã³ã
ããã©ã«ããªã -fpic ãåæå®è¡ãã§ãã ãš -fpic ããã©ã«ãã¯
ãã°ããŒãã«ãã€ãããã¯ãã
-fvisibility =ããã©ã«ã|å éš|é衚瀺|ä¿è·
ããã©ã«ãã®ELFç»åã·ã³ãã«ã®å¯èŠæ§ãæå®ããããªãã·ã§ã³ã«èšå®ããŸã---ãã¹ãŠã®ã·ã³ãã«ã¯
ã³ãŒãå ã§ãªãŒããŒã©ã€ããããªãéããããã§ããŒã¯ãããŸãã ãã®æ©èœã䜿çšãããšãéåžžã«
å ±æãªããžã§ã¯ãã©ã€ãã©ãªã®ãªã³ã¯ãšããŒãæéãå€§å¹ ã«æ¹åããããå€ããçæããŸã
æé©åãããã³ãŒããã»ãŒå®å šãªAPIãšã¯ã¹ããŒããæäŸããã·ã³ãã«ã®è¡çªãé²ããŸãã ã§ã
匷ã é åžããå ±æãªããžã§ã¯ãã§ããã䜿çšããããšããå§ãããŸãã
åœåæ³ã«ããããããããããã©ã«ããã¯åžžã«ãããªãã¯ãæå³ããŸãã ã€ãŸãããªã³ã¯å¯èœ
å ±æãªããžã§ã¯ãã®å€éšããã ãä¿è·ããšãå éšãã¯ããªã圹ã«ç«ããªã
å®éã®äœ¿çšã§ã¯ãä»ã®äžè¬çã«äœ¿çšããããªãã·ã§ã³ã¯ãé衚瀺ãã®ã¿ã§ãã ããã©ã«ã
if -èŠèªæ§ æå®ãããŠããªãå Žåã¯ãããã©ã«ããã§ããã€ãŸãããã¹ãŠã®ã·ã³ãã«ãå ¬éããŸã---ãã
以åã®ããŒãžã§ã³ã® GCC ãšåãåäœãåŒãèµ·ãããŸãã
ELFã·ã³ãã«ãæ£ããããšã確èªããããšã«ãã£ãŠæäŸãããå©ç¹ã®é©åãªèª¬æ
å¯èŠæ§ã¯ãUlrichDrepperã«ãããå ±æã©ã€ãã©ãªã®æžãæ¹ãã«ãã£ãŠäžããããŸãïŒ
ã§èŠã€ãããŸããhttp://people.redhat.com/~drepper/>ïŒ---ããããåªãããœãªã¥ãŒã·ã§ã³ãäœãããŸãã
ããã©ã«ãããããªãã¯ã§ãããšãã«é衚瀺ã®ãã®ãããŒã¯ãããã®ãªãã·ã§ã³ã«ãã£ãŠå¯èœã«ãªãã®ã¯ã
ããã©ã«ãã®é衚瀺ã§ãå ¬éã®ããŒã¯ãä»ããŸãã ããã¯ãWindowsããã³Windowsäžã®DLLã®æšæºã§ãã
ã -fvisibility = hidden ããã³ã__attribute__ïŒïŒvisibilityïŒ "default"ïŒïŒïŒãã®ä»£ããã«
"__declspecïŒdllexportïŒ"ã¯ãåãæ§æã§ã»ãŒåãã»ãã³ãã£ã¯ã¹ãååŸããŸãã
ããã¯ãã¯ãã¹ãã©ãããã©ãŒã ãããžã§ã¯ãã§äœæ¥ãã人ã«ãšã£ãŠå€§ããªæ©æµã§ãã
æ¢åã®ã³ãŒãã«å¯èŠæ§ã®ãµããŒããè¿œå ããå Žåã¯ã #ãã©ã°ã GCC
èŠèªæ§ 䜿çšã®ã ããã¯ãèšå®ããã宣èšãå²ãããšã§æ©èœããŸã
with ã®å¯èŠæ§ (äŸ) #ãã©ã°ã GCC èŠèªæ§ ããã·ã¥ (é衚瀺) ãš #ãã©ã°ã GCC
èŠèªæ§ ããã. ã·ã³ãã«ã®å¯èŠæ§ã衚瀺ããå¿ èŠãããããšã«æ³šæããŠãã ãã as éš of ã
API ã€ã³ã¿ãã§ãŒã¹ çž®å°ããããšã¯ã§ããŸããã ãããã£ãŠããã¹ãŠã®æ°ããã³ãŒãã¯ãåžžã«å¯èŠæ§ãæå®ããå¿ èŠããããŸãã
ããã©ã«ãã§ã¯ãããŸããã ã€ãŸããããŒã«ã« DSO å ã§ã®ã¿äœ¿çšãã宣èšã¯ã åžžã«
PLT ã®éæ¥çãªãªãŒããŒããããåé¿ããããã«ãæ瀺çã«é衚瀺ãšããŠããŒã¯ãã --- ãããè¡ã
ååã«æ確ã§ããããšã¯ãã³ãŒãã®å¯èªæ§ãšèªå·±ææžåã«ã圹ç«ã¡ãŸãã ãäºæ¿ãã ãã
ISO C++ ä»æ§ã®èŠä»¶ã«ããã"operator new" ããã³ "operator delete" ã¯å¿ é ã§ãã
åžžã«ããã©ã«ãã®å¯èŠæ§ã«ãªããŸãã
ãããžã§ã¯ãå€éšããã®ããããŒãç¹ã«ã·ã¹ãã ããããŒãš
䜿çšããŠããä»ã®ã©ã€ãã©ãªã®ããããŒã¯ãã§ã³ã³ãã€ã«ãããããšãæåŸ ããŠããªãå¯èœæ§ããããŸã
ããã©ã«ã以å€ã®å¯èŠæ§ã ã¯ã£ããèšãå¿ èŠããããããããŸãã #ãã©ã°ã GCC
èŠèªæ§ ããã·ã¥(ããã©ã«ã) ãã®ãããªããããŒãå«ããåã«ã
å€éš 宣èšã¯åœ±é¿ãåããŸãã -èŠèªæ§ããããã£ãŠãå€ãã®ã³ãŒãã
ã§åã³ã³ãã€ã« -fvisibility = hidden å€æŽãªãã ãã ããããã¯
æ瀺çãªå¯èŠæ§ã®ãªããexternãé¢æ°ã®åŒã³åºãã¯PLTã䜿çšããããã
ã__attributeïŒïŒvisibilityïŒïŒãããã³/ãŸãã¯ã#pragmaGCCvisibilityãã䜿çšããŠäŒããã®ã«å¹æç
ãexternã宣èšãé衚瀺ãšããŠæ±ãå¿ èŠãããã³ã³ãã€ã©ã
泚æããŠãã ãã -èŠèªæ§ C++ã®ãããŸããªãªã³ã±ãŒãžãšã³ãã£ãã£ã«åœ±é¿ããŸãã ããã¯ã
ããšãã°ãDSOéã§ã¹ããŒãããäŸå€ã¯ã©ã¹ã¯ãæ瀺çã«ããŒã¯ããå¿ èŠããããŸã
ããã©ã«ãã®å¯èŠæ§ã§ã ã¿ã€ãæ å ± ããŒãã¯DSOéã§çµ±åãããŸãã
ãããã®ãã¯ããã¯ã®æŠèŠããããã®å©ç¹ãããã³ãããã®äœ¿çšæ¹æ³ã¯æ¬¡ã®ãšããã§ãã
<http://gcc.gnu.org/wiki/Visibility>.
-fstrict-volatile-ããããã£ãŒã«ã
ãã®ãªãã·ã§ã³ã¯ãæ®çºæ§ããããã£ãŒã«ãïŒãŸãã¯ä»ã®æ§é ïŒã«ã¢ã¯ã»ã¹ããå Žåã«äœ¿çšããå¿ èŠããããŸã
ãã£ãŒã«ãããã ãã³ã³ãã€ã©ã¯éåžžãããã®ã¿ã€ããå°éããŸãïŒåäžã䜿çšããå¿ èŠããããŸã
ãã£ãŒã«ãã®ã¿ã€ãã®å¹ ãžã®ã¢ã¯ã»ã¹ãå¯èœã§ããã°èªç¶ãªé 眮ã«åãããŸãã
ããšãã°ãã¡ã¢ãªããããããªãã§ã©ã«ã¬ãžã¹ã¿ãåããã¿ãŒã²ããã¯ããã®ãããªãã¹ãŠãå¿ èŠãšããå ŽåããããŸã
ã¢ã¯ã»ã¹ã¯16ãããå¹ ã«ãªããŸãã ãã®ãã©ã°ã䜿çšãããšããã¹ãŠã®ããªãã§ã©ã«ããããã£ãŒã«ãã宣èšã§ããŸã
ãunsignedshortãïŒãããã®ã¿ãŒã²ããã§shortã16ãããã§ãããšæ³å®ïŒãšããŠãGCCã«äœ¿çšã匷å¶ããŸã
ãããããããå¹ççãª16ãããã¢ã¯ã»ã¹ã®ä»£ããã«32ãããã¢ã¯ã»ã¹ã
ãã®ãªãã·ã§ã³ãç¡å¹ã«ãªã£ãŠããå Žåãã³ã³ãã€ã©ãŒã¯æãå¹ççãªåœä»€ã䜿çšããŸãã ã®äžã«
åã®äŸã§ã¯ãã¢ã¯ã»ã¹ããå Žåã§ãã32ãããã®ããŒãåœä»€ã§ããå¯èœæ§ããããŸã
ããããã£ãŒã«ãã®äžéšãå«ãŸãªããã€ãããŸãã¯ã¡ã¢ãªããããã¬ãžã¹ã¿
æŽæ°ãããŠãããã®ãšã¯ç¡é¢ä¿ã§ãã
ãpackedãå±æ§ãæ§é äœãã£ãŒã«ãã«é©çšãããå Žåãªã©ãå Žåã«ãã£ãŠã¯ã
æ£ããè¡ãããåäžã®èªã¿åããŸãã¯æžã蟌ã¿ã§ã¯ããã£ãŒã«ãã«ã¢ã¯ã»ã¹ã§ããªãå ŽåããããŸã
ã¿ãŒã²ãããã·ã³ã«åãããŠèª¿æŽãããŸãã ãã®å ŽåãGCCã¯è€æ°ã®çæã«ãã©ãŒã«ããã¯ããŸã
å®è¡æã«çµæã倱æãŸãã¯åãæšãŠãã³ãŒãã§ã¯ãªããã¢ã¯ã»ã¹ã
泚ïŒC / C ++ 11ã¡ã¢ãªã¢ãã«ã®å¶éã«ãããæžã蟌ã¿ã¢ã¯ã»ã¹ã¯èš±å¯ãããŠããŸãã
éããããã£ãŒã«ãã¡ã³ããŒã«ã¿ããããŸãã ãããã£ãŠãã®ãã¹ãŠã®ããããå®çŸ©ããããšããå§ãããŸã
ããããã£ãŒã«ãã¡ã³ããŒãšããŠã®ãã£ãŒã«ãã®ã¿ã€ãã
ãã®ãªãã·ã§ã³ã®ããã©ã«ãå€ã¯ãã¢ããªã±ãŒã·ã§ã³ã®ãã€ããªã€ã³ã¿ãŒãã§ã€ã¹ã«ãã£ãŠæ±ºå®ãããŸãã
ã¿ãŒã²ããããã»ããµã
-fsync-libcalls
ãã®ãªãã·ã§ã³ã¯ãã__syncããã¡ããªã®ã¢ãŠããªãã©ã€ã³ã€ã³ã¹ã¿ã³ã¹ããããã©ãããå¶åŸ¡ããŸãã
é¢æ°ã¯ãC ++11"__atomic"ãã¡ããªãŒã®é¢æ°ãå®è£ ããããã«äœ¿çšã§ããŸãã
ãã®ãªãã·ã§ã³ã®ããã©ã«ãå€ãæå¹ã«ãªã£ãŠããããããã®ãªãã·ã§ã³ã®å¯äžã®æçšãªåœ¢åŒ
is -fno-sync-libcallsã ãã®ãªãã·ã§ã³ã¯ã ãªããããã¯
ã©ã³ã¿ã€ã ã©ã€ãã©ãªã
ENVIRONMENT
ãã®ã»ã¯ã·ã§ã³ã§ã¯ãGCCã®åäœã«åœ±é¿ãäžããããã€ãã®ç°å¢å€æ°ã«ã€ããŠèª¬æããŸãã ããã€ã
ãããã®ããã€ãã¯ãããŸããŸãªçš®é¡ãæ€çŽ¢ãããšãã«äœ¿çšãããã£ã¬ã¯ããªãŸãã¯ãã¬ãã£ãã¯ã¹ãæå®ããããšã«ãã£ãŠæ©èœããŸã
ãã¡ã€ã«ã®ã äžéšã¯ãã³ã³ãã€ã«ç°å¢ã®ä»ã®åŽé¢ãæå®ããããã«äœ¿çšãããŸãã
次ã®ãããªãªãã·ã§ã³ã䜿çšããŠãæ€çŽ¢ããå Žæãæå®ããããšãã§ããŸãã -B, -I ãš -L.
ãããã¯ãç°å¢å€æ°ã䜿çšããŠæå®ãããå Žæãããåªå ãããŸãã
GCCã®æ§æã§æå®ããããã®ãããåªå ãããŸãã
èšèª
LC_CTYPE
LC_MESSAGES
LC_ALL
ãããã®ç°å¢å€æ°ã¯ãGCCãããŒã«ãªãŒãŒã·ã§ã³æ å ±ã䜿çšããæ¹æ³ãå¶åŸ¡ããŸã
ããã«ãããGCCã¯ããŸããŸãªå šåœå€§äŒãšé£æºããããšãã§ããŸãã GCCã¯ãã±ãŒã«ãæ€æ»ããŸã
ã«ããŽãª LC_CTYPE ãš LC_MESSAGES ããããããã«æ§æãããŠããå Žåã ãããã®ãã±ãŒã«
ã«ããŽãªã¯ãã€ã³ã¹ããŒã«ã§ãµããŒããããŠããä»»æã®å€ã«èšå®ã§ããŸãã å žåçãªå€ã¯
en_GB.UTF-8 UTF-8ã§ãšã³ã³ãŒããããè±åœã®è±èªã®å Žåã
ãã® LC_CTYPE ç°å¢å€æ°ã¯æååé¡ãæå®ããŸãã GCCã¯ããã䜿çšããŠ
æååã®æåå¢çã決å®ããŸãã ããã¯ããã€ãã®ãã«ããã€ãã«å¿ èŠã§ã
åŒçšç¬Šãšãšã¹ã±ãŒãæåãå«ããšã³ã³ãŒãã£ã³ã°ã
æååã®çµäºãŸãã¯ãšã¹ã±ãŒãã
ãã® LC_MESSAGES ç°å¢å€æ°ã¯ã蚺æã§äœ¿çšããèšèªãæå®ããŸã
ã¡ãã»ãŒãžã
Status LC_ALL ç°å¢å€æ°ãèšå®ãããŠããå Žåãã®å€ããªãŒããŒã©ã€ãããŸã LC_CTYPE ãš
LC_MESSAGES; ãããªããšã LC_CTYPE ãš LC_MESSAGES ããã©ã«ãã®å€ã¯ èšèª
ç°å¢å€æ°ã ãããã®å€æ°ã®ããããèšå®ãããŠããªãå ŽåãGCCã¯ããã©ã«ãã§åŸæ¥åã«ãªããŸã
Cè±èªã®æ¯ãèãã
TMPDIR
If TMPDIR ãèšå®ãããŠããå Žåãäžæãã¡ã€ã«ã«äœ¿çšãããã£ã¬ã¯ããªãæå®ããŸãã GCCã¯
ãšããŠäœ¿çšãããã³ã³ãã€ã«ã®XNUMXã€ã®ã¹ããŒãžã®åºåãä¿æããäžæãã¡ã€ã«
次ã®ã¹ããŒãžãžã®å ¥åïŒããšãã°ãããªããã»ããµã®åºåã
é©åãªã³ã³ãã€ã©ãžã®å ¥åã
GCC_COMPARE_DEBUG
èšå® GCC_COMPARE_DEBUG åæ Œãšã»ãŒåçã§ã -fæ¯èŒãããã° ãã
ã³ã³ãã€ã©ãã©ã€ãã 詳现ã«ã€ããŠã¯ããã®ãªãã·ã§ã³ã®ããã¥ã¡ã³ããåç §ããŠãã ããã
GCC_EXEC_PREFIX
If GCC_EXEC_PREFIX ãèšå®ãããŠããå Žåãã®ååã§äœ¿çšãããã¬ãã£ãã¯ã¹ãæå®ããŸã
ã³ã³ãã€ã©ã«ãã£ãŠå®è¡ããããµãããã°ã©ã ã ãã®ãã¬ãã£ãã¯ã¹ãçµã¿åããããšãã¹ã©ãã·ã¥ã¯è¿œå ãããŸãã
ãµãããã°ã©ã ã®ååã䜿çšããŸãããã¹ã©ãã·ã¥ã§çµãããã¬ãã£ãã¯ã¹ãæå®ã§ããŸãã
ããªããæãã
If GCC_EXEC_PREFIX ãèšå®ãããŠããªãå ŽåãGCCã¯äœ¿çšããé©åãªãã¬ãã£ãã¯ã¹ãèŠã€ããããšããŸã
åŒã³åºããããã¹åã«åºã¥ããŸãã
GCCãæå®ããããã¬ãã£ãã¯ã¹ã䜿çšããŠãµãããã°ã©ã ãèŠã€ããããšãã§ããªãå ŽåãGCCã¯
ãµãããã°ã©ã ã®éåžžã®å Žæã
ã®ããã©ã«ãå€ GCC_EXEC_PREFIX is ãã¬ãã£ãã¯ã¹/lib/ gcc / ã³ã©ãã¬ãŒ æ¥é èŸ ã®ãã¬ãã£ãã¯ã¹ã§ã
ã€ã³ã¹ããŒã«ãããã³ã³ãã€ã©ã å€ãã®å Žå æ¥é èŸ ãå®è¡ãããšãã®ããã¬ãã£ãã¯ã¹ãã®å€ã§ã
configure ã¹ã¯ãªããã
ã§æå®ãããä»ã®ãã¬ãã£ãã¯ã¹ -B ãã®ãã¬ãã£ãã¯ã¹ãããåªå ãããŸãã
ãã®ãã¬ãã£ãã¯ã¹ã¯ã次ã®ãããªãã¡ã€ã«ã®æ€çŽ¢ã«ã䜿çšãããŸãã crt0.o ãªã³ã¯ã«äœ¿çšãããŸãã
ããã«ããã¬ãã£ãã¯ã¹ã¯ãæ€çŽ¢ãããã£ã¬ã¯ããªãèŠã€ããéã«éåžžãšã¯ç°ãªãæ¹æ³ã§äœ¿çšãããŸã
ããããŒãã¡ã€ã«çšã ååãéåžžå§ãŸãæšæºãã£ã¬ã¯ããªããšã«
ã / usr / local / lib / gcc ïŒããæ£ç¢ºã«ã¯ã GCC_INCLUDE_DIRïŒãGCCã¯è©Šè¡ããŸã
æå®ããããã¬ãã£ãã¯ã¹ã§å§ãŸããã®ã眮ãæããŠã代æ¿ãã£ã¬ã¯ããªãäœæããŸã
ååã ãããã£ãŠã -Bfoo /ãGCCæ€çŽ¢ foo / bar æšæºãæ€çŽ¢ããçŽå
ãã£ã¬ã¯ããªã«ãžã§ããéå§ããŸãã / usr / local / lib / barã æšæºãã£ã¬ã¯ããªãèšå®æžã¿ã§å§ãŸãå Žå
æ¥é èŸ æ¬¡ã«ã®å€ æ¥é èŸ ã®ä»£ããã« GCC_EXEC_PREFIX ããããŒãæ¢ããšã
ãã¡ã€ã«ã
ã³ã³ãã€ã©_ãã¹
ã®å€ ã³ã³ãã€ã©_ãã¹ ã³ãã³ã§åºåããããã£ã¬ã¯ããªã®ãªã¹ãã§ãã ãã¹.
GCCã¯ããµãããã°ã©ã ãæ€çŽ¢ãããšãã«ããã®ããã«æå®ããããã£ã¬ã¯ããªãè©Šè¡ããŸãã
ã䜿çšããŠãµãããã°ã©ã ãæ€çŽ¢ãã GCC_EXEC_PREFIX.
ã©ã€ãã©ãªãã¹
ã®å€ ã©ã€ãã©ãªãã¹ ã³ãã³ã§åºåããããã£ã¬ã¯ããªã®ãªã¹ãã§ãã ãã¹.
ãã€ãã£ãã³ã³ãã€ã©ãšããŠèšå®ãããŠããå ŽåãGCCã¯ãã®ããã«æå®ããããã£ã¬ã¯ããªã次ã®å Žåã«è©Šè¡ããŸãã
ç¹å¥ãªãªã³ã«ãŒãã¡ã€ã«ãæ€çŽ¢ããŸãã GCC_EXEC_PREFIX.
GCCã䜿çšãããªã³ã¯ã§ã¯ãéåžžã®ã©ã€ãã©ãªãæ€çŽ¢ãããšãã«ãããã®ãã£ã¬ã¯ããªã䜿çšãããŸã
-l ãªãã·ã§ã³ïŒãã ããã§æå®ããããã£ã¬ã¯ã㪠-L æåã«æ¥ãŸãïŒã
èšèª
ãã®å€æ°ã¯ããã±ãŒã«æ å ±ãã³ã³ãã€ã©ãŒã«æž¡ãããã«äœ¿çšãããŸãã XNUMXã€ã®æ¹æ³
ãã®æ å ±ã¯ãæåã®ãšãã«äœ¿çšãããæåã»ããã決å®ããããã«äœ¿çšãããŸã
ãªãã©ã«ãæååãªãã©ã«ãããã³ã³ã¡ã³ãã¯ãCããã³C++ã§è§£æãããŸãã ã³ã³ãã€ã©ã
ãã«ããã€ãæåãèš±å¯ããããã«æ§æãããŠããå Žåã次ã®å€ã¯ èšèª ã
èªèãããïŒ
C-JIS
JISæåãèªèããŸãã
C-SJIS
SJISæåãèªèããŸãã
C-EUCJP
EUCJPæåãèªèããŸãã
If èšèª ãå®çŸ©ãããŠããªãããä»ã®å€ãããå Žåãã³ã³ãã€ã©ã¯ãmblenãã䜿çšããŸã
ãã«ããã€ããèªèããŠå€æããããã®ããã©ã«ããã±ãŒã«ã§å®çŸ©ãããŠãããmbtowcã
æåã
ããã€ãã®è¿œå ã®ç°å¢å€æ°ã¯ãããªããã»ããµã®åäœã«åœ±é¿ãäžããŸãã
CPATH
C_INCLUDE_PATH
CPLUS_INCLUDE_PATH
OBJC_INCLUDE_PATH
åå€æ°ã®å€ã¯ãç¹æ®æåã§åºåããããã£ã¬ã¯ããªã®ãªã¹ãã§ãã
ãã㪠ãã¹ãããããŒãã¡ã€ã«ãæ€çŽ¢ããŸãã ç¹æ®æåã
ãPATH_SEPARATORãã¯ã¿ãŒã²ããã«äŸåããGCCãã«ãæã«æ±ºå®ãããŸãã Microsoftã®å Žå
WindowsããŒã¹ã®ã¿ãŒã²ããã¯ã»ãã³ãã³ã§ãããä»ã®ã»ãšãã©ãã¹ãŠã®ã¿ãŒã²ããã§ã¯ã»ãã³ãã³ã§ãã
çµè žã
CPATH ã§æå®ãããŠãããã®ããã«æ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ããæå®ããŸã -Iã ã ãã©
ã§äžãããããã¹ã®åŸ -I ã³ãã³ãã©ã€ã³ã®ãªãã·ã§ã³ã ãã®ç°å¢å€æ°
ååŠçãããŠããèšèªã«é¢ä¿ãªã䜿çšãããŸãã
æ®ãã®ç°å¢å€æ°ã¯ãç¹å®ã®ååŠçæã«ã®ã¿é©çšãããŸã
瀺ãããèšèªã ããããããæ€çŽ¢ãããã£ã¬ã¯ããªã®ãªã¹ããããããæå®ããŸãã
ã§æå® -isystemããã ããã§æå®ããããã¹ã®åŸ -isystem ã®ãªãã·ã§ã³
ã³ãã³ãã©ã€ã³ã
ããããã¹ãŠã®å€æ°ã§ã空ã®èŠçŽ ãã³ã³ãã€ã©ã«çŸåšã®èŠçŽ ãæ€çŽ¢ããããã«æ瀺ããŸã
äœæ¥ãã£ã¬ã¯ããªã 空ã®èŠçŽ ã¯ããã¹ã®æåãŸãã¯æåŸã«è¡šç€ºã§ããŸãã ã«ãšã£ãŠ
ã€ã³ã¹ã¿ã³ã¹ãã®å€ã CPATH ã¯ãïŒ/ special / includeãã§ãããã¯ãšåãå¹æããããŸã
-ç§ã -I / special / include.
DEPENDENCIES_OUTPUT
ãã®å€æ°ãèšå®ãããŠããå Žåããã®å€ã¯ãMakebasedã®äŸåé¢ä¿ãåºåããæ¹æ³ãæå®ããŸã
ã³ã³ãã€ã©ã«ãã£ãŠåŠçãããéã·ã¹ãã ããããŒãã¡ã€ã«ã ã·ã¹ãã ããããŒãã¡ã€ã«ã¯
äŸåé¢ä¿ã®åºåã§ã¯ç¡èŠãããŸãã
ã®å€ DEPENDENCIES_OUTPUT åãªããã¡ã€ã«åã«ããããšãã§ããŸãããã®å ŽåãMakeã«ãŒã«
ãœãŒã¹ãã¡ã€ã«åããã¿ãŒã²ããåãæšæž¬ããŠããã®ãã¡ã€ã«ã«æžã蟌ãŸããŸãã ãŸãã¯
å€ã¯æ¬¡ã®åœ¢åŒã«ããããšãã§ããŸã file ã¿ãŒã²ããããã®å Žåãã«ãŒã«ã¯ãã¡ã€ã«ã«æžã蟌ãŸããŸã file
ã¿ãŒã²ãã ã¿ãŒã²ããåãšããŠã
ã€ãŸãããã®ç°å¢å€æ°ã¯ãªãã·ã§ã³ãçµã¿åãããã®ãšåãã§ã -ãã
ãš -MFããªãã·ã§ã³ä»ã -MT ã¹ã€ãããã
SUNPRO_DEPENDENCIES
ãã®å€æ°ã¯ãšåãã§ã DEPENDENCIES_OUTPUT ïŒäžèšãåç §ïŒããã®ã·ã¹ãã ãé€ã
ããããŒãã¡ã€ã«ã¯ç¡èŠãããªãã®ã§ã -M ã§ã¯ãªã -ããã ãããã
ã¡ã€ã³å ¥åãã¡ã€ã«ãžã®äŸåã¯çç¥ãããŸãã
onworks.net ãµãŒãã¹ã䜿çšããŠãªã³ã©ã€ã³ã§ powerpc-linux-gnu-gcc-4.9 ã䜿çšãã