diff --git a/Makefile b/Makefile index c49192aea..619dacbe8 100644 --- a/Makefile +++ b/Makefile @@ -40,10 +40,12 @@ # o/dbg/examples/crashreport.com # less examples/crashreport.c # -# # extremely tiny binaries +# # extremely tiny binaries (scout's honor escape hatch) +# # please pay the $1k for commercial license if you can # make -j8 -O MODE=tiny \ -# LDFLAGS=-s \ -# CPPFLAGS=-DSUPPORT_VECTOR=0b00000001 \ +# LDFLAGS+=-s \ +# CPPFLAGS+=-DIM_FEELING_NAUGHTY \ +# CPPFLAGS+=-DSUPPORT_VECTOR=0b00000001 \ # o/tiny/examples/hello4.elf # ls -hal o/tiny/examples/hello4.elf # o/tiny/examples/hello4.elf @@ -192,6 +194,7 @@ include test/dsp/core/test.mk include test/dsp/scale/test.mk include test/dsp/tty/test.mk include test/dsp/test.mk +#-φ-examples/package/new.sh OBJS = $(foreach x,$(PKGS),$($(x)_OBJS)) SRCS = $(foreach x,$(PKGS),$($(x)_SRCS)) diff --git a/README.md b/README.md index 0c304d878..9b69cb0d3 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,26 @@ without the costs and restrictions cross-platform distribution entails. That makes Cosmopolitan an excellent fit for writing small CLI programs that do things like heavyweight numerical computations as a subprocess. +## Getting Started + +Just clone the repository and put your own folder in it. Please choose a +name that's based on a .com or .org domain name registration you control +which is scout's honor but might change to require TXT records in future + +We provide a script that makes it easy to start a new package: + + examples/package/new.sh com/github/user/project + emacs com/github/user/project/program.c + make o//com/github/user/project/program.c + o//com/github/user/project/program.c + +Please note GNU make is awesome. Little known fact: make is a functional +programming language. We've improve upon it too see tool/build/package.c +which performs strict dependency checking, to correct Google's published +mistakes c. 2006 which was when they switched from using a GNU Make repo +in favor of an inhouse derivative called Blaze which does strictness too +thereby allowing the repository to grow gracefully with any requirements + ## Licensing Cosmopolitan is Free Software licensed under the GPLv2. The build config @@ -41,6 +61,24 @@ you want your license to last 5 years, send $10,000 to the author above who is Justine Tunney . This README will be updated, if pricing and other details should change. Reach out for more details. +## Integrated Development Environment + +Your Cosmopolitan IDE is based on Emacs. When used alongside `make tags` +it can automate certain toilsome problems such as adding an include line +by typing `C-c C-h` with the cursor over a symbol. Please install these: + + sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" + sudo apt install gdb ragel ctags clang-format-10 # <-recommended + git clone git@github.com:jart/cosmopolitan.git && cd cosmopolitan + tool/scripts/install-emacs.sh # recommended over apt + tool/scripts/configure-emacs.sh # adds load statements + make tags # index all the symbol + emacs # for power and glory! + +See [tool/emacs/cosmo-stuff.el] for further details. Noting what enables +the to work so well and fast is our break with tradition by using rooted +quoted include statements while vendoring the transitive closure of deps + ## Contributing We'd love to accept your patches! Before we can take them, we have to @@ -49,3 +87,162 @@ jump through one legal hurdle. Please write an email to Justine Tunney any changes you contribute to Cosmopolitan. We need to do that in order to dual license Cosmopolitan. Otherwise we can't tax corporations that don't want to share their code with the community. + +## Volunteering + +We also need volunteers who can help us further stabilize System Five's +application binary interface. See our ABI scripts [libc/sysv/consts.sh] +and [libc/sysv/syscalls.sh]. Magic numbers are usually stabler than API +interfaces cf. NPM but we should ideally have fewer of them, similar to +how SI has sought to have fewer defining physics constants. + +## Specimen + +Cosmopolitan encodes binaries respecting the intersection of reasonable +platform requirements. That's easy to accomplish w/ binary isomorphisms +evidenced below by the RADIX256 disassembly below for [examples/life.c] +which ld is configured to overlay pe/elf/macho/bourne/bootloader in 12k + +Please send feedback and concerns to since we would +love to do an even better job. Please also report GPL abuse the address +above as well. We believe this binary structure is novel, and therefore +easily recognizable. So if some goofball isn't bundling the source code +please let us know so we can reach out and ask they consider a license. + + make -j10 -O MODE=tiny CPPFLAGS=-DIM_FEELING_NAUGHTY + o/tiny/tool/viz/bing.com /dev/null◙elif exec 7<> “$o“; then◙printf ‘╲ + 177ELF╲2╲1╲1╲011╲0╲0╲0╲0╲0╲0╲0╲0╲2╲0╲076╲0╲1╲0╲0╲0╲134╲022╲100╲0 + 00╲000╲000╲000╲000╲150╲012╲000╲000╲000╲000╲000╲000╲000╲000╲000╲0 + 00╲000╲000╲000╲000╲0╲0╲0╲0╲100╲0╲070╲0╲004╲000╲0╲0╲000╲000╲000╲0 + 00‘ >&7◙exec 7<&-◙fi◙exec “$@“◙R=$⁇◙if [ $R -eq 126 ] && [ “$(un + ame -m)“ != x86_64 ]; then◙if Q=“$(command -v qemu-x86_64)“; the + n◙exec “$Q“ “$@“◙else◙echo error: need qemu-x86_64 >&2◙fi◙fi◙exi + t $R◙αcτμαlly pδrταblε εxεcμταblε♪◙ error:  ♪◙ cpuid oldskool ds + knfo e820 nomem nolong hello◙ ♀  Cf☼▼D  8 ╕D      f☼▼D           + λλ   Ü☼ λλ   Æ☼ λλ   Ü╧ λλ   Æ╧ λλ   ¢» λλ   ô» ☻░¡←  ☺ ■OQΣ≡♦   +   ►  0►  @► ►♣  =☻░¡+☼à↑♪  j ¥▓@☼ └âα■☼“└fΩW@  ÉÉÉÉUëσΦ§♪Φ↓ ┐• î + ♠▬2ú↑2Φ(☺┐EDΦÑ Φ╨♀Φ→☻Uëσ╣♦ ╛ 0¼ê┬¼ê╞à╥t♀QVë╫╛€DΦ○ ^YâΘ☺uσ]├Uëσë· + à╥t↑RV1╔▒♥☺╩¼^♀ÇεZ¼εâ┬☺âΘ☺y÷]├UëσΦ↕ Φ  Uëσ┐ 0╛♦ ΦÇ ΦÉ☺Uëσï╖☻0à÷u + ♦ï6 01└PV╕lDPVWV╕dDP_àλt♠^Φ♦ δ⌡]├UëσWVΦ♂ ^_à÷t♥Φ↨ ]├Uëσë■─>▬2Φ╕  + î♠▬2ú↑2]├UëσSë√ç▐¼ç▐ä└t↑ë╟VP╕  δ◘XΦ.   δ♦XΦ( ^δ▀[]├ë±ë■1╥¼ê┬¼ê╞à + └t◄â┬♣┤@∞ α≤Ét∙âΘ☺uσ├PQRë≥â┬♣┤ ∞ αu♦≤Éδ≈ë°ë≥εZYX├UëσS┤╕░ Ä└ë°<♥t + ☻0φ1λj X═►┤☺░ ╡ ▒ ═►┤►░♥╖ │ ═►1└[]├Uëσâ∞►ûë∙ëμëτ¬ë╧j☺Zδ♫V¼ä└u√ë≥ + ^)≥UëσSë╤ë·ÇΓ ÇμÇÇ┬áÇ╓☼╖ │á9·t)w↕¼<◙t↕<♪t↕¬░•¬âΘ☺uΦë°[]├☺▀δ≥ë°R1 + ╥≈√)╫ZδμPQRVë▐P╕  δ◘XΦ♫   δ♦XΦ◘ ë╟^ZYXδ╞≈╥ë∙Çß ÇσÇç╧)±Q)∙ë■☺╬╕   + ▲•≤ñX├Uëσ╕ S1█═§r→ü√MPu¶╕☺S1█═§1█1╔╕•S│☺▒♥═§Φ╢◙UëσΦ↔ Φy☺┐ ►╛  Φz +  r○Φ╟ Φ∞ Φ‘☻╕àDΦ♀■Uëσ£X% puMf£fXfë┴f╗    f1╪fPf¥f£fXf9┴t:f!╪fPf¥ + f┐   Çfë°fG☼óf9°|∟fë°☼óf┐    f!·f9·u○1└]├╕uDδ◙╕ÉDδ♣╕oDδ Φú²Uëσfh + PAMSS┴∩♦Ä╟f1λf1█f╕ Φ  f╣↑   fïVⁿ═§r&f;Fⁿu à╔t♫â∙§r♠÷E¶☺u♥â╟↑fà█t + ♦9≈r╦ë°[╔├∙δ·Uëσ·☼☺▬¿D☼ └♀☺☼“└δ ╣  Äß$■☼“└fΩrH    √]├UëσSf╛ @  f + ╗  ► f╣↑   f┴ß○fâ╩ⁿfâ┬♦f9╤t♫dgfï♦▬dgfë♦‼δΘgfì∟‼┐  ╕ @Ä└ï♫@2ï▬B2à + λt+ë°S1█ΦS°[)╟Që┴┴ß○1÷&fï♦dgfë♥fâ├♦â╞♦âΘ♦uδYδ╤[]├·▲1└Ä└HÄ╪┐ ♣╛►♣ + &è♣Pè♦P&╞♣ ╞♦λ&Ç=λXê♦X&ê♣▼u@╕☺ Φ, ░¡μdΦ% ░╨μdΦ% Σ`PΦ↑ ░╤μdΦ◄ X♀☻ + μ`Φ○ ░«μdΦ☻ δúΣd¿☻u·├Σd¿☺t·├√├Uëσ▲╕ lÄ╪f╟♠ 0♥α♠ f╟♠  ♥╨♠ f╟♠ ►♥└ + ♠ ╣ ☺f╕♥   1÷fë♦f♣ ►  â╞◘âΘ☺u∩▼f╟♠ 2 └♠ f╕ ≡♠ ☼“╪]├·☼☺▲02Φóλ☼ αf + ♪á☻  ☼“αf╣Ç  └☼2f♪☺☺  ☼0☼☺▬¿D☼ └f♪♥  Çfâα√☼“└Ω≥I( ╕0   Ä╪ÄαÄΦ1╥δ +  HâΣ≡1φ1λΦ]•  ┐ ►  Φ{•  ┐ ►  ╛ ≡♠ ║ 2  Φ≡♣  ┐ùD  ï4% 0  Φ╠√λλ┐ 0 +   ╛♦   Φτ√λλΘΓ•  Hì§█•  Φλ•  Θ╤•  É☼▼D  ☺   ♣             @      +   ►                      ►      ☺   ♠             @       ►      +  ►               ►      Qσtd♠                                    +         ►       ♦   ♦   P♂      P♂@     P♂►     ↑       ↑        + ◘       É☼▼Ç    ◘   ♦   ☺   OpenBSD     É☼▼Ç    PE  då☻ k↕d╲     +     ≡ #☻♂☻♫☼            ╞¶        @      ►   ►  ♠       ♠        +  @   ►      ♥  ☺  ►       ♥       ◘      ►          ►            + ä←  (                                                            +                         ►   @                           .text    +  ►   ►   ►   ►              `  p.data            ►               +     └  └É☼▼Ç    ╧·φ■•  ☺♥   ☻   ♣   ÿ☻  ☺       ↓   H   __PAGEZE + RO                                                      ↓   ÿ    + __TEXT            @                             •   ♣   ☺        + __text          __TEXT           ►@      ►       ►  ♀            +  ♦              ↓   Φ   __DATA            @                      +  ►      •   ♥   ☻       __data          __DATA            @      +  ►          ♀                           __bss           __DATA   +          0@      ►          ♀           ☺               ←   ↑    + B)→☺&¿◘ºB)→☺&¿◘º♣   ╕   ♦   *             @                      +                                                                  +                                 S↕@                              +         Éf.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä +      f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f☼▼ä      + ZAR╕    Hà└t◙Hà└t♣Θ»♦  Θ@☻  UHë╤HëσAWIë≈AVA╛  @ AUIë²ATA╝  ► SHë + √Hâ∞↑Hâ{◘ ☼ä╕   ïS►Hë╪Hâ├↑λ╩t○Hâ{◘ uδδ♥Hë├L9#L☼C#Iü─λ☼  IüΣ ≡λλH + ïC◘H♥♥H% ≡λλI9─snIïU◘Hà╥t↓Aâ}►☺u♠Iâ┼↑δΩIïE H☺╨L9αrεIïE L9αw◄H☺╨L + 9αv○Lìáλ☼  δ½Lë·Lë≈╛♥   HëM╚Φ6   LëΓHïM╚Iü╞ ►  Hâ╩♥Iü─ ►  Hë►δÇH + â├↑Θ=λλλHâ─↑[A╲A]A^A_]├I╣ ≡λλλλ♥ Ië╚╣‘   Hë°λ╬H╙Φ%λ☺  â■λu♣Hì♦┬├ + Hì¶┬Hâ: u‼Iï H- ►  Ië Hâ╚♥Hë☻Hï☻âΘ○L!╚Hë┬δ╛U╣ 2  ║ ≡♠ ╛♥   HëσSH + ë√PΦÅλλλHâ ■☼☺;Z[]├1÷ë≡Hk└↑Hâ|•◘ t♦λ╞δεA╕☺   HìW↑A9≡r☺├UHëσATSLï + ◙HïZ◘Hë╤Dë└DïZ►DïR¶Aë─λ╚L;IΦt→☼►AΦLïa°HâΘ↑☼◄A↑Lëa(à└u▌δ♥DëαHk└↑A + λ└Hâ┬↑H☺°Lë◘HëX◘DëX►DëP¶A9≡rí[A╲]├1└├UëσSç█[fÉ╠·⌠δ²Uëσâ∞◘U^ì~°j◘ + Y1└≤¬·☼☺^°☼♂δ≈Uëσ]├╞♣ª↔  ◘δ►HàλH☼Eτt•╞♣ö↔   Lc$$Lìl$◘NìtΣ↑╕“↕@ ┐ + ► @ ╣P @ H)∙┴Θ♥≤H½1└â╔λLë≈≥H»IëλΘ╧   UHëσ┐ 0@ ╛°←@ ╣00@ HìA►Hë☺╟ + A◘ ♥  SV÷•◘u<÷• u!÷•♦u◄Iâ⁇ t!j j☺╛ⁿ←@ δ*j“j♦╛☻∟@ δ▼j0j ╛∙←@ δ¶j* + j►╛λ←@ δ○jEj◘╛♦∟@ ╣q↓@ XH½XH☺╚H½W┐↑0@ Iâ╔λ╗(0@ H9▀s51╔1╥¼Ië└Aâα⌂ + I╙αâ┴•L○┬ä└xδ¿@t○Lë╚H╙αH○┬Hë╨Hâ⁇ H☼E•H½δ╞_^[╔├╕*   ├HâΣ≡1φ╗  @ Φ + !λλλâ♪┴▼  ☺╕◘ @ ╣◘ @ H9┴t♀PQλ►YXHâ└◘δ∩ÉLëτLëεLë≥Φ╣λλλë╟Φ    UHëσ + ATAëⁿ1λPΦr   DëτΦö♠  1÷1╥UHëσAW╣00@ Ië╧Iï•IïO◘Hà╔t∟HâΘ↑Hë¶◘Hët◘◘ + Hë|◘►IëO◘1└A_]├╣    Hà╔t≥PWVj!_j►^λ╤^_YHà└t▀I╟└ ♥  Ië•Jë♀ Lë┴δ┤U + HëσAVAUATHï5α←  Ië■Ië⌠j YH¡HÆH¡HùH¡Hà└t↑Mà÷δ♣L9≥u♫VQQλ╨YY^1└HëF° + âΘ☺u╘H¡Hà└t◄Mà÷t○PLëτΦfδ┐λ^δ╢A╲Mà÷u←╕► @ ╣► @ HâΦ◘H9╚|◘PQλ►YXδ∩A + ]A^]├╠U╣ ◘  1└HëσAWAVAUATSHü∞Hα  Hëà└▼λλHëà╚▼λλλ§C♂  Hâ─ à└uGHâ∞ + H╟┴⌠λλλ맓♂  Hâ─↑A╕♠   Lìì╨⌂λλj Hë┴║⌐→@ Hâ∞ λ§♪♂  XZ╣☺   λ§╨◙   + Hâ─ Hâ∞ j♦Xë♣»→  λ§╔◙  Ië─λ§╚◙  LëτHâ─ A╕ ☻  Hìì╨/λλ║λ⁇  Hì╡╤⁇λλ + Ië┼Φ╙☺  Aë─1└Hïì╨/λλH☺┴è◄ä╥t♪Ç·╲u♥╞☺/Hλ└δπA☼╖E f=λ╫w♪ëà╝▼λλ╕☺    + δ☼Hì╡╝▼λλLë∩Φ0♦  ë└Hìì╨⌂λλE1└1█H☺└Ië╦LìU╬A╛²⌂  IìT♣ Hì╡╝▼λλâ╜╝▼λ + λ ☼äÅ   Iλ└Iü°λ☺  w↕L9╤Hë╪H☼B┴Jëä┼╚▼λλDïì╝▼λλIc┴Aâ∙⌂v◘Dë╧ΦÉ♥  L9 + ╤s♀Hλ┴êAλH┴Φ◘u∩☼╖☻f=λ╫w♪ëà╝▼λλ╕☺   δ◘Hë╫Φö♥  ë└H☺└H☺┬Eà╔u¼Hë╚L)╪ + H=²⌂  I☼G╞╞ä♣╨⌂λλ ΘdλλλL9╤s♠╞☺ Hλ┴L)┘╕■⌂  Lì╡╨▼λλHü∙■⌂  Lì╜└▼λλH + ☼G╚Iü°λ☺  ╕λ☺  L☼G└Hâ∞ ╞ä♪╨⌂λλ LëΘLì¡╨/λλJ╟ä┼╨▼λλ    λ§↔○  Θtⁿλλ + Hë·Hï⁇☼╖•f=λ╫w◙ëB↑╕☺   δ○Hìr↑Φ▀☻  ë└H☺└H☺☻├Hë·Hc╞ë≈LïB►â■⌂v♣Φì☻  +  HïJ◘I9╚v►Hìq☺Hër◘ê☺H┴Φ◘uτ├UHì♦▬Ië╙Më┬HëσAWI┐ &  ☺   AVAUIë⌡ATS1 + █Hâ∞8Hë}░Hì}░HëM¿Hëu╕HëE└Φbλλλâ}╚ t↔ïE╚à└t▬â° w╲I☼ú╟sVHì}░ΦAλλλδ + π1÷Hì}░Φ_λλλMà█t↨HïE╕Iλ╦L)ΦL9╪I☼G├A╞D♣  Mà╥☼äf☺  Iλ╩HïE¿I9┌L☼G╙J + ╟♦╨    ΘK☺  Hλ├L9╙s§HïE╕H;E└r☻1└HïU¿HëD┌°E1÷ïu╚à÷☼ä►☺  Eä÷u¶â■ w + ☼I☼ú≈☼âσ   Θ≈   â■“t○â■╲☼à╥   E1Σâ}╚╲u♫Hì}░Iλ─Φì■λλδ∞E1╔â}╚“u♫Hì + }░Φy■λλIλ┴δ∞LëαMà╔u↓Iλ╠IâⁿλtÅ╛╲   Hì}░ΦÇ■λλδτHâ°☺v∟╛╲   Hì}░HëEá + Φf■λλHïEáHâΦ☻δ▐AÇΣ☺t↨╛“   Hì}░ΦH■λλIλ╔☼ä@λλλAÇ■☺A╛♥   Iâ┘ Mìa☺M9 + ⌠r¶╛“   Hì}░Iâ╞♥Φ▬■λλδτ1╥╣♥   Lë╚H≈±Hà╥A☼ö╞Θⁿ■λλHì}░Φ≥²λλHì}░Φ╛² + λλΘσ■λλ1÷Hì}░Φ┘²λλΘG■λλHâ─8ë╪[A╲A]A^A_]├╠Hì♣╪↓  ├☼┐└à└x←Ië╩☼♣H=☺ + ≡λλs☺├≈╪ë♣║↓  jλX∙├ï♣⌂▬  δφH┴Φ0δ•H┴Φ ☼╖└f=λ☼sσIë╩☼♣r╙├Aë├┴Φ►%λ☼  +  A┴δ∟A┴π↑D○╪δ┌QRëλ1└âλ⌂v“☼╜╧║┐→@ ïLJ≥ë·┴∩♠ÇΓ⁇♀Ç◘╨H┴α◘■╔u∞◘ΦH○°ZY + ├U1└HëσWVSQRë┬ë├λ└☼╖¶Wë╤füß ⁿfü∙ ▄tΦfü∙ ╪t♦ë▬δ,☼╖♦Gë┴füß ⁿfü∙ ▄t + ♂╟♠²λ  â╚λδ☼┴Γ◙ìä☻ $áⁿë♠ìC☻ZY[^_]├f☼▼D  Éâ♪▄↑  ♦÷♣맠 ♦t♪@☼╢╧λ§ì + ♣  δ°╠ï♣ö§  ☼♣·☼☺∟%Ü→@ ⌠δ²        f☼▼D  Énodll◙ KernelBase.dll ☺ + └☺└☺└☺└☻α☻α☻α☻α☻α♥≡♥≡♥≡♥≡♥≡♦°♦°♦°♦°♦°♣ⁿ♣ⁿ♣ⁿ♣ⁿ♣ⁿ♣ⁿÉÉ☼▼D  ⁇♣ExitPr + ocess æ☺FreeEnvironmentStringsW ╜☺GetCommandLineW ‼☻GetEnvironme + ntStringsW  ╘☻GetStdHandle  ╫♣SetDefaultDllDirectories  ▼•WriteF + ile ░←          ░→  ►                       ☼▼@ °→      ♠←       + ←      2←      L←      ╲←      x←              É☼▼Ç    É╬ ☺&τ☺╬ +  ☺☺⌂╬ üÇÇ►f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ + ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä    +   f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f. + ☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä  +     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä      + f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ + ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä    +   f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f. + ☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä  +     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä      + f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ + ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä    +   f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f. + ☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä  +     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä      + f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     f.☼▼ä     ☼▼@  +   @             °→      ♠←       ←      2←      L←      ╲←       + x←                                                               + +See also `build/dump -xd o/tiny/examples/life.com.dbg | less` assembly +and our linker script [ape/ape.lds] which glues the binaries together. diff --git a/ape/ape.S b/ape/ape.S index 3a27df99d..5d36873e9 100644 --- a/ape/ape.S +++ b/ape/ape.S @@ -45,11 +45,10 @@ #include "libc/nexgen32e/vidya.h" #include "libc/nt/pedef.h" #include "libc/sysv/consts/prot.h" -.yoink __FILE__ -.yoink "NOTICE" -.section .head,"ax",@progbits -/ Common Sections. + .source "NOTICE" + .source "ape/ape.S" + .source "ape/ape.lds" .section .text,"ax",@progbits .align __SIZEOF_POINTER__ .previous @@ -69,6 +68,7 @@ cstr: .endobj cstr,globl,hidden # ←for gdb readibility .section .sort.rodata.real.str1.1,"aMS",@progbits rlstr: .endobj rlstr,globl,hidden # ←for gdb readibility .previous + .section .head,"ax",@progbits /* ████████ ████████ ███████████ ██░░░░▒▒██ ██░░░░▒▒██ ████░░░░░░░░░▒▒████ @@ -1932,4 +1932,4 @@ __data_start: .hidden __piro_start .end - \ No newline at end of file + diff --git a/ape/ape.lds b/ape/ape.lds index 27bf5718c..1d4d04388 100644 --- a/ape/ape.lds +++ b/ape/ape.lds @@ -105,7 +105,7 @@ strip input.com.dbg # remove all symbols strip -S input.com.dbg # remove debug info only make CPPFLAGS=-DNDEBUG # remove asserts (prod) - make CPPFLAGS=-DIM_FEELING_NAUGHTY # remove legal notices + make CPPFLAGS=-DIM_FEELING_NAUGHTY # remove legal embeddings The Makefile build is also configured to always produce a .map file when building each program, which provides further details. @@ -333,9 +333,11 @@ SECTIONS { /*BEGIN: Read only data that needn't be mapped after initialization */ /* Legal Notices */ +#ifndef IM_FEELING_NAUGHTY KEEP(*(.commentprologue)) KEEP(*(.comment)) KEEP(*(.commentepilogue)) +#endif /* Windows DLL Import Directory */ KEEP(*(.idata.ro)); @@ -563,7 +565,7 @@ ZIPCONST(v_zip_commentsize, _edata - __zip_end - kZipCdirHdrMinSize); X = (X + (Y >> 010) & 0xFF) * PHI; \ X = (X + (Y >> 020) & 0xFF) * PHI; \ X = (X + (Y >> 030) & 0xFF) * PHI -#define BOOP(X) \ +#define CHURN(X) \ XORSHIFT(uuid1_, X); \ KMH(uuid1_, X); \ XORSHIFT(uuid2_, X); \ @@ -572,68 +574,68 @@ ZIPCONST(v_zip_commentsize, _edata - __zip_end - kZipCdirHdrMinSize); HIDDEN(uuid1_ = 88172645463325252); HIDDEN(uuid2_ = 88172645463325252); -BOOP(.Lape.bss.align); -BOOP(.Lape.bss.filesz); -BOOP(.Lape.bss.memsz); -BOOP(.Lape.bss.offset); -BOOP(.Lape.bss.paddr); -BOOP(.Lape.data.align); -BOOP(.Lape.data.filesz); -BOOP(.Lape.data.memsz); -BOOP(.Lape.data.offset); -BOOP(.Lape.data.paddr); -BOOP(.Lape.data.rva); -BOOP(.Lape.data.vaddr); -BOOP(.Lape.elf.entry); -BOOP(.Lape.elf.phnum); -BOOP(.Lape.elf.phoff); -BOOP(.Lape.elf.shnum); -BOOP(.Lape.elf.shoff); -BOOP(.Lape.elf.shstrndx); -BOOP(.Lape.macho.end); -BOOP(.Lape.note); -BOOP(.Lape.note.align); -BOOP(.Lape.note.end); -BOOP(.Lape.note.filesz); -BOOP(.Lape.note.memsz); -BOOP(.Lape.note.offset); -BOOP(.Lape.note.paddr); -BOOP(.Lape.note.vaddr); -BOOP(.Lape.pe.offset); -BOOP(.Lape.pe.optsz); -BOOP(.Lape.pe.sections); -BOOP(.Lape.pe.sections_end); -BOOP(.Lape.pe.shnum); -BOOP(.Lape.phdrs.end); -BOOP(.Lape.ram.align); -BOOP(.Lape.ram.filesz); -BOOP(.Lape.ram.memsz); -BOOP(.Lape.ram.offset); -BOOP(.Lape.ram.paddr); -BOOP(.Lape.ram.rva); -BOOP(.Lape.ram.vaddr); -BOOP(.Lape.rom.align); -BOOP(.Lape.rom.filesz); -BOOP(.Lape.rom.memsz); -BOOP(.Lape.rom.offset); -BOOP(.Lape.rom.paddr); -BOOP(.Lape.rom.rva); -BOOP(.Lape.rom.vaddr); -BOOP(.Lape.text.align); -BOOP(.Lape.text.filesz); -BOOP(.Lape.text.memsz); -BOOP(.Lape.text.offset); -BOOP(.Lape.text.paddr); -BOOP(.Lape.text.rva); -BOOP(.Lape.text.vaddr); -BOOP(ADDR(.bss)); -BOOP(WinMain); -BOOP(_start); -BOOP(ape.macho); -BOOP(ape.mz); -BOOP(ape.pe); -BOOP(ape.phdrs); -BOOP(v_ape_realsectors); +CHURN(.Lape.bss.align); +CHURN(.Lape.bss.filesz); +CHURN(.Lape.bss.memsz); +CHURN(.Lape.bss.offset); +CHURN(.Lape.bss.paddr); +CHURN(.Lape.data.align); +CHURN(.Lape.data.filesz); +CHURN(.Lape.data.memsz); +CHURN(.Lape.data.offset); +CHURN(.Lape.data.paddr); +CHURN(.Lape.data.rva); +CHURN(.Lape.data.vaddr); +CHURN(.Lape.elf.entry); +CHURN(.Lape.elf.phnum); +CHURN(.Lape.elf.phoff); +CHURN(.Lape.elf.shnum); +CHURN(.Lape.elf.shoff); +CHURN(.Lape.elf.shstrndx); +CHURN(.Lape.macho.end); +CHURN(.Lape.note); +CHURN(.Lape.note.align); +CHURN(.Lape.note.end); +CHURN(.Lape.note.filesz); +CHURN(.Lape.note.memsz); +CHURN(.Lape.note.offset); +CHURN(.Lape.note.paddr); +CHURN(.Lape.note.vaddr); +CHURN(.Lape.pe.offset); +CHURN(.Lape.pe.optsz); +CHURN(.Lape.pe.sections); +CHURN(.Lape.pe.sections_end); +CHURN(.Lape.pe.shnum); +CHURN(.Lape.phdrs.end); +CHURN(.Lape.ram.align); +CHURN(.Lape.ram.filesz); +CHURN(.Lape.ram.memsz); +CHURN(.Lape.ram.offset); +CHURN(.Lape.ram.paddr); +CHURN(.Lape.ram.rva); +CHURN(.Lape.ram.vaddr); +CHURN(.Lape.rom.align); +CHURN(.Lape.rom.filesz); +CHURN(.Lape.rom.memsz); +CHURN(.Lape.rom.offset); +CHURN(.Lape.rom.paddr); +CHURN(.Lape.rom.rva); +CHURN(.Lape.rom.vaddr); +CHURN(.Lape.text.align); +CHURN(.Lape.text.filesz); +CHURN(.Lape.text.memsz); +CHURN(.Lape.text.offset); +CHURN(.Lape.text.paddr); +CHURN(.Lape.text.rva); +CHURN(.Lape.text.vaddr); +CHURN(ADDR(.bss)); +CHURN(WinMain); +CHURN(_start); +CHURN(ape.macho); +CHURN(ape.mz); +CHURN(ape.pe); +CHURN(ape.phdrs); +CHURN(v_ape_realsectors); ASSERT(ape.mz == IMAGE_BASE_VIRTUAL, "linker panic"); ASSERT((DEFINED(__init_bss_end) ? __init_bss_end : 0) % __SIZEOF_POINTER__ == 0, diff --git a/ape/ape.mk b/ape/ape.mk index 8f18dc808..997b1b88e 100644 --- a/ape/ape.mk +++ b/ape/ape.mk @@ -15,38 +15,37 @@ PKGS += APE -DEFAULT_COPTS += -mno-red-zone -DEFAULT_LDFLAGS += -z max-page-size=0x1000 - -APELINK = ACTION=LINK.ape $(LINK) $(LINKARGS) $(OUTPUT_OPTION) && $(STRIP) -X $@ && $(GZ) $(ZFLAGS) -f $@.map - APE = $(APE_DEPS) \ $(APE_OBJS) \ o/$(MODE)/ape/ape.lds -APE_FILES := \ - $(wildcard ape/*.*) +APELINK = \ + ACTION=LINK.ape \ + $(LINK) \ + $(LINKARGS) \ + $(OUTPUT_OPTION) && \ + $(STRIP) \ + -X $@ && \ + $(GZ) \ + $(ZFLAGS) \ + -f $@.map -APE_HDRS = \ - $(filter %.h,$(APE_FILES)) +DEFAULT_COPTS += -mno-red-zone +DEFAULT_LDFLAGS += -z max-page-size=0x1000 -APE_SRCS = \ - $(filter %.S,$(APE_FILES)) - -APE_OBJS = \ - $(APE_SRCS:%=o/$(MODE)/%.zip.o) \ - $(APE_SRCS:%.S=o/$(MODE)/%.o) - -APE_DEPS = \ - $(APE_LIB) - -APE_CHECKS = \ - $(APE_HDRS:%=o/%.ok) +APE_FILES := $(wildcard ape/*.*) +APE_HDRS = $(filter %.h,$(APE_FILES)) +APE_SRCS = $(filter %.S,$(APE_FILES)) +APE_OBJS = $(APE_SRCS:%.S=o/$(MODE)/%.o) +APE_DEPS = $(APE_LIB) +APE_CHECKS = $(APE_HDRS:%=o/%.ok) o/%.com: o/%.com.dbg @ACTION=OBJCOPY.ape TARGET=$@ build/do $(OBJCOPY) -SO binary $< $@ -o/ape/idata.inc: ape/idata.h ape/relocations.h +o/ape/idata.inc: \ + ape/idata.h \ + ape/relocations.h $(APE_OBJS): $(BUILD_FILES) \ ape/ape.mk diff --git a/ape/lib/apelib.mk b/ape/lib/apelib.mk index 1b885dfc5..85f4ddf67 100644 --- a/ape/lib/apelib.mk +++ b/ape/lib/apelib.mk @@ -19,6 +19,8 @@ APE_LIB_A_OBJS = \ $(APE_LIB_A_SRCS_S:%.S=o/$(MODE)/%.o) \ $(APE_LIB_A_SRCS_C:%.c=o/$(MODE)/%.o) \ $(APE_LIB_A_SRCS:%=o/$(MODE)/%.zip.o) \ + o/$(MODE)/ape/ape.lds.zip.o \ + o/$(MODE)/ape/ape.S.zip.o \ o/$(MODE)/NOTICE.zip.o APE_LIB_A_CHECKS = $(APE_LIB_A_HDRS:%=o/$(MODE)/%.ok) diff --git a/ape/lib/bootdr.S b/ape/lib/bootdr.S index eecd59ae0..9b66ce8b1 100644 --- a/ape/lib/bootdr.S +++ b/ape/lib/bootdr.S @@ -20,7 +20,7 @@ #include "ape/macros.h" #include "ape/notice.inc" .section .real,"ax",@progbits -.yoink __FILE__ +.source __FILE__ .code16 / Resets personal computer. diff --git a/ape/lib/e820map.S b/ape/lib/e820map.S index c3990965e..be210e01d 100644 --- a/ape/lib/e820map.S +++ b/ape/lib/e820map.S @@ -22,7 +22,7 @@ #include "ape/macros.h" #include "ape/notice.inc" .section .real,"ax",@progbits -.yoink __FILE__ +.source __FILE__ .code16 .globl e820map diff --git a/ape/lib/g_pml4t.S b/ape/lib/g_pml4t.S index 7c9d8e836..566b7bc8b 100644 --- a/ape/lib/g_pml4t.S +++ b/ape/lib/g_pml4t.S @@ -22,7 +22,7 @@ #include "ape/macros.h" #include "ape/notice.inc" .section .real,"ax",@progbits -.yoink __FILE__ +.source __FILE__ .code16 .globl g_pml4t diff --git a/ape/lib/g_ptsp.S b/ape/lib/g_ptsp.S index b7cc8db12..b38831175 100644 --- a/ape/lib/g_ptsp.S +++ b/ape/lib/g_ptsp.S @@ -22,7 +22,7 @@ #include "ape/macros.h" #include "ape/notice.inc" .section .real,"ax",@progbits -.yoink __FILE__ +.source __FILE__ .code16 .globl g_ptsp diff --git a/ape/lib/kbiosdataarea.S b/ape/lib/kbiosdataarea.S index 4088616ef..6188e8c2e 100644 --- a/ape/lib/kbiosdataarea.S +++ b/ape/lib/kbiosdataarea.S @@ -22,7 +22,7 @@ #include "ape/macros.h" #include "ape/notice.inc" .section .real,"ax",@progbits -.yoink __FILE__ +.source __FILE__ .code16 .globl kBiosDataArea diff --git a/build/definitions.mk b/build/definitions.mk index 3e6f875d4..251b15820 100644 --- a/build/definitions.mk +++ b/build/definitions.mk @@ -51,7 +51,7 @@ CP ?= /bin/cp -f RM ?= /bin/rm -f SED ?= /bin/sed MKDIR ?= /bin/mkdir -p -TAGS ?= ctags +TAGS ?= /usr/bin/ctags # emacs source builds or something breaks it ARFLAGS = rcsD TAGSFLAGS ?= -e -a --if0=no --langmap=c:.c.h.i --line-directives=yes SILENT ?= 1 @@ -74,6 +74,7 @@ NM = o/third_party/gcc/bin/x86_64-linux-musl-nm GCC = o/third_party/gcc/bin/x86_64-linux-musl-gcc STRIP = o/third_party/gcc/bin/x86_64-linux-musl-strip OBJCOPY = o/third_party/gcc/bin/x86_64-linux-musl-objcopy +OBJDUMP = o/third_party/gcc/bin/x86_64-linux-musl-objdump ADDR2LINE = o/third_party/gcc/bin/x86_64-linux-musl-addr2line COMMA := , @@ -87,6 +88,7 @@ BLAH1 := $(shell build/zipobj 2>/dev/null) BLAH2 := $(shell build/package 2>/dev/null) export ADDR2LINE +export OBJDUMP export CCNAME export CCVERSION export CP diff --git a/build/objdump b/build/objdump new file mode 100755 index 000000000..7fca2eab9 --- /dev/null +++ b/build/objdump @@ -0,0 +1,21 @@ +#-*-mode:sh;indent-tabs-mode:nil;tab-width:2;coding:utf-8-*-┐ +#───vi: set net ft=sh ts=2 sts=2 fenc=utf-8 :vi─────────────┘ +# +# OVERVIEW +# +# GNU Disassembly Veneer +# +# DESCRIPTION +# +# This script wraps normal objdump commands that're transparently +# passed-through. +# +# EXAMPLE +# +# build/objdump -xd o/tiny/examples/life.com.dbg + +if [ ! -d o/third_party/gcc ]; then + third_party/gcc/unbundle.sh +fi + +exec o/third_party/gcc/bin/x86_64-linux-musl-objdump "$@" diff --git a/dsp/core/mulaw.S b/dsp/core/mulaw.S index f82d33a45..e396a68f3 100644 --- a/dsp/core/mulaw.S +++ b/dsp/core/mulaw.S @@ -61,4 +61,4 @@ mulaw: .leafprologue mov %edx,%eax jmp 3b .endfn mulaw,globl - .yoink __FILE__ + .source __FILE__ diff --git a/dsp/core/sad16x8n.S b/dsp/core/sad16x8n.S index d36a0b0e2..7d21d59ba 100644 --- a/dsp/core/sad16x8n.S +++ b/dsp/core/sad16x8n.S @@ -38,4 +38,4 @@ sad16x8n: jnz 0b 1: .leafepilogue .endfn sad16x8n,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/dsp/mpeg/clamp4int256-core.S b/dsp/mpeg/clamp4int256-core.S index a4a8753de..4da4cc4d4 100644 --- a/dsp/mpeg/clamp4int256-core.S +++ b/dsp/mpeg/clamp4int256-core.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ clamp4int256$core: .leafprologue diff --git a/dsp/tty/windex-avx2.S b/dsp/tty/windex-avx2.S index 215e2528a..9c3225a5f 100644 --- a/dsp/tty/windex-avx2.S +++ b/dsp/tty/windex-avx2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns index of minimum uint16 in array. / diff --git a/dsp/tty/windex-sse4.S b/dsp/tty/windex-sse4.S index b90f41be9..08b657e54 100644 --- a/dsp/tty/windex-sse4.S +++ b/dsp/tty/windex-sse4.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns index of minimum positive int16 in array. / diff --git a/dsp/tty/windex.S b/dsp/tty/windex.S index 004f98f2a..03353633b 100644 --- a/dsp/tty/windex.S +++ b/dsp/tty/windex.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/nexgen32e/x86feature.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Dispatches to fastest windex() implementation. .initbss 300,_init_windex diff --git a/examples/package/README.md b/examples/package/README.md new file mode 100644 index 000000000..e69de29bb diff --git a/examples/package/lib/lib.mk b/examples/package/lib/lib.mk new file mode 100644 index 000000000..b85244db6 --- /dev/null +++ b/examples/package/lib/lib.mk @@ -0,0 +1,63 @@ +#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ +#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ +# +# SYNOPSIS +# +# Your package static library build config +# +# DESCRIPTION +# +# Your library doesn't have a main() function and can be compromised +# of sources written in multiple languages. + +PKGS += EXAMPLES_PACKAGE_LIB + +EXAMPLES_PACKAGE_LIB_ARTIFACTS += EXAMPLES_PACKAGE_LIB_A +EXAMPLES_PACKAGE_LIB = $(EXAMPLES_PACKAGE_LIB_A_DEPS) $(EXAMPLES_PACKAGE_LIB_A) +EXAMPLES_PACKAGE_LIB_A = o/$(MODE)/examples/package/lib/lib.a +EXAMPLES_PACKAGE_LIB_A_HDRS = $(filter %.h,$(EXAMPLES_PACKAGE_LIB_A_FILES)) +EXAMPLES_PACKAGE_LIB_A_SRCS_S = $(filter %.S,$(EXAMPLES_PACKAGE_LIB_A_FILES)) +EXAMPLES_PACKAGE_LIB_A_SRCS_C = $(filter %.c,$(EXAMPLES_PACKAGE_LIB_A_FILES)) +EXAMPLES_PACKAGE_LIB_A_CHECKS = $(EXAMPLES_PACKAGE_LIB_A).pkg + +EXAMPLES_PACKAGE_LIB_A_FILES := \ + $(wildcard examples/package/lib/*) \ + $(wildcard examples/package/lib/thunks/*) + +EXAMPLES_PACKAGE_LIB_A_SRCS = \ + $(EXAMPLES_PACKAGE_LIB_A_SRCS_S) \ + $(EXAMPLES_PACKAGE_LIB_A_SRCS_C) + +EXAMPLES_PACKAGE_LIB_A_OBJS = \ + $(EXAMPLES_PACKAGE_LIB_A_SRCS_S:%.S=o/$(MODE)/%.o) \ + $(EXAMPLES_PACKAGE_LIB_A_SRCS_C:%.c=o/$(MODE)/%.o) \ + $(EXAMPLES_PACKAGE_LIB_A_SRCS:%=o/$(MODE)/%.zip.o) + +EXAMPLES_PACKAGE_LIB_A_DIRECTDEPS = \ + LIBC_STDIO \ + LIBC_STUBS + +EXAMPLES_PACKAGE_LIB_A_DEPS := \ + $(call uniq,$(foreach x,$(EXAMPLES_PACKAGE_LIB_A_DIRECTDEPS),$($(x)))) + +$(EXAMPLES_PACKAGE_LIB_A): \ + examples/package/lib/ \ + $(EXAMPLES_PACKAGE_LIB_A).pkg \ + $(EXAMPLES_PACKAGE_LIB_A_OBJS) + +$(EXAMPLES_PACKAGE_LIB_A).pkg: \ + $(EXAMPLES_PACKAGE_LIB_A_OBJS) \ + $(foreach x,$(EXAMPLES_PACKAGE_LIB_A_DIRECTDEPS),$($(x)_A).pkg) + +$(EXAMPLES_PACKAGE_LIB_A_OBJS): examples/package/lib/lib.mk + +EXAMPLES_PACKAGE_LIB_LIBS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x))) +EXAMPLES_PACKAGE_LIB_SRCS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_SRCS)) +EXAMPLES_PACKAGE_LIB_HDRS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_HDRS)) +EXAMPLES_PACKAGE_LIB_BINS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_BINS)) +EXAMPLES_PACKAGE_LIB_CHECKS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_CHECKS)) +EXAMPLES_PACKAGE_LIB_OBJS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_OBJS)) +EXAMPLES_PACKAGE_LIB_TESTS = $(foreach x,$(EXAMPLES_PACKAGE_LIB_ARTIFACTS),$($(x)_TESTS)) + +.PHONY: o/$(MODE)/examples/package/lib +o/$(MODE)/examples/package/lib: $(EXAMPLES_PACKAGE_LIB_CHECKS) diff --git a/examples/package/lib/myasm.S b/examples/package/lib/myasm.S new file mode 100644 index 000000000..b7552c2f2 --- /dev/null +++ b/examples/package/lib/myasm.S @@ -0,0 +1,6 @@ +#include "libc/macros.h" + +MyAsm: .leafprologue + call MyPrint2 + .leafepilogue + .endfn MyAsm,globl diff --git a/examples/package/lib/myprint.c b/examples/package/lib/myprint.c new file mode 100644 index 000000000..e254f3657 --- /dev/null +++ b/examples/package/lib/myprint.c @@ -0,0 +1,10 @@ +#include "examples/package/lib/myprint.h" +#include "libc/stdio/stdio.h" + +void MyPrint(const char *s) { + MyAsm(s); +} + +void MyPrint2(const char *s) { + fputs(s, stdout); +} diff --git a/examples/package/lib/myprint.h b/examples/package/lib/myprint.h new file mode 100644 index 000000000..03caf3106 --- /dev/null +++ b/examples/package/lib/myprint.h @@ -0,0 +1,11 @@ +#ifndef COSMOPOLITAN_EXAMPLES_PACKAGE_LIB_MYPRINT_H_ +#define COSMOPOLITAN_EXAMPLES_PACKAGE_LIB_MYPRINT_H_ +#if !(__ASSEMBLER__ + __LINKER__ + 0) +COSMOPOLITAN_C_START_ + +void MyPrint(const char *); +void MyAsm(const char *); + +COSMOPOLITAN_C_END_ +#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ +#endif /* COSMOPOLITAN_EXAMPLES_PACKAGE_LIB_MYPRINT_H_ */ diff --git a/examples/package/new.sh b/examples/package/new.sh new file mode 100755 index 000000000..75cf2d46f --- /dev/null +++ b/examples/package/new.sh @@ -0,0 +1,33 @@ +#!/bin/sh +# +# SYNOPSIS +# +# Creates new package in repository. +# +# EXAMPLE +# +# examples/package/new.sh com/github/user/project + +DIR=${1:?need directory arg} +VAR=$(echo "$DIR" | tr a-z A-Z | tr / _) +BASENAME=${DIR##*/} +FILENAME="$DIR/$BASENAME" +MAKEFILE="$DIR/$BASENAME.mk" + +if [ -d "$DIR" ]; then + echo "already exists: $DIR" >&2 + exit 1 +fi + +mkdir -p "$DIR" && + cp -R examples/package/new/* "$DIR" && + find "$DIR" -type f | + xargs sed -i -e " + s/EXAMPLES_PACKAGE/$VAR/g + s/examples\/package\/package/$FILENAME/g + s/examples\/package/$DIR/g + " && + sed -i -e " + /#-φ-examples\/package\/new\.sh/i\ +include $MAKEFILE + " Makefile diff --git a/examples/package/package.mk b/examples/package/package.mk new file mode 100644 index 000000000..2bd4544f0 --- /dev/null +++ b/examples/package/package.mk @@ -0,0 +1,74 @@ +#-*-mode:makefile-gmake;indent-tabs-mode:t;tab-width:8;coding:utf-8-*-┐ +#───vi: set et ft=make ts=8 tw=8 fenc=utf-8 :vi───────────────────────┘ +# +# SYNOPSIS +# +# Your package build config for executable programs +# +# DESCRIPTION +# +# We assume each .c file in this directory has a main() function, so +# that it becomes as easy as possible to write lots of tiny programs +# +# EXAMPLE +# +# make o//examples/package +# o/examples/package/program.com + +PKGS += EXAMPLES_PACKAGE + +# Reads into memory the list of files in this directory. +EXAMPLES_PACKAGE_FILES := $(wildcard examples/package/*) + +# Defines sets of files without needing further iops. +EXAMPLES_PACKAGE_SRCS = $(filter %.c,$(EXAMPLES_PACKAGE_FILES)) +EXAMPLES_PACKAGE_HDRS = $(filter %.h,$(EXAMPLES_PACKAGE_FILES)) +EXAMPLES_PACKAGE_COMS = $(EXAMPLES_PACKAGE_OBJS:%.o=%.com) + +# Remaps source file names to object names. +# Also asks a wildcard rule to automatically run tool/build/zipobj.c +EXAMPLES_PACKAGE_OBJS = \ + $(EXAMPLES_PACKAGE_SRCS:%.c=o/$(MODE)/%.o) \ + $(EXAMPLES_PACKAGE_SRCS:%=o/$(MODE)/%.zip.o) +EXAMPLES_PACKAGE_BINS = \ + $(EXAMPLES_PACKAGE_COMS) \ + $(EXAMPLES_PACKAGE_COMS:%=%.dbg) + +# Lists packages whose symbols are or may be directly referenced here. +# Note that linking stubs is always a good idea due to synthetic code. +EXAMPLES_PACKAGE_DIRECTDEPS = \ + EXAMPLES_PACKAGE_LIB \ + LIBC_STDIO \ + LIBC_STUBS \ + LIBC_TINYMATH + +# Evaluates the set of transitive package dependencies. +EXAMPLES_PACKAGE_DEPS := \ + $(call uniq,$(foreach x,$(EXAMPLES_PACKAGE_DIRECTDEPS),$($(x)))) + +# Invalidates objects in this package when this makefile is edited +$(EXAMPLES_PACKAGE_OBJS): examples/package/vizlib.mk + +# Asks packager to index symbols and validate their relationships. +# @see tool/build/package.c +# @see build/rules.mk +o/$(MODE)/examples/package/build.pkg: \ + $(EXAMPLES_PACKAGE_OBJS) \ + $(foreach x,$(EXAMPLES_PACKAGE_DIRECTDEPS),$($(x)_A).pkg) + +# Specifies how to build programs as ELF binaries with DWARF debug info. +# @see build/rules.mk for definition of rule that does .com.dbg -> .com +o/$(MODE)/examples/package/%.com.dbg: \ + $(EXAMPLES_PACKAGE_DEPS) \ + o/$(MODE)/examples/package/package.pkg \ + o/$(MODE)/examples/package/%.o \ + $(CRT) \ + $(APE) + -@$(APELINK) + +# Creates target that builds everything in this package and subpackages. +.PHONY: o/$(MODE)/examples/package +o/$(MODE)/examples/package: \ + o/$(MODE)/examples/package/lib \ + $(EXAMPLES_PACKAGE_BINS) \ + $(EXAMPLES_PACKAGE_CHECKS) diff --git a/examples/package/program.c b/examples/package/program.c new file mode 100644 index 000000000..44dcc1dc8 --- /dev/null +++ b/examples/package/program.c @@ -0,0 +1,6 @@ +#include "examples/package/lib/myprint.h" + +int main(int argc, char *argv[]) { + MyPrint("welcome to your package"); + return 0; +} diff --git a/examples/raw-linux-hello.S b/examples/tiny-raw-linux-tutorial.S similarity index 69% rename from examples/raw-linux-hello.S rename to examples/tiny-raw-linux-tutorial.S index 356a45677..a1eff11bb 100644 --- a/examples/raw-linux-hello.S +++ b/examples/tiny-raw-linux-tutorial.S @@ -19,31 +19,42 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -/ Raw Linux Assembly Binary Tutorial +/ Tiny Raw Linux Binary Tutorial / / i.e. how to not use cosmopolitan runtimes at all / cosmopolitan basically abstracts this / except for all major platforms / -/ make o//examples/raw-linux-hello.elf -/ o//examples/raw-linux-hello.elf # about 6kb +/ make o//examples/raw-linux-hello.elf +/ o/examples/raw-linux-hello.elf # about 6kb / -/ Next consider doing it in C with fancy build tuning +/ Next try C but with fancy build tuning / -/ make -j8 -O \ -/ MODE=tiny \ -/ LDFLAGS=-s \ -/ CPPFLAGS=-DSUPPORT_VECTOR=0b00000001 \ -/ o/tiny/examples/hello2.elf -/ o/tiny/examples/hello2.elf # about 8kb +/ make -j8 -O \ +/ MODE=tiny \ +/ LDFLAGS+=-s \ +/ CPPFLAGS+=-DIM_FEELING_NAUGHTY \ +/ CPPFLAGS+=-DSUPPORT_VECTOR=0b00000001 \ +/ o/tiny/examples/hello2.elf +/ o/tiny/examples/hello2.elf # about 8kb / +/ @param rsp is [n,argv₀..argvₙ₋₁,0,envp₀..,0,auxv₀..,0,..] +/ @see also glibc static binaries which start at 800kb!!! +/ @see also go where interfaces sadly disempower ld prune +/ @see also the stl where bad linkage is due to tech debt +/ @see libc/macros-cpp.inc forthe getstr macro definition +/ @note libc/elf/elf.lds can be tinier with page align off +/ @note gas is more powerful than nasm due to rms notation / @noreturn _start: mov $12,%rdx # arg no. 3 is length getstr "hello world\n",%rsi,%esi # arg no. 2 is memory mov $1,%edi # arg no. 1 is stdout mov $1,%eax # write() - syscall # see libc/sysv/syscalls.sh + syscall # libc/sysv/syscalls.sh mov $0,%edi # arg no. 1 is success status mov $0xE7,%eax # exit_group() - syscall + syscall # context switch +0: rep nop # basic blockading + jmp 0b .endfn _start,globl + .source __FILE__ diff --git a/libc/alg/djbsort-avx2.S b/libc/alg/djbsort-avx2.S index 6cbe6f960..d8044bd7c 100644 --- a/libc/alg/djbsort-avx2.S +++ b/libc/alg/djbsort-avx2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .p2align 4 minmax_vector: diff --git a/libc/calls/g_ntstartupinfo_init.S b/libc/calls/g_ntstartupinfo_init.S index 1ad694062..32cac0de4 100644 --- a/libc/calls/g_ntstartupinfo_init.S +++ b/libc/calls/g_ntstartupinfo_init.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 400,_init_g_ntstartupinfo ezlea g_ntstartupinfo,cx diff --git a/libc/calls/g_ntsysteminfo_init.S b/libc/calls/g_ntsysteminfo_init.S index 995305cca..c77b955e1 100644 --- a/libc/calls/g_ntsysteminfo_init.S +++ b/libc/calls/g_ntsysteminfo_init.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 400,_init_g_ntsysteminfo ezlea g_ntsysteminfo,cx diff --git a/libc/calls/getntsyspath.S b/libc/calls/getntsyspath.S index 3e5349638..07159ddc5 100644 --- a/libc/calls/getntsyspath.S +++ b/libc/calls/getntsyspath.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Obtains WIN32 magic path, e.g. GetTempPathA. / diff --git a/libc/calls/hefty/mkntcmdline.c b/libc/calls/hefty/mkntcmdline.c index 335aef3a9..839284b62 100644 --- a/libc/calls/hefty/mkntcmdline.c +++ b/libc/calls/hefty/mkntcmdline.c @@ -26,6 +26,7 @@ #include "libc/nexgen32e/hascharacter.h" #include "libc/runtime/runtime.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/sysv/consts/fileno.h" #include "libc/sysv/errfuns.h" diff --git a/libc/calls/hefty/mkntenvblock.c b/libc/calls/hefty/mkntenvblock.c index 6e061806f..8777c25d3 100644 --- a/libc/calls/hefty/mkntenvblock.c +++ b/libc/calls/hefty/mkntenvblock.c @@ -23,6 +23,7 @@ #include "libc/macros.h" #include "libc/mem/mem.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/sysv/errfuns.h" /** diff --git a/libc/calls/ktmppath.S b/libc/calls/ktmppath.S index 4b1bf1c92..e05109b8d 100644 --- a/libc/calls/ktmppath.S +++ b/libc/calls/ktmppath.S @@ -40,4 +40,4 @@ kTmpPath: call __getntsyspath .init.end 300,_init_kTmpPath - .yoink __FILE__ + .source __FILE__ diff --git a/libc/calls/mkntpath.ncabi.c b/libc/calls/mkntpath.ncabi.c index c44249e31..5958354fc 100644 --- a/libc/calls/mkntpath.ncabi.c +++ b/libc/calls/mkntpath.ncabi.c @@ -23,6 +23,7 @@ #include "libc/calls/internal.h" #include "libc/conv/conv.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/sysv/errfuns.h" /** diff --git a/libc/calls/onntconsoleevent_init.S b/libc/calls/onntconsoleevent_init.S index 632d1a59c..eb44d0a94 100644 --- a/libc/calls/onntconsoleevent_init.S +++ b/libc/calls/onntconsoleevent_init.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 300,_init_onntconsoleevent ezlea onntconsoleevent$nt,cx diff --git a/libc/calls/onwincrash_init.S b/libc/calls/onwincrash_init.S index f665defec..d955d3e45 100644 --- a/libc/calls/onwincrash_init.S +++ b/libc/calls/onwincrash_init.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 300,_init_onwincrash pushpop 1,%rcx diff --git a/libc/calls/pipe-sysv.S b/libc/calls/pipe-sysv.S index ecdb6eda3..c9c845895 100644 --- a/libc/calls/pipe-sysv.S +++ b/libc/calls/pipe-sysv.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/dce.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Creates file descriptors for IPC. / diff --git a/libc/calls/setegid.S b/libc/calls/setegid.S index 027f8df69..08a1f3359 100644 --- a/libc/calls/setegid.S +++ b/libc/calls/setegid.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Sets effective group ID. / diff --git a/libc/calls/seteuid.S b/libc/calls/seteuid.S index f5fa2220b..c259766c6 100644 --- a/libc/calls/seteuid.S +++ b/libc/calls/seteuid.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Sets effective user ID. / diff --git a/libc/calls/sigenter.S b/libc/calls/sigenter.S index c41ce624e..aa4ce4faa 100644 --- a/libc/calls/sigenter.S +++ b/libc/calls/sigenter.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/calls/internal.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / System Five signal handler. / diff --git a/libc/calls/thunks/ftruncate-sysv.S b/libc/calls/thunks/ftruncate-sysv.S index c2d848d7b..f9c3dbeb0 100644 --- a/libc/calls/thunks/ftruncate-sysv.S +++ b/libc/calls/thunks/ftruncate-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls ftruncate() impl on host o/s if available. ftruncate$sysv: diff --git a/libc/calls/thunks/gettemppatha-flunk.S b/libc/calls/thunks/gettemppatha-flunk.S index f82cd0f6a..450f78b80 100644 --- a/libc/calls/thunks/gettemppatha-flunk.S +++ b/libc/calls/thunks/gettemppatha-flunk.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calls GetTempPathA() w/ different API. / diff --git a/libc/calls/thunks/lseek-sysv.S b/libc/calls/thunks/lseek-sysv.S index 3204971dc..db9531eef 100644 --- a/libc/calls/thunks/lseek-sysv.S +++ b/libc/calls/thunks/lseek-sysv.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/dce.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls lseek() impl on host o/s if available. lseek$sysv: diff --git a/libc/calls/thunks/mmap-sysv.S b/libc/calls/thunks/mmap-sysv.S index ba039ebf8..a799274e8 100644 --- a/libc/calls/thunks/mmap-sysv.S +++ b/libc/calls/thunks/mmap-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls mmap() on system five host o/s. mmap$sysv: diff --git a/libc/calls/thunks/onntconsoleevent.S b/libc/calls/thunks/onntconsoleevent.S index f14b08066..1d5a8516a 100644 --- a/libc/calls/thunks/onntconsoleevent.S +++ b/libc/calls/thunks/onntconsoleevent.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.windows -.yoink __FILE__ +.source __FILE__ onntconsoleevent$nt: ezlea onntconsoleevent,ax diff --git a/libc/calls/thunks/onwincrash.S b/libc/calls/thunks/onwincrash.S index 69e0a7686..2ae350e98 100644 --- a/libc/calls/thunks/onwincrash.S +++ b/libc/calls/thunks/onwincrash.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.windows -.yoink __FILE__ +.source __FILE__ onwincrash$nt: ezlea onwincrash,ax diff --git a/libc/calls/thunks/pread-sysv.S b/libc/calls/thunks/pread-sysv.S index 5a76bb725..8008e63f1 100644 --- a/libc/calls/thunks/pread-sysv.S +++ b/libc/calls/thunks/pread-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls pread() impl on host o/s if available. pread$sysv: diff --git a/libc/calls/thunks/preadv-sysv.S b/libc/calls/thunks/preadv-sysv.S index cc4bfcde5..057bb8a81 100644 --- a/libc/calls/thunks/preadv-sysv.S +++ b/libc/calls/thunks/preadv-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls preadv() impl on host o/s if available. preadv$sysv: diff --git a/libc/calls/thunks/pwrite-sysv.S b/libc/calls/thunks/pwrite-sysv.S index 9a8da3a32..6950afa97 100644 --- a/libc/calls/thunks/pwrite-sysv.S +++ b/libc/calls/thunks/pwrite-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls pwrite() impl on host o/s if available. pwrite$sysv: diff --git a/libc/calls/thunks/pwritev-sysv.S b/libc/calls/thunks/pwritev-sysv.S index b23b476dd..fb43057da 100644 --- a/libc/calls/thunks/pwritev-sysv.S +++ b/libc/calls/thunks/pwritev-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls pwritev() impl on host o/s if available. pwritev$sysv: diff --git a/libc/calls/thunks/truncate-sysv.S b/libc/calls/thunks/truncate-sysv.S index 98ec21aa1..c71b29d34 100644 --- a/libc/calls/thunks/truncate-sysv.S +++ b/libc/calls/thunks/truncate-sysv.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Directly calls truncate() impl on host o/s if available. truncate$sysv: diff --git a/libc/crt/crt.S b/libc/crt/crt.S index 4a48c8b7b..d8bec3323 100644 --- a/libc/crt/crt.S +++ b/libc/crt/crt.S @@ -22,7 +22,7 @@ #include "libc/notice.inc" #include "libc/runtime/internal.h" .section .start,"ax",@progbits -.yoink __FILE__ +.source __FILE__ / System Five userspace program entrypoint. / diff --git a/libc/fmt/kerrnonames.S b/libc/fmt/kerrnonames.S index 16e045601..e012529f5 100644 --- a/libc/fmt/kerrnonames.S +++ b/libc/fmt/kerrnonames.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/notice.inc" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Embeds ASCII names for errno constants into binary. / diff --git a/libc/fmt/stoa.c b/libc/fmt/stoa.c index a5bd920cd..93152a39c 100644 --- a/libc/fmt/stoa.c +++ b/libc/fmt/stoa.c @@ -26,6 +26,8 @@ #include "libc/nexgen32e/tinystrlen.h" #include "libc/str/internal.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" +#include "libc/str/tpencode.h" #include "libc/unicode/unicode.h" forceinline unsigned long tpiencode(wint_t wc) { diff --git a/libc/integral/c.inc b/libc/integral/c.inc index aece2fb43..089630e38 100644 --- a/libc/integral/c.inc +++ b/libc/integral/c.inc @@ -983,7 +983,7 @@ typedef uint64_t uintmax_t; /** * Pulls another module, by symbol, into linkage. - * The nop itself is discarded by the linker. + * @note nop is discarded by ape/ape.lds */ #define YOINK(SYMBOL) \ do { \ @@ -996,11 +996,30 @@ typedef uint64_t uintmax_t; : "X"(SYMBOL)); \ } while (0) +/** + * Pulls another module into linkage from top-level scope. + * @note nop is discarded by ape/ape.lds + */ #define STATIC_YOINK(SYMBOLSTR) \ asm(".pushsection .yoink\n\tnop\t\"" SYMBOLSTR "\"\n\t.popsection") +/** + * Pulls source file into ZIP portion of binary. + * @see build/rules.mk which defines the wildcard build rule %.zip.o + */ +#ifndef IM_FEELING_NAUGHTY +#define STATIC_YOINK_SOURCE(PATH) STATIC_YOINK(PATH) +#else +#define STATIC_YOINK_SOURCE(PATH) +#endif + +/** + * Pulls source code of object being compiled. + * @note automates better compliance with spirit of gpl terms + * @note headers need to call STATIC_YOINK_SOURCE() manually + */ #ifdef __SAUCE__ -STATIC_YOINK(__SAUCE__); +STATIC_YOINK_SOURCE(__SAUCE__); /* see build/definitions.mk */ #endif #ifndef __cplusplus diff --git a/libc/log/loglevel.S b/libc/log/loglevel.S index 247df9d88..be8beeaf9 100644 --- a/libc/log/loglevel.S +++ b/libc/log/loglevel.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/log/log.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .bss .align 4 diff --git a/libc/log/oncrashthunks.S b/libc/log/oncrashthunks.S index ca893b951..e64d28ab3 100644 --- a/libc/log/oncrashthunks.S +++ b/libc/log/oncrashthunks.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / These function names make it a bit more obvious which signal / caused the crash, particularly in the GDB GUI. They're coded diff --git a/libc/log/thunks/__check_fail_eq.S b/libc/log/thunks/__check_fail_eq.S index 1c49fe52a..a52b9d2d6 100644 --- a/libc/log/thunks/__check_fail_eq.S +++ b/libc/log/thunks/__check_fail_eq.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_EQ() in NDEBUG mode. __check_fail_eq: diff --git a/libc/log/thunks/__check_fail_ge.S b/libc/log/thunks/__check_fail_ge.S index b7612f937..b4dfbf577 100644 --- a/libc/log/thunks/__check_fail_ge.S +++ b/libc/log/thunks/__check_fail_ge.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_GE() in NDEBUG mode. __check_fail_ge: diff --git a/libc/log/thunks/__check_fail_gt.S b/libc/log/thunks/__check_fail_gt.S index c0da0fffc..ee1e9abd8 100644 --- a/libc/log/thunks/__check_fail_gt.S +++ b/libc/log/thunks/__check_fail_gt.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_GT() in NDEBUG mode. __check_fail_gt: diff --git a/libc/log/thunks/__check_fail_le.S b/libc/log/thunks/__check_fail_le.S index f2ae37bd2..f22bac4fc 100644 --- a/libc/log/thunks/__check_fail_le.S +++ b/libc/log/thunks/__check_fail_le.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_LE() in NDEBUG mode. __check_fail_le: diff --git a/libc/log/thunks/__check_fail_lt.S b/libc/log/thunks/__check_fail_lt.S index afb3420cd..75e9fc1de 100644 --- a/libc/log/thunks/__check_fail_lt.S +++ b/libc/log/thunks/__check_fail_lt.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_LT() in NDEBUG mode. __check_fail_lt: diff --git a/libc/log/thunks/__check_fail_ndebug.S b/libc/log/thunks/__check_fail_ndebug.S index da27764ec..01691a54e 100644 --- a/libc/log/thunks/__check_fail_ndebug.S +++ b/libc/log/thunks/__check_fail_ndebug.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ __check_fail_ndebug: push %rbp diff --git a/libc/log/thunks/__check_fail_ne.S b/libc/log/thunks/__check_fail_ne.S index 57d184887..f70e7b3ed 100644 --- a/libc/log/thunks/__check_fail_ne.S +++ b/libc/log/thunks/__check_fail_ne.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Code-size saving thunk for CHECK_NE() in NDEBUG mode. __check_fail_ne: diff --git a/libc/log/ubsanjmp.S b/libc/log/ubsanjmp.S index 85be6fd05..95fd492b2 100644 --- a/libc/log/ubsanjmp.S +++ b/libc/log/ubsanjmp.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ __ubsan_default_options: ret diff --git a/libc/macros-cpp.inc b/libc/macros-cpp.inc index decdb4ddd..9d33d5b40 100644 --- a/libc/macros-cpp.inc +++ b/libc/macros-cpp.inc @@ -87,6 +87,17 @@ ret .endm +/ Pulls source code file into ZIP portion of binary. +/ +/ @param symbol is quoted path relative to root e.g. __FILE__ +/ @see see libc/zipos/zipcentraldir.S +/ @see see libc/integral/c.inc +.macro .source symbol:req +#ifndef IM_FEELING_NAUGHTY + .yoink "\symbol" +#endif +.endm + / Inserts profiling hook in prologue if cc wants it. / / Cosmopolitan does this in a slightly different way from normal diff --git a/libc/math/__fesetround.S b/libc/math/__fesetround.S index 85027f7b7..875f7c842 100644 --- a/libc/math/__fesetround.S +++ b/libc/math/__fesetround.S @@ -35,4 +35,4 @@ fesetround: pop %rcx ret .endfn fesetround,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/math/feraiseexcept.S b/libc/math/feraiseexcept.S index cb84376b5..0642e0783 100644 --- a/libc/math/feraiseexcept.S +++ b/libc/math/feraiseexcept.S @@ -17,7 +17,7 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" feraiseexcept: and $0x3f,%edi @@ -27,4 +27,4 @@ feraiseexcept: xor %eax,%eax ret .endfn feraiseexcept,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/math/fesetenv.S b/libc/math/fesetenv.S index 5efdae9dc..fb1d7dc41 100644 --- a/libc/math/fesetenv.S +++ b/libc/math/fesetenv.S @@ -36,4 +36,4 @@ fesetenv: add $40,%rsp ret .endfn fesetenv,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/math/fetestexcept.S b/libc/math/fetestexcept.S index a2b9321ce..07b39d773 100644 --- a/libc/math/fetestexcept.S +++ b/libc/math/fetestexcept.S @@ -29,4 +29,4 @@ fetestexcept: and %edi,%eax ret .endfn fetestexcept,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/mem/calloc-hook.S b/libc/mem/calloc-hook.S index a71e871e7..e731545b7 100644 --- a/libc/mem/calloc-hook.S +++ b/libc/mem/calloc-hook.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 800,_init_calloc hook$calloc: diff --git a/libc/mem/calloc.S b/libc/mem/calloc.S index 875693327..89273b447 100644 --- a/libc/mem/calloc.S +++ b/libc/mem/calloc.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Allocates n * itemsize bytes, initialized to zero. / diff --git a/libc/mem/free-cxx.S b/libc/mem/free-cxx.S index 788d67ac5..c77bbf775 100644 --- a/libc/mem/free-cxx.S +++ b/libc/mem/free-cxx.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Frees memory the C++ way. / diff --git a/libc/mem/free-hook.S b/libc/mem/free-hook.S index 36161af18..37e44521f 100644 --- a/libc/mem/free-hook.S +++ b/libc/mem/free-hook.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 800,_init_free hook$free: diff --git a/libc/mem/free.S b/libc/mem/free.S index 381d87807..d42a56828 100644 --- a/libc/mem/free.S +++ b/libc/mem/free.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Free memory returned by malloc() & co. / diff --git a/libc/mem/malloc-cxx.S b/libc/mem/malloc-cxx.S index 096e12c21..ef584930b 100644 --- a/libc/mem/malloc-cxx.S +++ b/libc/mem/malloc-cxx.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Allocates memory the C++ way. / diff --git a/libc/mem/malloc-hook.S b/libc/mem/malloc-hook.S index c5b68f6b5..4e749ff0d 100644 --- a/libc/mem/malloc-hook.S +++ b/libc/mem/malloc-hook.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 800,_init_malloc hook$malloc: diff --git a/libc/mem/malloc.S b/libc/mem/malloc.S index 891fb4947..024b5144e 100644 --- a/libc/mem/malloc.S +++ b/libc/mem/malloc.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Allocates uninitialized memory. / diff --git a/libc/mem/malloc_usable_size.S b/libc/mem/malloc_usable_size.S index 201b4289a..ae7a2e628 100644 --- a/libc/mem/malloc_usable_size.S +++ b/libc/mem/malloc_usable_size.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Returns the number of bytes you can actually use in / an allocated chunk, which may be more than you requested diff --git a/libc/mem/memalign-cxx.S b/libc/mem/memalign-cxx.S index d60301fc0..78eb19884 100644 --- a/libc/mem/memalign-cxx.S +++ b/libc/mem/memalign-cxx.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Allocates aligned memory the C++ way. / diff --git a/libc/mem/memalign-hook.S b/libc/mem/memalign-hook.S index d4856b6b9..0c792beee 100644 --- a/libc/mem/memalign-hook.S +++ b/libc/mem/memalign-hook.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 800,_init_memalign hook$memalign: diff --git a/libc/mem/memalign.S b/libc/mem/memalign.S index 7051c6725..99b2a345c 100644 --- a/libc/mem/memalign.S +++ b/libc/mem/memalign.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Allocates aligned memory. / diff --git a/libc/mem/posix_memalign.S b/libc/mem/posix_memalign.S index ed6fc4d69..dc6c6f24f 100644 --- a/libc/mem/posix_memalign.S +++ b/libc/mem/posix_memalign.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Allocates aligned memory the POSIX way. / diff --git a/libc/mem/pvalloc.S b/libc/mem/pvalloc.S index b792e0374..aee2b9473 100644 --- a/libc/mem/pvalloc.S +++ b/libc/mem/pvalloc.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Equivalent to valloc(minimum-page-that-holds(n)), that is, / round up n to nearest PAGESIZE. diff --git a/libc/mem/realloc-hook.S b/libc/mem/realloc-hook.S index 67466d291..bae29ded4 100644 --- a/libc/mem/realloc-hook.S +++ b/libc/mem/realloc-hook.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 800,_init_realloc hook$realloc: diff --git a/libc/mem/realloc.S b/libc/mem/realloc.S index 4564a49a1..0e9bb81d3 100644 --- a/libc/mem/realloc.S +++ b/libc/mem/realloc.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Allocates / resizes / frees memory, e.g. / diff --git a/libc/mem/realloc_in_place.S b/libc/mem/realloc_in_place.S index 8a1186204..3dd762dce 100644 --- a/libc/mem/realloc_in_place.S +++ b/libc/mem/realloc_in_place.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Resizes the space allocated for p to size n, only if this can be / done without moving p (i.e., only if there is adjacent space diff --git a/libc/mem/valloc.S b/libc/mem/valloc.S index 3dd0b8373..86702b0ad 100644 --- a/libc/mem/valloc.S +++ b/libc/mem/valloc.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Equivalent to memalign(PAGESIZE, n). / diff --git a/libc/nexgen32e/atomicislockfree.S b/libc/nexgen32e/atomicislockfree.S index fe44f733c..caf301a5e 100644 --- a/libc/nexgen32e/atomicislockfree.S +++ b/libc/nexgen32e/atomicislockfree.S @@ -36,4 +36,4 @@ __atomic_is_lock_free: cmovnz %ecx,%eax .leafepilogue .endfn __atomic_is_lock_free,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bcmp.S b/libc/nexgen32e/bcmp.S index b278f774e..083c44468 100644 --- a/libc/nexgen32e/bcmp.S +++ b/libc/nexgen32e/bcmp.S @@ -30,4 +30,4 @@ / @return 0 if equal or nonzero bcmp: jmp *hook$memcmp(%rip) .endfn bcmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bcopy.S b/libc/nexgen32e/bcopy.S index 55c5671e7..34375ba1e 100644 --- a/libc/nexgen32e/bcopy.S +++ b/libc/nexgen32e/bcopy.S @@ -28,5 +28,5 @@ / @param rdx is number of bytes bcopy: jmp memmove .endfn bcopy,globl - .yoink __FILE__ - .yoink __FILE__ + .source __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bsf.S b/libc/nexgen32e/bsf.S index fb27f6caf..ba5fd9e3f 100644 --- a/libc/nexgen32e/bsf.S +++ b/libc/nexgen32e/bsf.S @@ -40,4 +40,4 @@ bsf: .leafprologue bsf %edi,%eax .leafepilogue .endfn bsf,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bsfl.S b/libc/nexgen32e/bsfl.S index 621ebba62..0b583658d 100644 --- a/libc/nexgen32e/bsfl.S +++ b/libc/nexgen32e/bsfl.S @@ -41,4 +41,4 @@ bsfl: .leafprologue .leafepilogue .endfn bsfl,globl .alias bsfl,bsfll - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bsr.S b/libc/nexgen32e/bsr.S index 9ed66cc6e..f8c5407f7 100644 --- a/libc/nexgen32e/bsr.S +++ b/libc/nexgen32e/bsr.S @@ -40,4 +40,4 @@ bsr: .leafprologue bsr %edi,%eax .leafepilogue .endfn bsr,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bsrl.S b/libc/nexgen32e/bsrl.S index 136594ee6..62050cbfc 100644 --- a/libc/nexgen32e/bsrl.S +++ b/libc/nexgen32e/bsrl.S @@ -41,4 +41,4 @@ bsrl: .leafprologue .leafepilogue .endfn bsrl,globl .alias bsrl,bsrll - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bsrmax.S b/libc/nexgen32e/bsrmax.S index a5fec4acf..191341796 100644 --- a/libc/nexgen32e/bsrmax.S +++ b/libc/nexgen32e/bsrmax.S @@ -44,4 +44,4 @@ bsrmax: .leafprologue 2: add $64,%eax jmp 1b .endfn bsrmax,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/bzero.S b/libc/nexgen32e/bzero.S index 1e8aac639..788f9a9f1 100644 --- a/libc/nexgen32e/bzero.S +++ b/libc/nexgen32e/bzero.S @@ -32,4 +32,4 @@ bzero: mov %rsi,%rdx xor %esi,%esi jmp _memset .endfn bzero,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cescapec.S b/libc/nexgen32e/cescapec.S index c733e0e3c..5b5788121 100644 --- a/libc/nexgen32e/cescapec.S +++ b/libc/nexgen32e/cescapec.S @@ -130,4 +130,4 @@ cescapectab: add $(8-.Lcescapectab.ro.size%8),%rsi .endif .init.end 300,_init_cescapec - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/clamp1.S b/libc/nexgen32e/clamp1.S index b7a59be35..6b28e9a02 100644 --- a/libc/nexgen32e/clamp1.S +++ b/libc/nexgen32e/clamp1.S @@ -32,4 +32,4 @@ clamp1: .leafprologue .Lmax: .rept 4 .float 0.99609375 .endr - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpsb.S b/libc/nexgen32e/cmpsb.S index f3e52cae1..6c0a377b5 100644 --- a/libc/nexgen32e/cmpsb.S +++ b/libc/nexgen32e/cmpsb.S @@ -40,4 +40,4 @@ cmpsb: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpsl.S b/libc/nexgen32e/cmpsl.S index 8d0d5f28e..cb3dc3685 100644 --- a/libc/nexgen32e/cmpsl.S +++ b/libc/nexgen32e/cmpsl.S @@ -40,4 +40,4 @@ cmpsl: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpsq.S b/libc/nexgen32e/cmpsq.S index 94a074751..83099982f 100644 --- a/libc/nexgen32e/cmpsq.S +++ b/libc/nexgen32e/cmpsq.S @@ -40,4 +40,4 @@ cmpsq: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpsw.S b/libc/nexgen32e/cmpsw.S index 9f5daa761..8dd7435fd 100644 --- a/libc/nexgen32e/cmpsw.S +++ b/libc/nexgen32e/cmpsw.S @@ -40,4 +40,4 @@ cmpsw: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpub.S b/libc/nexgen32e/cmpub.S index 3ba55e83e..56961c8ac 100644 --- a/libc/nexgen32e/cmpub.S +++ b/libc/nexgen32e/cmpub.S @@ -40,4 +40,4 @@ cmpub: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpul.S b/libc/nexgen32e/cmpul.S index d9c8f5f72..6a2fd201f 100644 --- a/libc/nexgen32e/cmpul.S +++ b/libc/nexgen32e/cmpul.S @@ -40,4 +40,4 @@ cmpul: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpuq.S b/libc/nexgen32e/cmpuq.S index 8a8a4e453..b5bb944f3 100644 --- a/libc/nexgen32e/cmpuq.S +++ b/libc/nexgen32e/cmpuq.S @@ -40,4 +40,4 @@ cmpuq: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/cmpuw.S b/libc/nexgen32e/cmpuw.S index b628c22f0..bd23135a4 100644 --- a/libc/nexgen32e/cmpuw.S +++ b/libc/nexgen32e/cmpuw.S @@ -40,4 +40,4 @@ cmpuw: .leafprologue .Lneg1: .long -1 .endobj .Lneg1 .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/crc32-pclmul.S b/libc/nexgen32e/crc32-pclmul.S index 05e1a3491..e555162c8 100644 --- a/libc/nexgen32e/crc32-pclmul.S +++ b/libc/nexgen32e/crc32-pclmul.S @@ -260,4 +260,4 @@ crc32$pclmul: 4194304 7.025 7.059 7.030 462 8388607 7.082 6.980 6.997 464 8388608 7.051 6.985 6.999 464 */ - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/crc32.S b/libc/nexgen32e/crc32.S index 640be2c0e..4adb3cc5e 100644 --- a/libc/nexgen32e/crc32.S +++ b/libc/nexgen32e/crc32.S @@ -27,4 +27,4 @@ crc32: movslq %edx,%rdx jmp crc32_z .endfn crc32,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/crc32c.S b/libc/nexgen32e/crc32c.S index ca6c0158b..c6135f327 100644 --- a/libc/nexgen32e/crc32c.S +++ b/libc/nexgen32e/crc32c.S @@ -43,4 +43,4 @@ crc32c: .quad 0 #endif stosq .init.end 300,_init_crc32c - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/crc32init.S b/libc/nexgen32e/crc32init.S index d0f937621..bc413bdad 100644 --- a/libc/nexgen32e/crc32init.S +++ b/libc/nexgen32e/crc32init.S @@ -69,4 +69,4 @@ crc32init: leave ret .endfn crc32init,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ctype.S b/libc/nexgen32e/ctype.S index 477ec90d2..90f484c06 100644 --- a/libc/nexgen32e/ctype.S +++ b/libc/nexgen32e/ctype.S @@ -98,4 +98,4 @@ ctypep: pop %rsi and %esi,%eax ret .endfn ctypep - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/div10.greg.S b/libc/nexgen32e/div10.greg.S index 407d0ffc1..637b67731 100644 --- a/libc/nexgen32e/div10.greg.S +++ b/libc/nexgen32e/div10.greg.S @@ -116,4 +116,4 @@ div10: .leafprologue pop %rbx .leafepilogue .endfn div10,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/div1000000000int64.greg.S b/libc/nexgen32e/div1000000000int64.greg.S index 2493aa8ae..0822f65e7 100644 --- a/libc/nexgen32e/div1000000000int64.greg.S +++ b/libc/nexgen32e/div1000000000int64.greg.S @@ -29,4 +29,4 @@ div1000000000int64: jmp tinydivsi .globl tinydivsi .endfn div1000000000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/div1000000int64.greg.S b/libc/nexgen32e/div1000000int64.greg.S index 3f8a36174..7fc9f0e52 100644 --- a/libc/nexgen32e/div1000000int64.greg.S +++ b/libc/nexgen32e/div1000000int64.greg.S @@ -28,4 +28,4 @@ div1000000int64: movabs $0x431bde82d7b634db,%rdx jmp tinydivsi .endfn div1000000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/div1000int64.greg.S b/libc/nexgen32e/div1000int64.greg.S index 5ec3dba6b..ac5e28dfa 100644 --- a/libc/nexgen32e/div1000int64.greg.S +++ b/libc/nexgen32e/div1000int64.greg.S @@ -28,4 +28,4 @@ div1000int64: movabs $0x20c49ba5e353f7cf,%rdx jmp tinydivsi .endfn div1000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/div10int64.greg.S b/libc/nexgen32e/div10int64.greg.S index a1c26fe83..3a7f412f2 100644 --- a/libc/nexgen32e/div10int64.greg.S +++ b/libc/nexgen32e/div10int64.greg.S @@ -28,4 +28,4 @@ div10int64: movabs $0x6666666666666667,%rdx jmp tinydivsi .endfn div10int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/environ.S b/libc/nexgen32e/environ.S index 4f5ba6ebd..80ce6f28f 100644 --- a/libc/nexgen32e/environ.S +++ b/libc/nexgen32e/environ.S @@ -30,4 +30,4 @@ environ:.quad 0 .init.start 300,_init_environ mov %r14,environ(%rip) .init.end 300,_init_environ - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/explicit_bzero.S b/libc/nexgen32e/explicit_bzero.S index 872db8cdb..de85d01bc 100644 --- a/libc/nexgen32e/explicit_bzero.S +++ b/libc/nexgen32e/explicit_bzero.S @@ -47,4 +47,4 @@ explicit_bzero: xorps %xmm5,%xmm5 .leafepilogue .endfn explicit_bzero,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ffs.S b/libc/nexgen32e/ffs.S index 1ac34d373..15b1d8e4e 100644 --- a/libc/nexgen32e/ffs.S +++ b/libc/nexgen32e/ffs.S @@ -44,4 +44,4 @@ ffs: .leafprologue inc %eax .leafepilogue .endfn ffs,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ffsl.S b/libc/nexgen32e/ffsl.S index 2ea53d213..e14c4ec7e 100644 --- a/libc/nexgen32e/ffsl.S +++ b/libc/nexgen32e/ffsl.S @@ -45,4 +45,4 @@ ffsl: .leafprologue .leafepilogue .endfn ffsl,globl .alias ffsl,ffsll - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/g_argv.S b/libc/nexgen32e/g_argv.S index d061f61e6..ba149b035 100644 --- a/libc/nexgen32e/g_argv.S +++ b/libc/nexgen32e/g_argv.S @@ -29,4 +29,4 @@ g_argv: .quad 0 mov %r13,%rax stosq .init.end 300,_init_g_argv - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/g_auxv.S b/libc/nexgen32e/g_auxv.S index ff6d9da2f..ce1b5e93c 100644 --- a/libc/nexgen32e/g_auxv.S +++ b/libc/nexgen32e/g_auxv.S @@ -28,4 +28,4 @@ g_auxv: .quad 0 mov %r15,%rax stosq .init.end 300,_init_g_auxv - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/g_runstate.S b/libc/nexgen32e/g_runstate.S index 0a49044ab..ac436574f 100644 --- a/libc/nexgen32e/g_runstate.S +++ b/libc/nexgen32e/g_runstate.S @@ -20,4 +20,4 @@ #include "libc/macros.h" .comm g_runstate,4 - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/gc.S b/libc/nexgen32e/gc.S index 57330b1f9..cde05645b 100644 --- a/libc/nexgen32e/gc.S +++ b/libc/nexgen32e/gc.S @@ -88,4 +88,4 @@ __garbage: stosq pop %rdi .init.end 100,_init_garbage - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/gclongjmp.S b/libc/nexgen32e/gclongjmp.S index 756ef777f..dca4b832e 100644 --- a/libc/nexgen32e/gclongjmp.S +++ b/libc/nexgen32e/gclongjmp.S @@ -59,4 +59,4 @@ gclongjmp: pop %rdi jmp 0b .endfn gclongjmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/hextoint.S b/libc/nexgen32e/hextoint.S index 82dd4e694..fd1cda346 100644 --- a/libc/nexgen32e/hextoint.S +++ b/libc/nexgen32e/hextoint.S @@ -30,4 +30,4 @@ hextoint: and $15,%eax .leafepilogue .endfn hextoint,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/identity.S b/libc/nexgen32e/identity.S index 49db535ae..63d551f1d 100644 --- a/libc/nexgen32e/identity.S +++ b/libc/nexgen32e/identity.S @@ -26,4 +26,4 @@ identity: mov %rdi,%rax ret .endfn identity,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/imapxlatab.S b/libc/nexgen32e/imapxlatab.S index 4207fdf4d..416245eb4 100644 --- a/libc/nexgen32e/imapxlatab.S +++ b/libc/nexgen32e/imapxlatab.S @@ -38,4 +38,4 @@ imapxlatab: loop 1b .leafepilogue .endfn imapxlatab,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iscntrl.S b/libc/nexgen32e/iscntrl.S index f3fc38048..cb93584b1 100644 --- a/libc/nexgen32e/iscntrl.S +++ b/libc/nexgen32e/iscntrl.S @@ -32,4 +32,4 @@ iscntrl:.leafprologue and $1,%eax 1: .leafepilogue .endfn iscntrl,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/isgraph.S b/libc/nexgen32e/isgraph.S index b7ef7fc80..81acb2145 100644 --- a/libc/nexgen32e/isgraph.S +++ b/libc/nexgen32e/isgraph.S @@ -35,4 +35,4 @@ isgraph:.leafprologue and %edx,%eax 1: .leafepilogue .endfn isgraph,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ispunct.S b/libc/nexgen32e/ispunct.S index 83fa6088a..fed90665a 100644 --- a/libc/nexgen32e/ispunct.S +++ b/libc/nexgen32e/ispunct.S @@ -38,4 +38,4 @@ ispunct:.leafprologue sete %al 1: .leafepilogue .endfn ispunct,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswalnum.S b/libc/nexgen32e/iswalnum.S index abe1844ce..45d82b8a5 100644 --- a/libc/nexgen32e/iswalnum.S +++ b/libc/nexgen32e/iswalnum.S @@ -30,4 +30,4 @@ iswalnum: andl $6,%eax 1: .leafepilogue .endfn iswalnum,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswalpha.S b/libc/nexgen32e/iswalpha.S index e6d72eabc..7e369299c 100644 --- a/libc/nexgen32e/iswalpha.S +++ b/libc/nexgen32e/iswalpha.S @@ -31,4 +31,4 @@ iswalpha: movzbl %al,%eax 1: .leafepilogue .endfn iswalpha,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswblank.S b/libc/nexgen32e/iswblank.S index e92345bdd..e3835cac8 100644 --- a/libc/nexgen32e/iswblank.S +++ b/libc/nexgen32e/iswblank.S @@ -31,4 +31,4 @@ iswblank: movzbl %al,%eax 1: .leafepilogue .endfn iswblank,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswcntrl.S b/libc/nexgen32e/iswcntrl.S index be1699f6b..cc8aaa2e6 100644 --- a/libc/nexgen32e/iswcntrl.S +++ b/libc/nexgen32e/iswcntrl.S @@ -32,4 +32,4 @@ iswcntrl: and $1,%eax 1: .leafepilogue .endfn iswcntrl,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswdigit.S b/libc/nexgen32e/iswdigit.S index d2d8eb473..06ff6b97f 100644 --- a/libc/nexgen32e/iswdigit.S +++ b/libc/nexgen32e/iswdigit.S @@ -31,4 +31,4 @@ iswdigit: movzbl %al,%eax 1: .leafepilogue .endfn iswdigit,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswgraph.S b/libc/nexgen32e/iswgraph.S index 630857a01..c64ad408f 100644 --- a/libc/nexgen32e/iswgraph.S +++ b/libc/nexgen32e/iswgraph.S @@ -35,4 +35,4 @@ iswgraph: andl %edx,%eax 1: .leafepilogue .endfn iswgraph,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswlower.S b/libc/nexgen32e/iswlower.S index 72c503150..dfb1ddfca 100644 --- a/libc/nexgen32e/iswlower.S +++ b/libc/nexgen32e/iswlower.S @@ -31,4 +31,4 @@ iswlower: movzbl %al,%eax 1: .leafepilogue .endfn iswlower,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswprint.S b/libc/nexgen32e/iswprint.S index 499584258..434d96e7f 100644 --- a/libc/nexgen32e/iswprint.S +++ b/libc/nexgen32e/iswprint.S @@ -32,4 +32,4 @@ iswprint: andl $1,%eax 1: .leafepilogue .endfn iswprint,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswpunct.S b/libc/nexgen32e/iswpunct.S index 817613a87..f47e4b524 100644 --- a/libc/nexgen32e/iswpunct.S +++ b/libc/nexgen32e/iswpunct.S @@ -36,4 +36,4 @@ iswpunct: sete %al 1: .leafepilogue .endfn iswpunct,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswspace.S b/libc/nexgen32e/iswspace.S index b91d96778..0e87e3eb0 100644 --- a/libc/nexgen32e/iswspace.S +++ b/libc/nexgen32e/iswspace.S @@ -30,4 +30,4 @@ iswspace: andl $1,%eax 1: .leafepilogue .endfn iswspace,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswupper.S b/libc/nexgen32e/iswupper.S index 6e113b3d4..fcaf2f790 100644 --- a/libc/nexgen32e/iswupper.S +++ b/libc/nexgen32e/iswupper.S @@ -31,4 +31,4 @@ iswupper: movzbl %al,%eax 1: .leafepilogue .endfn iswupper,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/iswxdigit.S b/libc/nexgen32e/iswxdigit.S index ba62f7540..197794d53 100644 --- a/libc/nexgen32e/iswxdigit.S +++ b/libc/nexgen32e/iswxdigit.S @@ -31,4 +31,4 @@ iswxdigit: movzbl %al,%eax 1: .leafepilogue .endfn iswxdigit,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kbase36.S b/libc/nexgen32e/kbase36.S index ec0ff85ea..0b9167c00 100644 --- a/libc/nexgen32e/kbase36.S +++ b/libc/nexgen32e/kbase36.S @@ -44,4 +44,4 @@ kBase36:.zero 256 loop 0b add $255-'Z,%rdi .init.end 300,_init_kBase36 - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kcp437.S b/libc/nexgen32e/kcp437.S index e6610c34d..2c8a424cb 100644 --- a/libc/nexgen32e/kcp437.S +++ b/libc/nexgen32e/kcp437.S @@ -93,4 +93,4 @@ kCp437: .short 0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x03bb #f8:°∙·√ⁿ²■λ .endobj kCp437,globl .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kcpuids.S b/libc/nexgen32e/kcpuids.S index d0e003cf1..228257757 100644 --- a/libc/nexgen32e/kcpuids.S +++ b/libc/nexgen32e/kcpuids.S @@ -85,4 +85,4 @@ kCpuids:.long 0,0,0,0 # EAX=0 (Basic Processor Info) #endif 5: pop %rbx .init.end 201,_init_kCpuids - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kcrc32ctab.S b/libc/nexgen32e/kcrc32ctab.S index 79e842070..3550280e4 100644 --- a/libc/nexgen32e/kcrc32ctab.S +++ b/libc/nexgen32e/kcrc32ctab.S @@ -39,4 +39,4 @@ kCrc32cTab: call crc32init pop %rsi .init.end 300,_init_kCrc32cTab - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kcrc32tab.S b/libc/nexgen32e/kcrc32tab.S index 8f89985ee..1090a1446 100644 --- a/libc/nexgen32e/kcrc32tab.S +++ b/libc/nexgen32e/kcrc32tab.S @@ -39,4 +39,4 @@ kCrc32Tab: call crc32init pop %rsi .init.end 300,_init_kCrc32Tab - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kctype.S b/libc/nexgen32e/kctype.S index eed6c1acb..dadbd1cae 100644 --- a/libc/nexgen32e/kctype.S +++ b/libc/nexgen32e/kctype.S @@ -60,4 +60,4 @@ kCtype: .rept 256 .init.start 300,_init_kCtype call rldecode .init.end 300,_init_kCtype - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kreversebits.S b/libc/nexgen32e/kreversebits.S index e622b2fbb..d9072d320 100644 --- a/libc/nexgen32e/kreversebits.S +++ b/libc/nexgen32e/kreversebits.S @@ -87,4 +87,4 @@ kReverseBits: .byte 0b00111111,0b10111111,0b01111111,0b11111111 .endobj kReverseBits,globl .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ksha256tab.S b/libc/nexgen32e/ksha256tab.S index 908df33d7..7a9198f88 100644 --- a/libc/nexgen32e/ksha256tab.S +++ b/libc/nexgen32e/ksha256tab.S @@ -30,4 +30,4 @@ kSha256Tab: .long 0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2 .endobj kSha256Tab,globl,hidden .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ksigsetempty.S b/libc/nexgen32e/ksigsetempty.S index b09aa7c48..490eb8966 100644 --- a/libc/nexgen32e/ksigsetempty.S +++ b/libc/nexgen32e/ksigsetempty.S @@ -36,4 +36,4 @@ kSigsetEmpty: .init.start 300,_init_kSigsetEmpty add $NSIG/8,%rdi .init.end 300,_init_kSigsetEmpty - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ksigsetfull.S b/libc/nexgen32e/ksigsetfull.S index 286955e54..58d770aeb 100644 --- a/libc/nexgen32e/ksigsetfull.S +++ b/libc/nexgen32e/ksigsetfull.S @@ -39,4 +39,4 @@ kSigsetFull: stosq .endr .init.end 300,_init_kSigsetFull - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/kstarttsc.S b/libc/nexgen32e/kstarttsc.S index a10119dc3..f7d221d2c 100644 --- a/libc/nexgen32e/kstarttsc.S +++ b/libc/nexgen32e/kstarttsc.S @@ -34,4 +34,4 @@ kStartTsc: xchg %edx,%eax stosl .init.end 200,_init_kStartTsc - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ktolower.S b/libc/nexgen32e/ktolower.S index 03ab028bf..df0f355b3 100644 --- a/libc/nexgen32e/ktolower.S +++ b/libc/nexgen32e/ktolower.S @@ -58,4 +58,4 @@ kToLower16: .type gperf_downcase,@object .globl gperf_downcase gperf_downcase = kToLower - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/ktoupper.S b/libc/nexgen32e/ktoupper.S index 012a417f6..533699aaa 100644 --- a/libc/nexgen32e/ktoupper.S +++ b/libc/nexgen32e/ktoupper.S @@ -32,4 +32,4 @@ kToUpper: 0: subb $0x20,(%r8,%rcx) loop 0b .init.end 300,_init_kToUpper - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/llog10.S b/libc/nexgen32e/llog10.S index 335315705..57d20d45e 100644 --- a/libc/nexgen32e/llog10.S +++ b/libc/nexgen32e/llog10.S @@ -64,4 +64,4 @@ llog10data: .quad 100000000000000000 .endobj llog10data .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/loadxmm.S b/libc/nexgen32e/loadxmm.S index 1f91c8974..3e35b87b8 100644 --- a/libc/nexgen32e/loadxmm.S +++ b/libc/nexgen32e/loadxmm.S @@ -43,4 +43,4 @@ loadxmm:.leafprologue movaps 0x70(%rdi),%xmm15 .leafepilogue .endfn loadxmm,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/lolendian.S b/libc/nexgen32e/lolendian.S index 49bc18570..4fb75f3fe 100644 --- a/libc/nexgen32e/lolendian.S +++ b/libc/nexgen32e/lolendian.S @@ -76,4 +76,4 @@ htons: movzwl %di,%eax .endfn htole16,globl .endfn ntohs,globl .endfn bswap_16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/longjmp.S b/libc/nexgen32e/longjmp.S index d64e1de49..2e93e2e0b 100644 --- a/libc/nexgen32e/longjmp.S +++ b/libc/nexgen32e/longjmp.S @@ -41,4 +41,4 @@ longjmp:mov %esi,%eax mov 48(%rdi),%r15 jmp *56(%rdi) .endfn longjmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/lzcnt.S b/libc/nexgen32e/lzcnt.S index 95734c267..092a27b17 100644 --- a/libc/nexgen32e/lzcnt.S +++ b/libc/nexgen32e/lzcnt.S @@ -44,4 +44,4 @@ lzcnt: .leafprologue sub %ecx,%eax .leafepilogue .endfn lzcnt,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/lzcntl.S b/libc/nexgen32e/lzcntl.S index 35979c276..576c42435 100644 --- a/libc/nexgen32e/lzcntl.S +++ b/libc/nexgen32e/lzcntl.S @@ -44,4 +44,4 @@ lzcntl: .leafprologue sub %ecx,%eax .endfn lzcntl,globl .alias lzcntl,lzcntll - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memcmp-avx2.S b/libc/nexgen32e/memcmp-avx2.S index 273421ddf..25effea65 100644 --- a/libc/nexgen32e/memcmp-avx2.S +++ b/libc/nexgen32e/memcmp-avx2.S @@ -61,4 +61,4 @@ memcmp$avx2: 8: vxorps %ymm0,%ymm0,%ymm0 .leafepilogue .endfn memcmp$avx2,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memcmp-hook.S b/libc/nexgen32e/memcmp-hook.S index 37a989f1e..89ac28898 100644 --- a/libc/nexgen32e/memcmp-hook.S +++ b/libc/nexgen32e/memcmp-hook.S @@ -47,4 +47,4 @@ hook$memcmp: #endif /* TINY */ stosq .init.end 300,_init_memcmp - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memcmp-sse2.S b/libc/nexgen32e/memcmp-sse2.S index eb3eb7e63..350aa35ad 100644 --- a/libc/nexgen32e/memcmp-sse2.S +++ b/libc/nexgen32e/memcmp-sse2.S @@ -59,4 +59,4 @@ memcmp$sse2: 7: xor %eax,%eax 8: .leafepilogue .endfn memcmp$sse2,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memcmp.S b/libc/nexgen32e/memcmp.S index 377030cbc..1df733529 100644 --- a/libc/nexgen32e/memcmp.S +++ b/libc/nexgen32e/memcmp.S @@ -28,7 +28,7 @@ / @asyncsignalsafe memcmp: jmp *hook$memcmp(%rip) .endfn memcmp,globl - .yoink __FILE__ + .source __FILE__ /* cosmo memcmp() avx2 for #c per n where c ≈ 0.273ns N x1 x8 x64 mBps diff --git a/libc/nexgen32e/memcpy.S b/libc/nexgen32e/memcpy.S index cbd43a247..aa359e38a 100644 --- a/libc/nexgen32e/memcpy.S +++ b/libc/nexgen32e/memcpy.S @@ -43,7 +43,7 @@ / @mode long / @asyncsignalsafe .align 16 - .yoink __FILE__ + .source __FILE__ memcpy: mov %rdi,%rax / 𝑠𝑙𝑖𝑑𝑒 diff --git a/libc/nexgen32e/memeqmask.S b/libc/nexgen32e/memeqmask.S index 1702648e0..73d5d023f 100644 --- a/libc/nexgen32e/memeqmask.S +++ b/libc/nexgen32e/memeqmask.S @@ -47,4 +47,4 @@ memeqmask: 1: mov %rdi,%rax .leafepilogue .endfn memeqmask,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memjmpinit.S b/libc/nexgen32e/memjmpinit.S index 3b67250f8..97db1a444 100644 --- a/libc/nexgen32e/memjmpinit.S +++ b/libc/nexgen32e/memjmpinit.S @@ -46,4 +46,4 @@ memjmpinit: lodsq ret .endfn memjmpinit,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memmove.S b/libc/nexgen32e/memmove.S index 5ff041593..ab87b5696 100644 --- a/libc/nexgen32e/memmove.S +++ b/libc/nexgen32e/memmove.S @@ -51,4 +51,4 @@ _memmove: .leafepilogue .endfn _memmove,globl,hidden .endfn memmove,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/mempcpy.S b/libc/nexgen32e/mempcpy.S index 5ad2cd7c2..a68b3532b 100644 --- a/libc/nexgen32e/mempcpy.S +++ b/libc/nexgen32e/mempcpy.S @@ -30,4 +30,4 @@ mempcpy:lea (%rdi,%rdx),%rax jmp _memcpy .endfn mempcpy,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memrchr.S b/libc/nexgen32e/memrchr.S index 59761b97b..ab399aea5 100644 --- a/libc/nexgen32e/memrchr.S +++ b/libc/nexgen32e/memrchr.S @@ -60,4 +60,4 @@ memrchr:.leafprologue lea (%rdi,%rcx),%rax 9: .leafepilogue .endfn memrchr,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memrchr16.S b/libc/nexgen32e/memrchr16.S index 8c4a66115..3f335abad 100644 --- a/libc/nexgen32e/memrchr16.S +++ b/libc/nexgen32e/memrchr16.S @@ -61,4 +61,4 @@ memrchr16: lea (%rdi,%rcx,2),%rax 9: .leafepilogue .endfn memrchr16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memrchr32.S b/libc/nexgen32e/memrchr32.S index ec4fab98b..cdc1da7da 100644 --- a/libc/nexgen32e/memrchr32.S +++ b/libc/nexgen32e/memrchr32.S @@ -61,4 +61,4 @@ wmemrchr: lea (%rdi,%rcx,4),%rax 9: .leafepilogue .endfn wmemrchr,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/memset.S b/libc/nexgen32e/memset.S index 6a09e40cc..93d90164b 100644 --- a/libc/nexgen32e/memset.S +++ b/libc/nexgen32e/memset.S @@ -24,7 +24,7 @@ #include "libc/nexgen32e/x86feature.h" #include "libc/nexgen32e/macros.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Sets memory. / diff --git a/libc/nexgen32e/mod1000000000int64.greg.S b/libc/nexgen32e/mod1000000000int64.greg.S index bff6febbd..40d6db8be 100644 --- a/libc/nexgen32e/mod1000000000int64.greg.S +++ b/libc/nexgen32e/mod1000000000int64.greg.S @@ -37,4 +37,4 @@ mod1000000000int64: mov %rdi,%rax ret .endfn mod1000000000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/mod1000000int64.greg.S b/libc/nexgen32e/mod1000000int64.greg.S index ec377cb57..c6ec7a191 100644 --- a/libc/nexgen32e/mod1000000int64.greg.S +++ b/libc/nexgen32e/mod1000000int64.greg.S @@ -33,4 +33,4 @@ mod1000000int64: mov %rdi,%rax ret .endfn mod1000000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/mod1000int64.greg.S b/libc/nexgen32e/mod1000int64.greg.S index 028e9fff8..2b6f38294 100644 --- a/libc/nexgen32e/mod1000int64.greg.S +++ b/libc/nexgen32e/mod1000int64.greg.S @@ -33,4 +33,4 @@ mod1000int64: mov %rdi,%rax ret .endfn mod1000int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/mod10int64.greg.S b/libc/nexgen32e/mod10int64.greg.S index e708efedb..14adfba35 100644 --- a/libc/nexgen32e/mod10int64.greg.S +++ b/libc/nexgen32e/mod10int64.greg.S @@ -34,4 +34,4 @@ mod10int64: mov %rdi,%rax ret .endfn mod10int64,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/nt2sysv.S b/libc/nexgen32e/nt2sysv.S index 449496e4a..a09f971db 100644 --- a/libc/nexgen32e/nt2sysv.S +++ b/libc/nexgen32e/nt2sysv.S @@ -54,4 +54,4 @@ nt2sysv:push %rbp leave ret .endfn nt2sysv,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/program_invocation_name.S b/libc/nexgen32e/program_invocation_name.S index 0fa36067e..dc5e7c6c5 100644 --- a/libc/nexgen32e/program_invocation_name.S +++ b/libc/nexgen32e/program_invocation_name.S @@ -30,4 +30,4 @@ program_invocation_name: mov (%r13),%rax stosq .init.end 300,_init_program_invocation_name - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/rldecode.S b/libc/nexgen32e/rldecode.S index 8bbb6c82a..2c7b4a090 100644 --- a/libc/nexgen32e/rldecode.S +++ b/libc/nexgen32e/rldecode.S @@ -38,4 +38,4 @@ rldecode: jmp 0b 2: .leafepilogue .endfn rldecode,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/savexmm.S b/libc/nexgen32e/savexmm.S index 0b1b48c1f..1da77e418 100644 --- a/libc/nexgen32e/savexmm.S +++ b/libc/nexgen32e/savexmm.S @@ -43,4 +43,4 @@ savexmm:.leafprologue movaps %xmm15,0x70(%rdi) .leafepilogue .endfn savexmm,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/setjmp.S b/libc/nexgen32e/setjmp.S index a74d693c4..5c184b9b5 100644 --- a/libc/nexgen32e/setjmp.S +++ b/libc/nexgen32e/setjmp.S @@ -40,4 +40,4 @@ setjmp: lea 8(%rsp),%rax xor %eax,%eax ret .endfn setjmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/sgetc.S b/libc/nexgen32e/sgetc.S index 7e8207bcd..e94fe1bd6 100644 --- a/libc/nexgen32e/sgetc.S +++ b/libc/nexgen32e/sgetc.S @@ -46,4 +46,4 @@ sgetc: push %bp pop %bp ret .endfn sgetc,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/slowcall.S b/libc/nexgen32e/slowcall.S index 79f4874c7..75dcd1ddc 100644 --- a/libc/nexgen32e/slowcall.S +++ b/libc/nexgen32e/slowcall.S @@ -82,4 +82,4 @@ slowcall: pop %rbp ret .endfn slowcall,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcasecmp.S b/libc/nexgen32e/strcasecmp.S index 60d5144fe..71aea71fa 100644 --- a/libc/nexgen32e/strcasecmp.S +++ b/libc/nexgen32e/strcasecmp.S @@ -63,4 +63,4 @@ strncasecmp: 4: pop %rbx .leafepilogue .endfn strncasecmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcasecmp16.S b/libc/nexgen32e/strcasecmp16.S index 7f217e49c..30c7dbc90 100644 --- a/libc/nexgen32e/strcasecmp16.S +++ b/libc/nexgen32e/strcasecmp16.S @@ -69,4 +69,4 @@ strncasecmp16: 4: pop %rbx .leafepilogue .endfn strncasecmp16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcaseconv.S b/libc/nexgen32e/strcaseconv.S index c1b57b85e..024a8cce6 100644 --- a/libc/nexgen32e/strcaseconv.S +++ b/libc/nexgen32e/strcaseconv.S @@ -85,4 +85,4 @@ strcaseconv: .endfn strcaseconv .endfn strtolower,globl .endfn strtoupper,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp-avx.S b/libc/nexgen32e/strcmp-avx.S index 45be9376b..ee19745e9 100644 --- a/libc/nexgen32e/strcmp-avx.S +++ b/libc/nexgen32e/strcmp-avx.S @@ -87,4 +87,4 @@ strncmp$avx: sub %ecx,%eax jmp 5b .endfn strncmp$avx,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp-hook.S b/libc/nexgen32e/strcmp-hook.S index 929628ee4..b19d68aec 100644 --- a/libc/nexgen32e/strcmp-hook.S +++ b/libc/nexgen32e/strcmp-hook.S @@ -46,4 +46,4 @@ hook$strcmp: #endif /* TINY */ stosq .init.end 300,_init_strcmp - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp.S b/libc/nexgen32e/strcmp.S index 78c1a6165..54c7f340b 100644 --- a/libc/nexgen32e/strcmp.S +++ b/libc/nexgen32e/strcmp.S @@ -28,4 +28,4 @@ / @asyncsignalsafe strcmp: jmp *hook$strcmp(%rip) .endfn strcmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp16-hook.S b/libc/nexgen32e/strcmp16-hook.S index edbec19d8..77b023b8a 100644 --- a/libc/nexgen32e/strcmp16-hook.S +++ b/libc/nexgen32e/strcmp16-hook.S @@ -36,4 +36,4 @@ hook$strcmp16: ezlea strcmp16$k8,ax stosq .init.end 300,_init_strcmp16 - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp16-k8.S b/libc/nexgen32e/strcmp16-k8.S index b9b6585d2..184f802a4 100644 --- a/libc/nexgen32e/strcmp16-k8.S +++ b/libc/nexgen32e/strcmp16-k8.S @@ -63,4 +63,4 @@ strncmp16$k8: pop %rbx .leafepilogue .endfn strncmp16$k8,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcmp16.S b/libc/nexgen32e/strcmp16.S index 1761dfd8b..7226542d4 100644 --- a/libc/nexgen32e/strcmp16.S +++ b/libc/nexgen32e/strcmp16.S @@ -30,4 +30,4 @@ strcmp16: jmp *hook$strcmp16(%rip) .endfn strcmp16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strcpyzbw.S b/libc/nexgen32e/strcpyzbw.S index 1eace1789..a99aaac4c 100644 --- a/libc/nexgen32e/strcpyzbw.S +++ b/libc/nexgen32e/strcpyzbw.S @@ -32,4 +32,4 @@ strcpyzbw: pop %rax .leafepilogue .endfn strcpyzbw,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strncmp-hook.S b/libc/nexgen32e/strncmp-hook.S index e18ae1bf3..f127ddd20 100644 --- a/libc/nexgen32e/strncmp-hook.S +++ b/libc/nexgen32e/strncmp-hook.S @@ -46,4 +46,4 @@ hook$strncmp: #endif /* TINY */ stosq .init.end 300,_init_strncmp - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strncmp.S b/libc/nexgen32e/strncmp.S index 0975aab5c..c7019315a 100644 --- a/libc/nexgen32e/strncmp.S +++ b/libc/nexgen32e/strncmp.S @@ -28,4 +28,4 @@ / @asyncsignalsafe strncmp:jmp *hook$strncmp(%rip) .endfn strncmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strncmp16-hook.S b/libc/nexgen32e/strncmp16-hook.S index b2afa34f5..901dddd26 100644 --- a/libc/nexgen32e/strncmp16-hook.S +++ b/libc/nexgen32e/strncmp16-hook.S @@ -36,4 +36,4 @@ hook$strncmp16: ezlea strncmp16$k8,ax stosq .init.end 300,_init_strncmp16 - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strncmp16.S b/libc/nexgen32e/strncmp16.S index fa9b31d5f..de5b06350 100644 --- a/libc/nexgen32e/strncmp16.S +++ b/libc/nexgen32e/strncmp16.S @@ -29,4 +29,4 @@ strncmp16: jmp *hook$strncmp16(%rip) .endfn strncmp16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strsak.S b/libc/nexgen32e/strsak.S index 411f4c6ce..330a70c2a 100644 --- a/libc/nexgen32e/strsak.S +++ b/libc/nexgen32e/strsak.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/nexgen32e/x86feature.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns pointer to first instance of character. / diff --git a/libc/nexgen32e/strsak16.S b/libc/nexgen32e/strsak16.S index 9e97d4c9e..33c95b8fd 100644 --- a/libc/nexgen32e/strsak16.S +++ b/libc/nexgen32e/strsak16.S @@ -183,4 +183,4 @@ strsak16: add %rcx,%rax jmp .Lword .endfn strsak16 - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strsak32.S b/libc/nexgen32e/strsak32.S index 255f43103..e10665fdc 100644 --- a/libc/nexgen32e/strsak32.S +++ b/libc/nexgen32e/strsak32.S @@ -179,4 +179,4 @@ wcssak: lea -4(%rdi),%rax .endfn wcslen,globl .endfn wcschr,globl .endfn wcschrnul,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strstr-sse42.S b/libc/nexgen32e/strstr-sse42.S index d2b423dc9..443dffd14 100644 --- a/libc/nexgen32e/strstr-sse42.S +++ b/libc/nexgen32e/strstr-sse42.S @@ -30,4 +30,4 @@ strstr$sse42: .strstr .Lequalordered .endfn strstr$sse42,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/strstr16-sse42.S b/libc/nexgen32e/strstr16-sse42.S index 1f7f6af32..e4c7d86df 100644 --- a/libc/nexgen32e/strstr16-sse42.S +++ b/libc/nexgen32e/strstr16-sse42.S @@ -30,4 +30,4 @@ strstr16$sse42: .strstr .Lequalorder16 .endfn strstr16$sse42,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/sysv2nt.S b/libc/nexgen32e/sysv2nt.S index 4c1370b1e..4535afc9e 100644 --- a/libc/nexgen32e/sysv2nt.S +++ b/libc/nexgen32e/sysv2nt.S @@ -60,4 +60,4 @@ __sysv2nt: .endfn __sysv2nt10,globl,hidden .endfn __sysv2nt12,globl,hidden .endfn __sysv2nt14,globl,hidden - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinydivsi.greg.S b/libc/nexgen32e/tinydivsi.greg.S index 36e0ea36d..0a3509e6c 100644 --- a/libc/nexgen32e/tinydivsi.greg.S +++ b/libc/nexgen32e/tinydivsi.greg.S @@ -35,4 +35,4 @@ tinydivsi: sub %rdi,%rax .leafepilogue .endfn tinydivsi,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinystrcmp.S b/libc/nexgen32e/tinystrcmp.S index 811170e62..2d59c0f3d 100644 --- a/libc/nexgen32e/tinystrcmp.S +++ b/libc/nexgen32e/tinystrcmp.S @@ -44,4 +44,4 @@ tinystrcmp: pop %rcx .leafepilogue .endfn tinystrcmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinystrlen.greg.S b/libc/nexgen32e/tinystrlen.greg.S index 7806a2718..cc0d92f8e 100644 --- a/libc/nexgen32e/tinystrlen.greg.S +++ b/libc/nexgen32e/tinystrlen.greg.S @@ -34,4 +34,4 @@ tinystrlen: jmp 1b 2: .leafepilogue .endfn tinystrlen,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinystrlen16.greg.S b/libc/nexgen32e/tinystrlen16.greg.S index f36059b40..e79aa8d96 100644 --- a/libc/nexgen32e/tinystrlen16.greg.S +++ b/libc/nexgen32e/tinystrlen16.greg.S @@ -34,4 +34,4 @@ tinystrlen16: jmp 1b 2: .leafepilogue .endfn tinystrlen16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinystrnlen.greg.S b/libc/nexgen32e/tinystrnlen.greg.S index 0ba37e9b8..250b228bf 100644 --- a/libc/nexgen32e/tinystrnlen.greg.S +++ b/libc/nexgen32e/tinystrnlen.greg.S @@ -37,4 +37,4 @@ tinystrnlen: jmp 1b 2: .leafepilogue .endfn tinystrnlen,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinystrnlen16.greg.S b/libc/nexgen32e/tinystrnlen16.greg.S index d75dbbd45..59c0aac25 100644 --- a/libc/nexgen32e/tinystrnlen16.greg.S +++ b/libc/nexgen32e/tinystrnlen16.greg.S @@ -37,4 +37,4 @@ tinystrnlen16: jmp 1b 2: .leafepilogue .endfn tinystrnlen16,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinywcslen.greg.S b/libc/nexgen32e/tinywcslen.greg.S index 483e25a31..fe02b3e9c 100644 --- a/libc/nexgen32e/tinywcslen.greg.S +++ b/libc/nexgen32e/tinywcslen.greg.S @@ -34,4 +34,4 @@ tinywcslen: jmp 1b 2: .leafepilogue .endfn tinywcslen,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tinywcsnlen.greg.S b/libc/nexgen32e/tinywcsnlen.greg.S index 58d35b199..88db2099e 100644 --- a/libc/nexgen32e/tinywcsnlen.greg.S +++ b/libc/nexgen32e/tinywcsnlen.greg.S @@ -37,4 +37,4 @@ tinywcsnlen: jmp 1b 2: .leafepilogue .endfn tinywcsnlen,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tolower.S b/libc/nexgen32e/tolower.S index f99d3cc17..878284334 100644 --- a/libc/nexgen32e/tolower.S +++ b/libc/nexgen32e/tolower.S @@ -28,4 +28,4 @@ tolower:.leafprologue movzbl (%rcx,%rax),%eax 1: .leafepilogue .endfn tolower,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/toupper.S b/libc/nexgen32e/toupper.S index 27ab4878b..f62db8abc 100644 --- a/libc/nexgen32e/toupper.S +++ b/libc/nexgen32e/toupper.S @@ -32,4 +32,4 @@ toupper:.leafprologue andn %edi,%eax,%eax # TODO(jart): FIX 1: .leafepilogue .endfn toupper,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/towlower.S b/libc/nexgen32e/towlower.S index c31d1068e..0f49ff2db 100644 --- a/libc/nexgen32e/towlower.S +++ b/libc/nexgen32e/towlower.S @@ -29,4 +29,4 @@ towlower: movzbl (%rcx,%rax),%eax 1: .leafepilogue .endfn towlower,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/towupper.S b/libc/nexgen32e/towupper.S index a265bfac7..7bd7cc396 100644 --- a/libc/nexgen32e/towupper.S +++ b/libc/nexgen32e/towupper.S @@ -33,4 +33,4 @@ towupper: andn %edi,%edx,%eax 1: .leafepilogue .endfn towupper,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/tzcnt.S b/libc/nexgen32e/tzcnt.S index c8210b74a..2f9ffef0d 100644 --- a/libc/nexgen32e/tzcnt.S +++ b/libc/nexgen32e/tzcnt.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Finds lowest set bit in 𝑥. / diff --git a/libc/nexgen32e/tzcntl.S b/libc/nexgen32e/tzcntl.S index bf45f2338..8c2f2b6e5 100644 --- a/libc/nexgen32e/tzcntl.S +++ b/libc/nexgen32e/tzcntl.S @@ -43,4 +43,4 @@ tzcntl: .leafprologue .leafepilogue .endfn tzcntl,globl .alias tzcntl,tzcntll - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/vcls.S b/libc/nexgen32e/vcls.S index f26dbbbb1..2b7ca8428 100644 --- a/libc/nexgen32e/vcls.S +++ b/libc/nexgen32e/vcls.S @@ -22,7 +22,7 @@ #include "libc/notice.inc" .real .code16 # ∩ .code32 ∩ .code64 -.yoink __FILE__ +.source __FILE__ / Clears display page. / diff --git a/libc/nexgen32e/wcscasecmp.S b/libc/nexgen32e/wcscasecmp.S index 7af30d1e8..1aee90e9d 100644 --- a/libc/nexgen32e/wcscasecmp.S +++ b/libc/nexgen32e/wcscasecmp.S @@ -71,4 +71,4 @@ wcsncasecmp: .leafepilogue .endfn wcsncasecmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/wcscmp-hook.S b/libc/nexgen32e/wcscmp-hook.S index b2121dbdd..d7aa0d333 100644 --- a/libc/nexgen32e/wcscmp-hook.S +++ b/libc/nexgen32e/wcscmp-hook.S @@ -31,4 +31,4 @@ hook$wcscmp: stosq .init.end 300,_init_wcscmp - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/wcscmp-k8.S b/libc/nexgen32e/wcscmp-k8.S index cd66e457f..6dfaf95c3 100644 --- a/libc/nexgen32e/wcscmp-k8.S +++ b/libc/nexgen32e/wcscmp-k8.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Compares NUL-terminated wchar_t strings. / diff --git a/libc/nexgen32e/wcscmp.S b/libc/nexgen32e/wcscmp.S index 3148954e6..5356237ae 100644 --- a/libc/nexgen32e/wcscmp.S +++ b/libc/nexgen32e/wcscmp.S @@ -28,4 +28,4 @@ / @note this stub is provided for abi compatibility wcscmp: jmp *hook$wcscmp(%rip) .endfn wcscmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/wcsncmp-hook.S b/libc/nexgen32e/wcsncmp-hook.S index 4b113c360..9b9f87bc8 100644 --- a/libc/nexgen32e/wcsncmp-hook.S +++ b/libc/nexgen32e/wcsncmp-hook.S @@ -30,4 +30,4 @@ hook$wcsncmp: ezlea wcsncmp$k8,ax stosq .init.end 300,_init_wcsncmp - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/wcsncmp.S b/libc/nexgen32e/wcsncmp.S index c17032104..9b4be2fc8 100644 --- a/libc/nexgen32e/wcsncmp.S +++ b/libc/nexgen32e/wcsncmp.S @@ -28,4 +28,4 @@ / @note this stub is provided for abi compatibility wcsncmp:jmp *hook$wcsncmp(%rip) .endfn wcsncmp,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/nexgen32e/xlm.S b/libc/nexgen32e/xlm.S index 5c8120041..a5e345add 100644 --- a/libc/nexgen32e/xlm.S +++ b/libc/nexgen32e/xlm.S @@ -30,4 +30,4 @@ __xlm: .rept XLM_SIZE .endr .endobj __xlm,globl,hidden .previous - .yoink __FILE__ + .source __FILE__ diff --git a/libc/notice.inc b/libc/notice.inc index 4ed331516..d57e8e919 100644 --- a/libc/notice.inc +++ b/libc/notice.inc @@ -1,4 +1,4 @@ -.ident "\n\ +.ident "\n\ Cosmopolitan\n\ Copyright 2020 Justine Alexandra Roberts Tunney\n\ \n\ diff --git a/libc/nt/ntdllimport.S b/libc/nt/ntdllimport.S index a8e5c632c..efc15b968 100644 --- a/libc/nt/ntdllimport.S +++ b/libc/nt/ntdllimport.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/nt/enum/status.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / @fileoverview NTDLL.DLL Non-Mandatory Importer / diff --git a/libc/rand/g_rando.S b/libc/rand/g_rando.S index 2e6e728d8..737245254 100644 --- a/libc/rand/g_rando.S +++ b/libc/rand/g_rando.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ .bss .align 8 diff --git a/libc/runtime/_exit.S b/libc/runtime/_exit.S index bd5f47237..0ace68019 100644 --- a/libc/runtime/_exit.S +++ b/libc/runtime/_exit.S @@ -21,7 +21,7 @@ #include "libc/runtime/internal.h" #include "libc/macros.h" .privileged -.yoink __FILE__ +.source __FILE__ / Terminates process, ignoring destructors and atexit() handlers. / diff --git a/libc/runtime/abort.S b/libc/runtime/abort.S index 2528abeca..006c0cc01 100644 --- a/libc/runtime/abort.S +++ b/libc/runtime/abort.S @@ -23,7 +23,7 @@ #include "libc/sysv/consts/nr.h" #include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ / Terminates program abnormally. / diff --git a/libc/runtime/cxaatexit.S b/libc/runtime/cxaatexit.S index d2108fd38..003646b74 100644 --- a/libc/runtime/cxaatexit.S +++ b/libc/runtime/cxaatexit.S @@ -20,7 +20,7 @@ #include "ape/relocations.h" #include "libc/macros.h" .section .text.exit,"ax",@progbits -.yoink __FILE__ +.source __FILE__ / Delegates to __cxa_atexit(). / diff --git a/libc/runtime/dsohandle.S b/libc/runtime/dsohandle.S index 0f8394c78..e59c53429 100644 --- a/libc/runtime/dsohandle.S +++ b/libc/runtime/dsohandle.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ / Uniquely identifies each artifact linked in an address space. __dso_handle: diff --git a/libc/runtime/fastmath.S b/libc/runtime/fastmath.S index 7809d2286..7da5cfcac 100644 --- a/libc/runtime/fastmath.S +++ b/libc/runtime/fastmath.S @@ -20,7 +20,7 @@ #include "libc/macros.h" #include "libc/notice.inc" .text.startup -.yoink __FILE__ +.source __FILE__ / Intel Manual V.1 §10.2.3 - MXCSR Control and Status Register #define MXCSR_DE (1 << 1) /* Denormal Flag */ diff --git a/libc/runtime/fpreset.S b/libc/runtime/fpreset.S index 7b7c8f455..a2f30e51e 100644 --- a/libc/runtime/fpreset.S +++ b/libc/runtime/fpreset.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Re-initializes FPU. fpreset: diff --git a/libc/runtime/g_argc.S b/libc/runtime/g_argc.S index 924da7bec..25552f502 100644 --- a/libc/runtime/g_argc.S +++ b/libc/runtime/g_argc.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .initbss 300,_init_g_argc g_argc: .quad 0 diff --git a/libc/runtime/getdosargv.c b/libc/runtime/getdosargv.c index c49834006..1ec8a435d 100644 --- a/libc/runtime/getdosargv.c +++ b/libc/runtime/getdosargv.c @@ -23,11 +23,12 @@ #include "libc/runtime/internal.h" #include "libc/str/appendchar.h" #include "libc/str/str.h" +#include "libc/str/tpenc.h" /* TODO(jart): Make early-stage data structures happen. */ #undef isspace #undef iswspace -#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r') +#define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\r') #define iswspace(c) isspace(c) struct DosArgv { @@ -37,14 +38,12 @@ struct DosArgv { wint_t wc; }; -static textwindows void decodedosargv(struct DosArgv *st) { +static inline textwindows void decodedosargv(struct DosArgv *st) { st->s += getutf16(st->s, &st->wc); } -static textwindows void appenddosargv(struct DosArgv *st, wint_t wc) { - if (st->p < st->pe) { - st->p += tpencode(st->p, st->pe - st->p, wc, false); - } +static inline textwindows void appenddosargv(struct DosArgv *st, wint_t wc) { + AppendChar(&st->p, st->pe, wc); } /** diff --git a/libc/runtime/getpagesize.S b/libc/runtime/getpagesize.S index f7c801f7d..20b672caa 100644 --- a/libc/runtime/getpagesize.S +++ b/libc/runtime/getpagesize.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns granularity of memory manager. getpagesize: diff --git a/libc/runtime/init.S b/libc/runtime/init.S index 14673e0eb..8f41754c7 100644 --- a/libc/runtime/init.S +++ b/libc/runtime/init.S @@ -21,7 +21,7 @@ #include "libc/runtime/internal.h" #include "libc/sysv/consts/prot.h" #include "libc/dce.h" -.yoink __FILE__ +.source __FILE__ / Decentralized function for process initialization. / diff --git a/libc/runtime/kntsystemdirectory.S b/libc/runtime/kntsystemdirectory.S index 0a4850a84..fdbc1a682 100644 --- a/libc/runtime/kntsystemdirectory.S +++ b/libc/runtime/kntsystemdirectory.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ #define BYTES 64 diff --git a/libc/runtime/kntwindowsdirectory.S b/libc/runtime/kntwindowsdirectory.S index 567c7aad6..d7b364631 100644 --- a/libc/runtime/kntwindowsdirectory.S +++ b/libc/runtime/kntwindowsdirectory.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ #define BYTES 64 diff --git a/libc/runtime/mapanon-thunk.S b/libc/runtime/mapanon-thunk.S index 3b553d6cc..fa43daf94 100644 --- a/libc/runtime/mapanon-thunk.S +++ b/libc/runtime/mapanon-thunk.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ mapanon:push %rbp mov %rsp,%rbp diff --git a/libc/runtime/mergepages.S b/libc/runtime/mergepages.S index 6315b402f..aff5fdbc8 100644 --- a/libc/runtime/mergepages.S +++ b/libc/runtime/mergepages.S @@ -22,7 +22,7 @@ #include "libc/sysv/consts/nr.h" #include "libc/macros.h" .text.startup -.yoink __FILE__ +.source __FILE__ / Merges page table entries for pages with identical content. / diff --git a/libc/runtime/munmap-thunk.S b/libc/runtime/munmap-thunk.S index 5b9b5ce00..484c5cdd6 100644 --- a/libc/runtime/munmap-thunk.S +++ b/libc/runtime/munmap-thunk.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ munmap: push %rbp mov %rsp,%rbp diff --git a/libc/runtime/peekall.S b/libc/runtime/peekall.S index 2aedba12c..f29db1759 100644 --- a/libc/runtime/peekall.S +++ b/libc/runtime/peekall.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/relocations.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Loads all pages from program image into memory. peekall:.leafprologue diff --git a/libc/runtime/progname.S b/libc/runtime/progname.S index b13d9faf7..10ca93589 100644 --- a/libc/runtime/progname.S +++ b/libc/runtime/progname.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Provides argv[0] The BSD Way. .initbss 300,_init___progname diff --git a/libc/runtime/program_invocation_short_name.S b/libc/runtime/program_invocation_short_name.S index 9c59b9d5d..eae3d5974 100644 --- a/libc/runtime/program_invocation_short_name.S +++ b/libc/runtime/program_invocation_short_name.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Supplies basename(argv[0]) The GNU Way. .initbss 400,_init_program_invocation_short_name diff --git a/libc/runtime/startmain.S b/libc/runtime/startmain.S index 7571e4539..c325bb781 100644 --- a/libc/runtime/startmain.S +++ b/libc/runtime/startmain.S @@ -26,7 +26,7 @@ #include "libc/runtime/mappings.h" #include "libc/sysv/consts/prot.h" .text.startup -.yoink __FILE__ +.source __FILE__ / Cosmopolitan process entrypoint. / diff --git a/libc/runtime/weakfree.S b/libc/runtime/weakfree.S index 5c4a33193..7cc54a238 100644 --- a/libc/runtime/weakfree.S +++ b/libc/runtime/weakfree.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Thunks free() if it's linked, otherwise do nothing. / diff --git a/libc/stdio/fputwc.c b/libc/stdio/fputwc.c index 7c99f6b63..10a1680e2 100644 --- a/libc/stdio/fputwc.c +++ b/libc/stdio/fputwc.c @@ -22,6 +22,7 @@ #include "libc/stdio/internal.h" #include "libc/stdio/stdio.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" /** * Writes wide character to stream. @@ -29,8 +30,8 @@ * @return wc if written or -1 w/ errno */ wint_t fputwc(wchar_t wc, FILE *f) { + unsigned i, len; char buf[MB_LEN_MAX]; - unsigned len, i; if (wc != -1) { len = tpencode(buf, sizeof(buf), wc, false); for (i = 0; i < len; ++i) { diff --git a/libc/stdio/fseeko.S b/libc/stdio/fseeko.S index 379bad7ad..791081db8 100644 --- a/libc/stdio/fseeko.S +++ b/libc/stdio/fseeko.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fseeko: jmp fseek .endfn fseeko,globl diff --git a/libc/stdio/ftello.S b/libc/stdio/ftello.S index 83e511ac6..dd4419a43 100644 --- a/libc/stdio/ftello.S +++ b/libc/stdio/ftello.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ ftello: jmp ftell .endfn ftello,globl diff --git a/libc/stdio/g_stderr_init.S b/libc/stdio/g_stderr_init.S index da4b5143d..eece4a8a0 100644 --- a/libc/stdio/g_stderr_init.S +++ b/libc/stdio/g_stderr_init.S @@ -22,7 +22,7 @@ #include "libc/calls/calls.h" #include "libc/sysv/consts/fileno.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 400,_init_g_stderr lea g_stderr(%rip),%rax diff --git a/libc/stdio/g_stdin_init.S b/libc/stdio/g_stdin_init.S index 901c7deb2..db99ad29a 100644 --- a/libc/stdio/g_stdin_init.S +++ b/libc/stdio/g_stdin_init.S @@ -22,7 +22,7 @@ #include "libc/calls/calls.h" #include "libc/sysv/consts/fileno.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 400,_init_g_stdin lea g_stdin(%rip),%rax diff --git a/libc/stdio/g_stdout_init.S b/libc/stdio/g_stdout_init.S index 1a51909f1..89a753bfd 100644 --- a/libc/stdio/g_stdout_init.S +++ b/libc/stdio/g_stdout_init.S @@ -22,7 +22,7 @@ #include "libc/calls/calls.h" #include "libc/sysv/consts/fileno.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .init.start 400,_init_g_stdout lea g_stdout(%rip),%rax diff --git a/libc/stdio/getc.S b/libc/stdio/getc.S index ef8bb3f39..2b81a6689 100644 --- a/libc/stdio/getc.S +++ b/libc/stdio/getc.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" #include "libc/notice.inc" -.yoink __FILE__ +.source __FILE__ getc: jmp fgetc .endfn getc,globl diff --git a/libc/stdio/getchar.S b/libc/stdio/getchar.S index 504d20d21..448363abb 100644 --- a/libc/stdio/getchar.S +++ b/libc/stdio/getchar.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Reads uint8_t from standard input. / @return %al has result w/ rest of %rax cleared diff --git a/libc/stdio/getwc.S b/libc/stdio/getwc.S index 94ed4346a..9140b9658 100644 --- a/libc/stdio/getwc.S +++ b/libc/stdio/getwc.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ getwc: jmp fgetwc .endfn getwc,globl diff --git a/libc/stdio/getwchar.S b/libc/stdio/getwchar.S index e9d9e6f47..6a07c7494 100644 --- a/libc/stdio/getwchar.S +++ b/libc/stdio/getwchar.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Reads Thompson-Pike encoded varint from standard input. / @return %eax has result w/ rest of %rax cleared diff --git a/libc/stdio/putc.S b/libc/stdio/putc.S index dd32608d5..42d1456b0 100644 --- a/libc/stdio/putc.S +++ b/libc/stdio/putc.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ putc: jmp fputc .endfn putc,globl diff --git a/libc/stdio/putwc.S b/libc/stdio/putwc.S index 5611de50d..7ea4c832b 100644 --- a/libc/stdio/putwc.S +++ b/libc/stdio/putwc.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ / Writes wide character to stream. / @param %edi is the wide character diff --git a/libc/stdio/unlocked/clearerr_unlocked.S b/libc/stdio/unlocked/clearerr_unlocked.S index c93e8e68f..1381b79b5 100644 --- a/libc/stdio/unlocked/clearerr_unlocked.S +++ b/libc/stdio/unlocked/clearerr_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ clearerr_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/feof_unlocked.S b/libc/stdio/unlocked/feof_unlocked.S index 61402fb2e..b707c1c41 100644 --- a/libc/stdio/unlocked/feof_unlocked.S +++ b/libc/stdio/unlocked/feof_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ feof_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/ferror_unlocked.S b/libc/stdio/unlocked/ferror_unlocked.S index d620a0c3a..0b702e03f 100644 --- a/libc/stdio/unlocked/ferror_unlocked.S +++ b/libc/stdio/unlocked/ferror_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ ferror_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fflush_unlocked.S b/libc/stdio/unlocked/fflush_unlocked.S index 1d026b515..574c0e657 100644 --- a/libc/stdio/unlocked/fflush_unlocked.S +++ b/libc/stdio/unlocked/fflush_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fflush_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fgetc_unlocked.S b/libc/stdio/unlocked/fgetc_unlocked.S index dde34fbc5..e9b7cccf6 100644 --- a/libc/stdio/unlocked/fgetc_unlocked.S +++ b/libc/stdio/unlocked/fgetc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fgetc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fgets_unlocked.S b/libc/stdio/unlocked/fgets_unlocked.S index 03b145485..d995c0e51 100644 --- a/libc/stdio/unlocked/fgets_unlocked.S +++ b/libc/stdio/unlocked/fgets_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fgets_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fgetwc_unlocked.S b/libc/stdio/unlocked/fgetwc_unlocked.S index d7a682aa6..c5523c82e 100644 --- a/libc/stdio/unlocked/fgetwc_unlocked.S +++ b/libc/stdio/unlocked/fgetwc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fgetwc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fgetws_unlocked.S b/libc/stdio/unlocked/fgetws_unlocked.S index 83d589d5a..de10b5789 100644 --- a/libc/stdio/unlocked/fgetws_unlocked.S +++ b/libc/stdio/unlocked/fgetws_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fgetws_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fileno_unlocked.S b/libc/stdio/unlocked/fileno_unlocked.S index 1653507dc..619b3ee07 100644 --- a/libc/stdio/unlocked/fileno_unlocked.S +++ b/libc/stdio/unlocked/fileno_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fileno_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fputc_unlocked.S b/libc/stdio/unlocked/fputc_unlocked.S index f077d0baf..fa5d3c93a 100644 --- a/libc/stdio/unlocked/fputc_unlocked.S +++ b/libc/stdio/unlocked/fputc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fputc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fputs_unlocked.S b/libc/stdio/unlocked/fputs_unlocked.S index 260d907ce..84dd51f90 100644 --- a/libc/stdio/unlocked/fputs_unlocked.S +++ b/libc/stdio/unlocked/fputs_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fputs_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fputwc_unlocked.S b/libc/stdio/unlocked/fputwc_unlocked.S index f53c4fa69..0e6dcd82f 100644 --- a/libc/stdio/unlocked/fputwc_unlocked.S +++ b/libc/stdio/unlocked/fputwc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fputwc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fputws_unlocked.S b/libc/stdio/unlocked/fputws_unlocked.S index 03ba73df7..55b1dee2f 100644 --- a/libc/stdio/unlocked/fputws_unlocked.S +++ b/libc/stdio/unlocked/fputws_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fputws_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fread_unlocked.S b/libc/stdio/unlocked/fread_unlocked.S index c1914067b..dc68d7c13 100644 --- a/libc/stdio/unlocked/fread_unlocked.S +++ b/libc/stdio/unlocked/fread_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fread_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/fwrite_unlocked.S b/libc/stdio/unlocked/fwrite_unlocked.S index 8101b4f7e..7e77e8dd3 100644 --- a/libc/stdio/unlocked/fwrite_unlocked.S +++ b/libc/stdio/unlocked/fwrite_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fwrite_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/getc_unlocked.S b/libc/stdio/unlocked/getc_unlocked.S index 0c3afcf6e..c3fce1b55 100644 --- a/libc/stdio/unlocked/getc_unlocked.S +++ b/libc/stdio/unlocked/getc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ getc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/getchar_unlocked.S b/libc/stdio/unlocked/getchar_unlocked.S index 2c28604a6..2a85f4e6d 100644 --- a/libc/stdio/unlocked/getchar_unlocked.S +++ b/libc/stdio/unlocked/getchar_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ getchar_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/getwc_unlocked.S b/libc/stdio/unlocked/getwc_unlocked.S index 1aa735fb1..657b66253 100644 --- a/libc/stdio/unlocked/getwc_unlocked.S +++ b/libc/stdio/unlocked/getwc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ getwc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/getwchar_unlocked.S b/libc/stdio/unlocked/getwchar_unlocked.S index 05b9a9eea..4faff4481 100644 --- a/libc/stdio/unlocked/getwchar_unlocked.S +++ b/libc/stdio/unlocked/getwchar_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ getwchar_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/putc_unlocked.S b/libc/stdio/unlocked/putc_unlocked.S index 4ea2e5ddd..8d65422e7 100644 --- a/libc/stdio/unlocked/putc_unlocked.S +++ b/libc/stdio/unlocked/putc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ putc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/putchar_unlocked.S b/libc/stdio/unlocked/putchar_unlocked.S index ba62c3dbf..dbafa6219 100644 --- a/libc/stdio/unlocked/putchar_unlocked.S +++ b/libc/stdio/unlocked/putchar_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ putchar_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/putwc_unlocked.S b/libc/stdio/unlocked/putwc_unlocked.S index ab5f4daad..29f0d8540 100644 --- a/libc/stdio/unlocked/putwc_unlocked.S +++ b/libc/stdio/unlocked/putwc_unlocked.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ putwc_unlocked: .leafprologue diff --git a/libc/stdio/unlocked/putwchar_unlocked.S b/libc/stdio/unlocked/putwchar_unlocked.S index 46a5d5eaf..32d6d2801 100644 --- a/libc/stdio/unlocked/putwchar_unlocked.S +++ b/libc/stdio/unlocked/putwchar_unlocked.S @@ -19,7 +19,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ putwchar_unlocked: .leafprologue diff --git a/libc/str/appendchar.h b/libc/str/appendchar.h index cec840c44..cc39c9432 100644 --- a/libc/str/appendchar.h +++ b/libc/str/appendchar.h @@ -1,10 +1,17 @@ #ifndef COSMOPOLITAN_LIBC_RUNTIME_APPENDCHAR_H_ #define COSMOPOLITAN_LIBC_RUNTIME_APPENDCHAR_H_ #include "libc/str/str.h" +#include "libc/str/tpenc.h" +#include "libc/str/tpencode.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) -forceinline void AppendChar(char **p, char *pe, wint_t c) { - if (*p < pe) *p += tpencode(*p, pe - *p, c, false); +static inline void AppendChar(char **p, char *pe, wint_t wc) { + uint64_t w; + w = tpenc(wc); + do { + if (*p >= pe) break; + *(*p)++ = w & 0xff; + } while (w >>= 8); } #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ diff --git a/libc/str/ktpdecoderring.S b/libc/str/ktpdecoderring.S index 3101d3b7c..0731e76f9 100644 --- a/libc/str/ktpdecoderring.S +++ b/libc/str/ktpdecoderring.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Thompson-Pike Decoder Ring. / diff --git a/libc/str/mbtowc.c b/libc/str/mbtowc.c index 31c778a4b..658c60052 100644 --- a/libc/str/mbtowc.c +++ b/libc/str/mbtowc.c @@ -20,6 +20,7 @@ #include "libc/limits.h" #include "libc/macros.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" compatfn int mbtowc(wchar_t *wc, const char *s, size_t n) { if (!s) return 0; diff --git a/libc/str/rindex.S b/libc/str/rindex.S index 8a33ce9e0..8c9bdb910 100644 --- a/libc/str/rindex.S +++ b/libc/str/rindex.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns pointer to last instance of character the BSD way. / diff --git a/libc/str/str.h b/libc/str/str.h index 8616f474e..c6e080f59 100644 --- a/libc/str/str.h +++ b/libc/str/str.h @@ -68,9 +68,6 @@ void *isnotplaintext(const void *, size_t) nothrow nocallback nosideeffect; #define UTF16_MOAR 0b1101100000000000 /* 0xD800..0xDBFF */ #define UTF16_CONT 0b1101110000000000 /* 0xDC00..0xDBFF */ -unsigned tpencode(char *buf, size_t size, wint_t c, bool32 awesome) - paramsnonnull() libcesque; -int tpdecode(const char *s, wint_t *out) paramsnonnull((1)) libcesque; unsigned getutf16(const char16_t *p, wint_t *wc); int pututf16(char16_t *s, size_t size, wint_t wc, bool awesome); int iswalnum(wint_t); @@ -532,45 +529,11 @@ extern int (*const hook$wcsncmp)(const wchar_t *, const wchar_t *, size_t); __builtin_strlen(s), _strlen(s)) #endif /* C11+ */ -#define tpencode(BUF, SIZE, CH, AWESOME) __tpencode(BUF, SIZE, CH, AWESOME) #define pututf16(BUF, SIZE, CH, AWESOME) __pututf16(BUF, SIZE, CH, AWESOME) #define getutf16(BUF, CHPTR) __getutf16(BUF, CHPTR) -#define tpdecode(S, OUT) __tpdecode(S, OUT) size_t _strlen(const char *s) asm("strlen") strlenesque; char *_strchr(const char *, int) asm("strchr") strlenesque; void *_memchr(const void *, int, size_t) asm("memchr") strlenesque; -forceinline unsigned __tpencode(char *s, size_t size, wint_t wc, - bool32 awesome) { - unsigned char *p = (unsigned char *)s; - if (size >= 1 && (0x00 <= wc && wc <= 0x7f)) { - if (wc >= 32 || !awesome) { - p[0] = (unsigned char)wc; - return 1; - } else if (size >= 2) { - p[0] = 0xc0; - p[1] = 0x80 | (unsigned char)wc; - return 2; - } - } - unsigned ax; - asm("call\ttpencode" - : "=a"(ax), "=m"(*(char(*)[size])s) - : "D"(s), "S"(size), "d"(wc) - : "cc"); - return ax; -} -forceinline int __tpdecode(const char *s, wint_t *out) { - if (0 <= *s && *s <= 0x7f) { - *out = *s; - return 1; - } - int ax; - asm("call\ttpdecode" - : "=a"(ax), "=m"(*(char(*)[6])s) - : "D"(s), "S"(out) - : "cc"); - return ax; -} forceinline int __pututf16(char16_t *s, size_t size, wint_t wc, bool32 awesome) { if (size >= 1 && (0x00 <= wc && wc <= 0xD7FF)) { diff --git a/libc/str/strcmp8to16i.h b/libc/str/strcmp8to16i.h index 279910abb..3f158fc8b 100644 --- a/libc/str/strcmp8to16i.h +++ b/libc/str/strcmp8to16i.h @@ -2,6 +2,7 @@ #define COSMOPOLITAN_LIBC_STR_STRCMP8TO16I_H_ #include "libc/conv/conv.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #if !(__ASSEMBLER__ + __LINKER__ + 0) COSMOPOLITAN_C_START_ diff --git a/libc/str/tpdecode.h b/libc/str/tpdecode.h new file mode 100644 index 000000000..bbeff3a53 --- /dev/null +++ b/libc/str/tpdecode.h @@ -0,0 +1,26 @@ +#ifndef COSMOPOLITAN_LIBC_STR_TPDECODE_H_ +#define COSMOPOLITAN_LIBC_STR_TPDECODE_H_ +#if !(__ASSEMBLER__ + __LINKER__ + 0) +COSMOPOLITAN_C_START_ + +int tpdecode(const char *, wint_t *) paramsnonnull((1)) libcesque; + +#ifndef __STRICT_ANSI__ +#define tpdecode(S, OUT) __tpdecode(S, OUT) +forceinline int __tpdecode(const char *s, wint_t *out) { + if (0 <= *s && *s <= 0x7f) { + *out = *s; + return 1; + } + int ax; + asm("call\ttpdecode" + : "=a"(ax), "=m"(*(char(*)[6])s) + : "D"(s), "S"(out) + : "cc"); + return ax; +} +#endif + +COSMOPOLITAN_C_END_ +#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ +#endif /* COSMOPOLITAN_LIBC_STR_TPDECODE_H_ */ diff --git a/libc/str/tpdecode.ncabi.c b/libc/str/tpdecode.ncabi.c index ab5a3d0c5..ea8fd7df0 100644 --- a/libc/str/tpdecode.ncabi.c +++ b/libc/str/tpdecode.ncabi.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/errno.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/str/tpdecodecb.h" forceinline int getbyte(void *arg, uint32_t i) { diff --git a/libc/str/tpenc.S b/libc/str/tpenc.S index 0bfc5c7c0..414e12cd5 100644 --- a/libc/str/tpenc.S +++ b/libc/str/tpenc.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Encodes Thompson-Pike varint. / diff --git a/libc/str/tpenc.h b/libc/str/tpenc.h index 5fd0a220d..9cc5d26a2 100644 --- a/libc/str/tpenc.h +++ b/libc/str/tpenc.h @@ -4,19 +4,20 @@ COSMOPOLITAN_C_START_ uint64_t tpenc(int32_t) pureconst; -uint64_t tpenc2(int32_t) pureconst; -#define tpenc(CODE) \ - ({ \ - unsigned long Buf; \ - int Di, Code = (CODE); \ - if (0 <= Code && Code <= 127) { \ - Buf = Code; \ - } else { \ - asm("call\ttpenc" : "=a"(Buf), "=D"(Di) : "1"(CODE) : "cc"); \ - } \ - Buf; \ +#ifndef __STRICT_ANSI__ +#define tpenc(CODE) \ + ({ \ + long Buf; \ + int32_t Code = (CODE); \ + if (0 <= Code && Code <= 127) { \ + Buf = Code; \ + } else { \ + asm("call\ttpenc" : "=a"(Buf), "+D"(Code) : /* inputs */ : "cc"); \ + } \ + Buf; \ }) +#endif COSMOPOLITAN_C_END_ #endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ diff --git a/libc/str/tpencode.h b/libc/str/tpencode.h new file mode 100644 index 000000000..32550739a --- /dev/null +++ b/libc/str/tpencode.h @@ -0,0 +1,29 @@ +#ifndef COSMOPOLITAN_LIBC_STR_TPENCODE_H_ +#define COSMOPOLITAN_LIBC_STR_TPENCODE_H_ +#if !(__ASSEMBLER__ + __LINKER__ + 0) +COSMOPOLITAN_C_START_ + +unsigned tpencode(char *, size_t, wint_t, bool32) paramsnonnull() libcesque; + +#ifndef __STRICT_ANSI__ +#define tpencode(...) __tpencode(__VA_ARGS__) +forceinline unsigned __tpencode(char *p, size_t size, wint_t wc, + bool32 awesome) { + if (size >= 1 && (0x00 <= wc && wc <= 0x7f)) { + if (wc >= 32 || !awesome) { + p[0] = wc; + return 1; + } else if (size >= 2) { + p[0] = 0xc0; + p[1] = 0x80; + p[1] |= wc; + return 2; + } + } + return (tpencode)(p, size, wc, awesome); +} +#endif + +COSMOPOLITAN_C_END_ +#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */ +#endif /* COSMOPOLITAN_LIBC_STR_TPENCODE_H_ */ diff --git a/libc/str/tpencode.ncabi.c b/libc/str/tpencode.ncabi.c index 6d236dc45..30a7772a7 100644 --- a/libc/str/tpencode.ncabi.c +++ b/libc/str/tpencode.ncabi.c @@ -18,7 +18,8 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/str/internal.h" -#include "libc/str/str.h" +#include "libc/str/tpenc.h" +#include "libc/str/tpencode.h" /** * Thompson-Pike Varint Encoder. @@ -27,29 +28,27 @@ * is only called for non-ASCII, or DCE'd entirely. In addition to that * this function makes a promise to not clobber any registers but %rax. * - * @param buf is what ch gets encoded to + * @param p is what ch gets encoded to * @param size is the number of bytes available in buf * @param ch is a 32-bit integer * @param awesome mode enables numbers the IETF unilaterally banned * @return number of bytes written * @note this encoding was designed on a napkin in a new jersey diner */ -unsigned(tpencode)(char *buf, size_t size, wint_t ch, bool32 awesome) { - unsigned char *p = (unsigned char *)buf; - if ((0 <= ch && ch < 32) && awesome && size >= 2) { +unsigned(tpencode)(char *p, size_t size, wint_t wc, bool32 awesome) { + int i, j; + unsigned long w; + if ((0 <= wc && wc < 32) && awesome && size >= 2) { p[0] = 0xc0; - p[1] = 0x80 | (unsigned char)ch; + p[1] = 0x80; + p[1] |= wc; return 2; } - struct TpEncode op = UseTpDecoderRing(ch); - size_t i = op.len; - if (op.len <= size) { - for (;;) { - p[--i] = (unsigned char)(0b10000000 | (ch & 0b00111111)); - if (!i) break; - ch >>= 6; - } - p[0] = op.mark | (unsigned char)ch; - } - return op.len; + i = 0; + w = tpenc(wc); + do { + if (!size--) break; + p[i++] = w & 0xff; + } while (w >>= 8); + return i; } diff --git a/libc/str/tprecode16to8.c b/libc/str/tprecode16to8.c index a1380af45..30070a564 100644 --- a/libc/str/tprecode16to8.c +++ b/libc/str/tprecode16to8.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/conv/conv.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" /** * Transcodes UTF-16 to UTF-8. diff --git a/libc/str/tprecode8to16.c b/libc/str/tprecode8to16.c index 994065681..3418898f1 100644 --- a/libc/str/tprecode8to16.c +++ b/libc/str/tprecode8to16.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/conv/conv.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" /** * Transcodes UTF-8 to UTF-16. diff --git a/libc/str/wcrtomb.c b/libc/str/wcrtomb.c index 564ef2676..733bb503b 100644 --- a/libc/str/wcrtomb.c +++ b/libc/str/wcrtomb.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" size_t wcrtomb(char *s, wchar_t wc, mbstate_t *st) { if (!s) return 1; diff --git a/libc/str/wcsrtombs.c b/libc/str/wcsrtombs.c index 1f256e76c..fc17c9f0a 100644 --- a/libc/str/wcsrtombs.c +++ b/libc/str/wcsrtombs.c @@ -19,10 +19,13 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/conv/conv.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" size_t wcsrtombs(char *dest, const wchar_t **src, size_t len, mbstate_t *ps) { - /* TODO(jart): broken broken broken insane api */ - size_t i = 0; + /* TODO(jart): broken */ + int64_t word; + size_t i, got; + i = 0; if (len) { for (;;) { if (!**src || len == 1) { diff --git a/libc/str/wctomb.c b/libc/str/wctomb.c index 2cb8d1fd3..d46d6a43f 100644 --- a/libc/str/wctomb.c +++ b/libc/str/wctomb.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/limits.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" int wctomb(char *s, wchar_t wc) { if (!s) return 0; diff --git a/libc/stubs/abort.S b/libc/stubs/abort.S index 6f1864351..b37e1d333 100644 --- a/libc/stubs/abort.S +++ b/libc/stubs/abort.S @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/macros.h" .real +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Most basic tier of program self-termination. @@ -29,4 +30,3 @@ abort: push %bp rlcall panic int3 .endfn abort,weak,protected - .yoink __FILE__ diff --git a/libc/stubs/addvdi3.S b/libc/stubs/addvdi3.S index d36f369d5..054c28f8e 100644 --- a/libc/stubs/addvdi3.S +++ b/libc/stubs/addvdi3.S @@ -20,6 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely +.source __FILE__ / Returns 𝑥+𝑦, aborting on overflow. / @@ -38,4 +39,3 @@ __addvdi3: pop %rbp ret .endfn __addvdi3,globl - .yoink __FILE__ diff --git a/libc/stubs/addvsi3.S b/libc/stubs/addvsi3.S index 1a639e8a5..018c4f276 100644 --- a/libc/stubs/addvsi3.S +++ b/libc/stubs/addvsi3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥+𝑦, aborting on overflow. / diff --git a/libc/stubs/addvti3.S b/libc/stubs/addvti3.S index 474d234e4..877177666 100644 --- a/libc/stubs/addvti3.S +++ b/libc/stubs/addvti3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥+𝑦, aborting on overflow. / diff --git a/libc/stubs/asan.greg.S b/libc/stubs/asan.greg.S index 904bcde8c..386ffffc1 100644 --- a/libc/stubs/asan.greg.S +++ b/libc/stubs/asan.greg.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ __asan_addr_is_in_fake_stack: __asan_alloca_poison: diff --git a/libc/stubs/asanjmp.greg.S b/libc/stubs/asanjmp.greg.S index e4de81ef9..9f86c982b 100644 --- a/libc/stubs/asanjmp.greg.S +++ b/libc/stubs/asanjmp.greg.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .privileged -.yoink __FILE__ +.source __FILE__ __asan_load1: push $1 diff --git a/libc/stubs/assertfail.S b/libc/stubs/assertfail.S index 1fe7fc343..b9edea968 100644 --- a/libc/stubs/assertfail.S +++ b/libc/stubs/assertfail.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Lightweight universal overridable assert() macro support. diff --git a/libc/stubs/cxapurevirtual.S b/libc/stubs/cxapurevirtual.S index 50441671f..fd939feaf 100644 --- a/libc/stubs/cxapurevirtual.S +++ b/libc/stubs/cxapurevirtual.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Did you call a virtual method from a destructor? __cxa_pure_virtual: diff --git a/libc/stubs/debugbreak.S b/libc/stubs/debugbreak.S index 0ef274fb1..f27dec5b4 100644 --- a/libc/stubs/debugbreak.S +++ b/libc/stubs/debugbreak.S @@ -17,9 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Triggers breakpoint in software debugger. diff --git a/libc/stubs/errno.S b/libc/stubs/errno.S index 7d868e432..333559ca5 100644 --- a/libc/stubs/errno.S +++ b/libc/stubs/errno.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ / Global variable for last error. / diff --git a/libc/stubs/errnolocation.S b/libc/stubs/errnolocation.S index db89a0610..b224164c3 100644 --- a/libc/stubs/errnolocation.S +++ b/libc/stubs/errnolocation.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .keep.text # gdb needs it / Returns address of errno variable. diff --git a/libc/stubs/exit.S b/libc/stubs/exit.S index 96b6fa24a..afb4a5de4 100644 --- a/libc/stubs/exit.S +++ b/libc/stubs/exit.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Linkable delegate for traditional Unix user process termination. diff --git a/libc/stubs/exit11.S b/libc/stubs/exit11.S index 0092a31e4..15b547204 100644 --- a/libc/stubs/exit11.S +++ b/libc/stubs/exit11.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Thrice re-imagined Unix user process termination API stub. diff --git a/libc/stubs/fentry.S b/libc/stubs/fentry.S index 0a8590557..b396e0ff4 100644 --- a/libc/stubs/fentry.S +++ b/libc/stubs/fentry.S @@ -17,9 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Function entry hook stub. diff --git a/libc/stubs/gcov.S b/libc/stubs/gcov.S index 6091fb401..4046c3a89 100644 --- a/libc/stubs/gcov.S +++ b/libc/stubs/gcov.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Magic words to unbreak build if GCOV flags are passed. diff --git a/libc/stubs/instrumentation.S b/libc/stubs/instrumentation.S index 1b4edae2c..106107316 100644 --- a/libc/stubs/instrumentation.S +++ b/libc/stubs/instrumentation.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ / @fileoverview Function Instrumentation No-Op Runtime / diff --git a/libc/stubs/mcount.S b/libc/stubs/mcount.S index cf78a45a4..80d4412fe 100644 --- a/libc/stubs/mcount.S +++ b/libc/stubs/mcount.S @@ -17,9 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Function Profiling Hook. diff --git a/libc/stubs/missingno.S b/libc/stubs/missingno.S index b9ef3bd70..c6d0db806 100644 --- a/libc/stubs/missingno.S +++ b/libc/stubs/missingno.S @@ -17,9 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Optional function stub. diff --git a/libc/stubs/mulvdi3.S b/libc/stubs/mulvdi3.S index f7f3e7910..0b9739483 100644 --- a/libc/stubs/mulvdi3.S +++ b/libc/stubs/mulvdi3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥*𝑦, aborting on overflow. / diff --git a/libc/stubs/mulvsi3.S b/libc/stubs/mulvsi3.S index bb0f9937d..8d4d046bb 100644 --- a/libc/stubs/mulvsi3.S +++ b/libc/stubs/mulvsi3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥*𝑦, aborting on overflow. / diff --git a/libc/stubs/mulvti3.S b/libc/stubs/mulvti3.S index 7c68a5b31..e696644dd 100644 --- a/libc/stubs/mulvti3.S +++ b/libc/stubs/mulvti3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥*𝑦, aborting on overflow. / diff --git a/libc/stubs/negvdi2.S b/libc/stubs/negvdi2.S index 8e5220c1f..d005f6731 100644 --- a/libc/stubs/negvdi2.S +++ b/libc/stubs/negvdi2.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns -𝑥, aborting on overflow (two's complement bane). / diff --git a/libc/stubs/negvsi2.S b/libc/stubs/negvsi2.S index 41432eeb2..314edd623 100644 --- a/libc/stubs/negvsi2.S +++ b/libc/stubs/negvsi2.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns -𝑥, aborting on overflow (two's complement bane). / diff --git a/libc/stubs/negvti2.S b/libc/stubs/negvti2.S index 5f58fa4ae..1a97399f2 100644 --- a/libc/stubs/negvti2.S +++ b/libc/stubs/negvti2.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns -𝑥, aborting on overflow. / diff --git a/libc/stubs/onarithmeticoverflow.S b/libc/stubs/onarithmeticoverflow.S index d304d2fca..445c43998 100644 --- a/libc/stubs/onarithmeticoverflow.S +++ b/libc/stubs/onarithmeticoverflow.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" .text.unlikely -.yoink __FILE__ +.source __FILE__ / Arithmetic overflow handler. / diff --git a/libc/stubs/panic.S b/libc/stubs/panic.S index b29a5f6e3..2b7926f5e 100644 --- a/libc/stubs/panic.S +++ b/libc/stubs/panic.S @@ -17,9 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Aborts or hard blocks instruction pointer. diff --git a/libc/stubs/stackguard.S b/libc/stubs/stackguard.S index 4f2d68259..c25821cdc 100644 --- a/libc/stubs/stackguard.S +++ b/libc/stubs/stackguard.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/macros.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 /** diff --git a/libc/stubs/subvdi3.S b/libc/stubs/subvdi3.S index 10deb8e37..9cab8698d 100644 --- a/libc/stubs/subvdi3.S +++ b/libc/stubs/subvdi3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥-𝑦, aborting on overflow. / diff --git a/libc/stubs/subvsi3.S b/libc/stubs/subvsi3.S index b0e463b8f..bc9eb6613 100644 --- a/libc/stubs/subvsi3.S +++ b/libc/stubs/subvsi3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥-𝑦, aborting on overflow. / diff --git a/libc/stubs/subvti3.S b/libc/stubs/subvti3.S index ef8276a6e..f118ece01 100644 --- a/libc/stubs/subvti3.S +++ b/libc/stubs/subvti3.S @@ -20,7 +20,7 @@ #include "libc/macros.h" .align 16 .text.likely -.yoink __FILE__ +.source __FILE__ / Returns 𝑥-𝑦, aborting on overflow. / diff --git a/libc/stubs/triplf.S b/libc/stubs/triplf.S index 2cf883a13..d1751e167 100644 --- a/libc/stubs/triplf.S +++ b/libc/stubs/triplf.S @@ -20,7 +20,7 @@ #include "ape/macros.h" #include "ape/config.h" .real -.yoink __FILE__ +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 / Hoses interrupt descriptor table and triple-faults the system. diff --git a/libc/stubs/typeinfo.S b/libc/stubs/typeinfo.S index e5a84d488..fca4a26b9 100644 --- a/libc/stubs/typeinfo.S +++ b/libc/stubs/typeinfo.S @@ -18,6 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" +.source __FILE__ / __cxxabiv1::__function_type_info (?) / Because Clang in MODE=dbg doesn't respect -fno-rtti @@ -25,4 +26,3 @@ _ZTVN10__cxxabiv120__function_type_infoE: .quad 0 .endobj _ZTVN10__cxxabiv120__function_type_infoE,globl - .yoink __FILE__ diff --git a/libc/stubs/ubsan.S b/libc/stubs/ubsan.S index 34afbbaaf..e24b8e8dc 100644 --- a/libc/stubs/ubsan.S +++ b/libc/stubs/ubsan.S @@ -20,7 +20,7 @@ #include "ape/macros.h" .real .code16 # ∩ .code32 ∩ .code64 -.yoink __FILE__ +.source __FILE__ /** * @fileoverview Overridable stubs for synthetic sanitizer calls. diff --git a/libc/stubs/unprovable.S b/libc/stubs/unprovable.S index 2495bc524..af31f30aa 100644 --- a/libc/stubs/unprovable.S +++ b/libc/stubs/unprovable.S @@ -17,8 +17,9 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" .real +.source __FILE__ .code16 # ∩ .code32 ∩ .code64 __unprovable: @@ -28,4 +29,3 @@ __unprovable: pop %bp ret .endfn __unprovable,globl,hidden - .yoink __FILE__ diff --git a/libc/stubs/xnu.S b/libc/stubs/xnu.S index 2359180a1..aad09c335 100644 --- a/libc/stubs/xnu.S +++ b/libc/stubs/xnu.S @@ -18,8 +18,8 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" +.source __FILE__ _start_xnu: jmp abort .endfn _start_xnu,weak - .yoink __FILE__ diff --git a/libc/sysv/g_syscount.S b/libc/sysv/g_syscount.S index ea0db96b8..55a667164 100644 --- a/libc/sysv/g_syscount.S +++ b/libc/sysv/g_syscount.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / RII System Five system call counter. / diff --git a/libc/sysv/restorert.S b/libc/sysv/restorert.S index 8af491443..cfd558ce9 100644 --- a/libc/sysv/restorert.S +++ b/libc/sysv/restorert.S @@ -17,7 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" +#include "libc/macros.h" +.source __FILE__ / Linux Signal Trampoline (HOLY CODE) .align 16 @@ -26,4 +27,3 @@ __restore_rt: # @see gdb/amd64-linux-tdep.c syscall .align 16 .endfn __restore_rt,globl,hidden - .yoink __FILE__ diff --git a/libc/sysv/stackchkguard.S b/libc/sysv/stackchkguard.S index 49b254686..ce60faa35 100644 --- a/libc/sysv/stackchkguard.S +++ b/libc/sysv/stackchkguard.S @@ -20,7 +20,7 @@ #include "libc/macros.h" #include "libc/notice.inc" #include "libc/sysv/consts/auxv.h" -.yoink __FILE__ +.source __FILE__ / Canary for -fstack-protector. / diff --git a/libc/sysv/syscall.S b/libc/sysv/syscall.S index 7a6bf912e..a924a474f 100644 --- a/libc/sysv/syscall.S +++ b/libc/sysv/syscall.S @@ -41,4 +41,4 @@ syscall:mov %rdi,%rax mov 8(%rsp),%r9 jmp *systemfive(%rip) .endfn syscall,globl - .yoink __FILE__ + .source __FILE__ diff --git a/libc/sysv/systemfive.S b/libc/sysv/systemfive.S index ae4dfec51..9b2601c6a 100644 --- a/libc/sysv/systemfive.S +++ b/libc/sysv/systemfive.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/dce.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ /* ▄▄▄ ▄▄▄ ▀▓▓▒▄ diff --git a/libc/testlib/bench.S b/libc/testlib/bench.S index 5ab5c1a4c..d8f6d19b3 100644 --- a/libc/testlib/bench.S +++ b/libc/testlib/bench.S @@ -18,9 +18,8 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" - - yoink __FILE__ - yoink testlib_runallbenchmarks +.yoink testlib_runallbenchmarks +.source __FILE__ / Decentralized section for benchmark registration. / diff --git a/libc/testlib/combo.S b/libc/testlib/combo.S index dd93dbae1..e62ffcae4 100644 --- a/libc/testlib/combo.S +++ b/libc/testlib/combo.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Decentralized section for test combo registration. / diff --git a/libc/testlib/fixture.S b/libc/testlib/fixture.S index cf5ac3dd2..df4d9748a 100644 --- a/libc/testlib/fixture.S +++ b/libc/testlib/fixture.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Decentralized section for test fixture registration. / diff --git a/libc/testlib/hyperion.S b/libc/testlib/hyperion.S index 29769a200..a4a8c56dd 100644 --- a/libc/testlib/hyperion.S +++ b/libc/testlib/hyperion.S @@ -18,8 +18,8 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" +.source __FILE__ .rodata -.yoink __FILE__ / Nontrivial NUL-terminated string test vector. .align 1 diff --git a/libc/testlib/testcase.S b/libc/testlib/testcase.S index 8cdd17578..1436577c8 100644 --- a/libc/testlib/testcase.S +++ b/libc/testlib/testcase.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Decentralized section for test testcase registration. / diff --git a/libc/testlib/thrashcodecache.S b/libc/testlib/thrashcodecache.S index 4d9d72436..cfed5d566 100644 --- a/libc/testlib/thrashcodecache.S +++ b/libc/testlib/thrashcodecache.S @@ -18,8 +18,8 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" +.source __FILE__ .testonly -.yoink __FILE__ / Empties L1 instruction cache. thrashcodecache: diff --git a/libc/testlib/thunks/assert_eq.S b/libc/testlib/thunks/assert_eq.S index 6d38bcd78..e683e080a 100644 --- a/libc/testlib/thunks/assert_eq.S +++ b/libc/testlib/thunks/assert_eq.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_assert_eq: diff --git a/libc/testlib/thunks/assert_false.S b/libc/testlib/thunks/assert_false.S index 64a8c087b..0497414c1 100644 --- a/libc/testlib/thunks/assert_false.S +++ b/libc/testlib/thunks/assert_false.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_assert_false: diff --git a/libc/testlib/thunks/assert_ne.S b/libc/testlib/thunks/assert_ne.S index 498974a51..fe45d6509 100644 --- a/libc/testlib/thunks/assert_ne.S +++ b/libc/testlib/thunks/assert_ne.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_assert_ne: diff --git a/libc/testlib/thunks/assert_true.S b/libc/testlib/thunks/assert_true.S index ed9f31667..c04f5f4a8 100644 --- a/libc/testlib/thunks/assert_true.S +++ b/libc/testlib/thunks/assert_true.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_assert_true: diff --git a/libc/testlib/thunks/expect_eq.S b/libc/testlib/thunks/expect_eq.S index 3310dccff..bafb1e1b5 100644 --- a/libc/testlib/thunks/expect_eq.S +++ b/libc/testlib/thunks/expect_eq.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_expect_eq: diff --git a/libc/testlib/thunks/expect_false.S b/libc/testlib/thunks/expect_false.S index 164a6d74d..63705baa2 100644 --- a/libc/testlib/thunks/expect_false.S +++ b/libc/testlib/thunks/expect_false.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_expect_false: diff --git a/libc/testlib/thunks/expect_ne.S b/libc/testlib/thunks/expect_ne.S index c8b3aff2d..3ce1049fc 100644 --- a/libc/testlib/thunks/expect_ne.S +++ b/libc/testlib/thunks/expect_ne.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_expect_ne: diff --git a/libc/testlib/thunks/expect_true.S b/libc/testlib/thunks/expect_true.S index fd3814436..df71d2b8c 100644 --- a/libc/testlib/thunks/expect_true.S +++ b/libc/testlib/thunks/expect_true.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_expect_true: diff --git a/libc/testlib/thunks/free.S b/libc/testlib/thunks/free.S index 9f9361567..0d449f6f1 100644 --- a/libc/testlib/thunks/free.S +++ b/libc/testlib/thunks/free.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Delegates to free(). / diff --git a/libc/testlib/thunks/jump.S b/libc/testlib/thunks/jump.S index 85ad39c84..31213aa8f 100644 --- a/libc/testlib/thunks/jump.S +++ b/libc/testlib/thunks/jump.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ .text.unlikely testlib_showerror_jump: diff --git a/libc/time/kmonthname.S b/libc/time/kmonthname.S index 8d538103d..d12c22ff6 100644 --- a/libc/time/kmonthname.S +++ b/libc/time/kmonthname.S @@ -7,7 +7,7 @@ │ • http://creativecommons.org/publicdomain/zero/1.0/ │ ╚─────────────────────────────────────────────────────────────────*/ #endif -#include "libc/macros.inc" +#include "libc/macros.h" / extern const char kMonthName[12][10]; .section .rodata,"aS",@progbits diff --git a/libc/time/kmonthnameshort.S b/libc/time/kmonthnameshort.S index 3a90b2aee..d0e1e78c2 100644 --- a/libc/time/kmonthnameshort.S +++ b/libc/time/kmonthnameshort.S @@ -7,7 +7,7 @@ │ • http://creativecommons.org/publicdomain/zero/1.0/ │ ╚─────────────────────────────────────────────────────────────────*/ #endif -#include "libc/macros.inc" +#include "libc/macros.h" / Type #1: / - Indexable C-String Array diff --git a/libc/time/kweekdayname.S b/libc/time/kweekdayname.S index b3c552fa9..2102d94d0 100644 --- a/libc/time/kweekdayname.S +++ b/libc/time/kweekdayname.S @@ -7,7 +7,7 @@ │ • http://creativecommons.org/publicdomain/zero/1.0/ │ ╚─────────────────────────────────────────────────────────────────*/ #endif -#include "libc/macros.inc" +#include "libc/macros.h" / extern const char kWeekdayName[7][10]; .section .rodata,"aS",@progbits diff --git a/libc/time/kweekdaynameshort.S b/libc/time/kweekdaynameshort.S index 4ac02d26b..f032e478e 100644 --- a/libc/time/kweekdaynameshort.S +++ b/libc/time/kweekdaynameshort.S @@ -7,7 +7,7 @@ │ • http://creativecommons.org/publicdomain/zero/1.0/ │ ╚─────────────────────────────────────────────────────────────────*/ #endif -#include "libc/macros.inc" +#include "libc/macros.h" / Type #1: / - Indexable C-String Array diff --git a/libc/tinymath/acos.S b/libc/tinymath/acos.S index 82595d03f..58c98b050 100644 --- a/libc/tinymath/acos.S +++ b/libc/tinymath/acos.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc cosine of 𝑥. / diff --git a/libc/tinymath/acosf.S b/libc/tinymath/acosf.S index fd07a9ab4..1270059bd 100644 --- a/libc/tinymath/acosf.S +++ b/libc/tinymath/acosf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc cosine of 𝑥. / diff --git a/libc/tinymath/acosl.S b/libc/tinymath/acosl.S index 278cd0da1..41984e5a2 100644 --- a/libc/tinymath/acosl.S +++ b/libc/tinymath/acosl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc cosine of 𝑥. / diff --git a/libc/tinymath/asin.S b/libc/tinymath/asin.S index faac9db07..33b3c15b4 100644 --- a/libc/tinymath/asin.S +++ b/libc/tinymath/asin.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc sine of 𝑥. / diff --git a/libc/tinymath/asinf.S b/libc/tinymath/asinf.S index a830de139..42b5d0210 100644 --- a/libc/tinymath/asinf.S +++ b/libc/tinymath/asinf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc sine of 𝑥. / diff --git a/libc/tinymath/asinl.S b/libc/tinymath/asinl.S index 80a8c4673..14cd0d038 100644 --- a/libc/tinymath/asinl.S +++ b/libc/tinymath/asinl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc sine of 𝑥. / diff --git a/libc/tinymath/atan.S b/libc/tinymath/atan.S index c15ab5db5..42cc037cd 100644 --- a/libc/tinymath/atan.S +++ b/libc/tinymath/atan.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑥. / diff --git a/libc/tinymath/atan2.S b/libc/tinymath/atan2.S index 3e284324d..8e6511170 100644 --- a/libc/tinymath/atan2.S +++ b/libc/tinymath/atan2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑦/𝑥. / diff --git a/libc/tinymath/atan2f.S b/libc/tinymath/atan2f.S index 3fa51e83e..287a1a7b2 100644 --- a/libc/tinymath/atan2f.S +++ b/libc/tinymath/atan2f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑦/𝑥. / diff --git a/libc/tinymath/atan2l.S b/libc/tinymath/atan2l.S index 0fcb67212..59a09e99d 100644 --- a/libc/tinymath/atan2l.S +++ b/libc/tinymath/atan2l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑦/𝑥. / diff --git a/libc/tinymath/atanf.S b/libc/tinymath/atanf.S index 9462c65f2..4faf8ba22 100644 --- a/libc/tinymath/atanf.S +++ b/libc/tinymath/atanf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑥. / diff --git a/libc/tinymath/atanl.S b/libc/tinymath/atanl.S index ce7162c54..796915de5 100644 --- a/libc/tinymath/atanl.S +++ b/libc/tinymath/atanl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns arc tangent of 𝑥. / diff --git a/libc/tinymath/c2rangr.S b/libc/tinymath/c2rangr.S index 0c1457fab..8c0cbff12 100644 --- a/libc/tinymath/c2rangr.S +++ b/libc/tinymath/c2rangr.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/lib/pc.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Computes transcedental trigonometry op w/ reactive scaling. / diff --git a/libc/tinymath/cabs.S b/libc/tinymath/cabs.S index 362913f85..45684222d 100644 --- a/libc/tinymath/cabs.S +++ b/libc/tinymath/cabs.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns absolute value of complex number. tinymath_cabs: diff --git a/libc/tinymath/cabsf.S b/libc/tinymath/cabsf.S index e19f4ba6f..9b6e5d9f6 100644 --- a/libc/tinymath/cabsf.S +++ b/libc/tinymath/cabsf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cabsf: push %rbp diff --git a/libc/tinymath/cabsl.S b/libc/tinymath/cabsl.S index e8a955a8d..238e912e1 100644 --- a/libc/tinymath/cabsl.S +++ b/libc/tinymath/cabsl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cabsl: push %rbp diff --git a/libc/tinymath/carg.S b/libc/tinymath/carg.S index 810a09dbd..004f36431 100644 --- a/libc/tinymath/carg.S +++ b/libc/tinymath/carg.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_carg: push %rbp diff --git a/libc/tinymath/cargf.S b/libc/tinymath/cargf.S index d9316a1f1..78e2db40f 100644 --- a/libc/tinymath/cargf.S +++ b/libc/tinymath/cargf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cargf: push %rbp diff --git a/libc/tinymath/cargl.S b/libc/tinymath/cargl.S index 5aece5929..3db2b47df 100644 --- a/libc/tinymath/cargl.S +++ b/libc/tinymath/cargl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cargl: push %rbp diff --git a/libc/tinymath/ceil.S b/libc/tinymath/ceil.S index 4c45e8995..0e5572208 100644 --- a/libc/tinymath/ceil.S +++ b/libc/tinymath/ceil.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ceil: .leafprologue diff --git a/libc/tinymath/ceilf.S b/libc/tinymath/ceilf.S index ec788f423..83c9ce517 100644 --- a/libc/tinymath/ceilf.S +++ b/libc/tinymath/ceilf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ceilf: .leafprologue diff --git a/libc/tinymath/ceill.S b/libc/tinymath/ceill.S index 8f91e64c9..59d6b1740 100644 --- a/libc/tinymath/ceill.S +++ b/libc/tinymath/ceill.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ceill: .profilable diff --git a/libc/tinymath/cimag.S b/libc/tinymath/cimag.S index 1bed8e4a9..770e0e937 100644 --- a/libc/tinymath/cimag.S +++ b/libc/tinymath/cimag.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ cimag: .leafprologue .profilable diff --git a/libc/tinymath/cimagf.S b/libc/tinymath/cimagf.S index 8b72c1363..6d314fd72 100644 --- a/libc/tinymath/cimagf.S +++ b/libc/tinymath/cimagf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ cimagf: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/cimagl.S b/libc/tinymath/cimagl.S index 29d19ad6d..b8855a1eb 100644 --- a/libc/tinymath/cimagl.S +++ b/libc/tinymath/cimagl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ cimagl: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/conj.S b/libc/tinymath/conj.S index 303d1ee75..cbb1239a1 100644 --- a/libc/tinymath/conj.S +++ b/libc/tinymath/conj.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_conj: .leafprologue diff --git a/libc/tinymath/conjf.S b/libc/tinymath/conjf.S index 71e21d1f8..fd1b59614 100644 --- a/libc/tinymath/conjf.S +++ b/libc/tinymath/conjf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_conjf: .profilable diff --git a/libc/tinymath/conjl.S b/libc/tinymath/conjl.S index 53bc135c6..4dac289b5 100644 --- a/libc/tinymath/conjl.S +++ b/libc/tinymath/conjl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_conjl: .profilable diff --git a/libc/tinymath/copysign.S b/libc/tinymath/copysign.S index 2c1dd2798..504c51b39 100644 --- a/libc/tinymath/copysign.S +++ b/libc/tinymath/copysign.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_copysign: .leafprologue diff --git a/libc/tinymath/copysignf.S b/libc/tinymath/copysignf.S index f8368350f..6325c8c7f 100644 --- a/libc/tinymath/copysignf.S +++ b/libc/tinymath/copysignf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_copysignf: .leafprologue diff --git a/libc/tinymath/copysignl.S b/libc/tinymath/copysignl.S index c55c4671d..c98667a9f 100644 --- a/libc/tinymath/copysignl.S +++ b/libc/tinymath/copysignl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_copysignl: push %rbp diff --git a/libc/tinymath/cos.S b/libc/tinymath/cos.S index 5558c006b..8ecb28f53 100644 --- a/libc/tinymath/cos.S +++ b/libc/tinymath/cos.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns cosine of 𝑥. / diff --git a/libc/tinymath/cosf.S b/libc/tinymath/cosf.S index 608ca2424..664c26dcc 100644 --- a/libc/tinymath/cosf.S +++ b/libc/tinymath/cosf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns cosine of 𝑥. / diff --git a/libc/tinymath/cosl.S b/libc/tinymath/cosl.S index 76ea93f4d..3988a0b51 100644 --- a/libc/tinymath/cosl.S +++ b/libc/tinymath/cosl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns cosine of 𝑥. / diff --git a/libc/tinymath/cprojf.S b/libc/tinymath/cprojf.S index ae23a932c..398b97fab 100644 --- a/libc/tinymath/cprojf.S +++ b/libc/tinymath/cprojf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cprojf: push %rbp diff --git a/libc/tinymath/cprojl.S b/libc/tinymath/cprojl.S index fd7e2c7f9..79214c75b 100644 --- a/libc/tinymath/cprojl.S +++ b/libc/tinymath/cprojl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_cprojl: .profilable diff --git a/libc/tinymath/creal.S b/libc/tinymath/creal.S index b72e85557..9f1ee33ba 100644 --- a/libc/tinymath/creal.S +++ b/libc/tinymath/creal.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ creal: ret .endfn creal,globl diff --git a/libc/tinymath/crealf.S b/libc/tinymath/crealf.S index 18294f348..6d8db785b 100644 --- a/libc/tinymath/crealf.S +++ b/libc/tinymath/crealf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ crealf: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/creall.S b/libc/tinymath/creall.S index b5f9a4b98..9dbc79e74 100644 --- a/libc/tinymath/creall.S +++ b/libc/tinymath/creall.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ creall: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/d2ld2.S b/libc/tinymath/d2ld2.S index 6cdfea062..6f76313ce 100644 --- a/libc/tinymath/d2ld2.S +++ b/libc/tinymath/d2ld2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Thunks double(*fn)(double,double) -> long double fn. / diff --git a/libc/tinymath/exp.S b/libc/tinymath/exp.S index 352d97928..8fabdcae5 100644 --- a/libc/tinymath/exp.S +++ b/libc/tinymath/exp.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑒^x. / diff --git a/libc/tinymath/exp10.S b/libc/tinymath/exp10.S index 08a481e77..baf48aa1b 100644 --- a/libc/tinymath/exp10.S +++ b/libc/tinymath/exp10.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 10^x. / diff --git a/libc/tinymath/exp10f.S b/libc/tinymath/exp10f.S index 5b9ec34da..49834f4b4 100644 --- a/libc/tinymath/exp10f.S +++ b/libc/tinymath/exp10f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 10^x. / diff --git a/libc/tinymath/exp10l.S b/libc/tinymath/exp10l.S index d778a3d32..9eee0bba6 100644 --- a/libc/tinymath/exp10l.S +++ b/libc/tinymath/exp10l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 10^x. / diff --git a/libc/tinymath/exp2.S b/libc/tinymath/exp2.S index bbb5a7a7d..531fdbc24 100644 --- a/libc/tinymath/exp2.S +++ b/libc/tinymath/exp2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 2^𝑥. / diff --git a/libc/tinymath/exp2f.S b/libc/tinymath/exp2f.S index cc03d524a..6dd188aed 100644 --- a/libc/tinymath/exp2f.S +++ b/libc/tinymath/exp2f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ exp2f: ezlea exp2f,ax jmp _f2ld2 diff --git a/libc/tinymath/exp2l.S b/libc/tinymath/exp2l.S index 36e38c4f6..ffaa22769 100644 --- a/libc/tinymath/exp2l.S +++ b/libc/tinymath/exp2l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 2^x. exp2l: push %rbp diff --git a/libc/tinymath/expf.S b/libc/tinymath/expf.S index ea6733cd8..3256f1da0 100644 --- a/libc/tinymath/expf.S +++ b/libc/tinymath/expf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑒^x. / diff --git a/libc/tinymath/expl.S b/libc/tinymath/expl.S index 11128ab66..30cb2e908 100644 --- a/libc/tinymath/expl.S +++ b/libc/tinymath/expl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑒^x. / diff --git a/libc/tinymath/expm1.S b/libc/tinymath/expm1.S index eff736dfa..d41ee6a80 100644 --- a/libc/tinymath/expm1.S +++ b/libc/tinymath/expm1.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ expm1: ezlea expm1l,ax jmp _d2ld2 diff --git a/libc/tinymath/expm1f.S b/libc/tinymath/expm1f.S index 537518ffe..007972d93 100644 --- a/libc/tinymath/expm1f.S +++ b/libc/tinymath/expm1f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ expm1f: ezlea expm1l,ax jmp _f2ld2 diff --git a/libc/tinymath/expm1l.S b/libc/tinymath/expm1l.S index e70371118..21e8ecb2a 100644 --- a/libc/tinymath/expm1l.S +++ b/libc/tinymath/expm1l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns exp(𝑥) - 1. expm1l: push %rbp diff --git a/libc/tinymath/f2ld2.S b/libc/tinymath/f2ld2.S index 4bc0d631b..4bf37d14d 100644 --- a/libc/tinymath/f2ld2.S +++ b/libc/tinymath/f2ld2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Thunks float(*fn)(float,float) -> long double fn. / diff --git a/libc/tinymath/fabs.S b/libc/tinymath/fabs.S index 6d01b907a..58a19e306 100644 --- a/libc/tinymath/fabs.S +++ b/libc/tinymath/fabs.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fabs: .leafprologue .profilable diff --git a/libc/tinymath/fabsf.S b/libc/tinymath/fabsf.S index c2fc69f42..24f4f61a8 100644 --- a/libc/tinymath/fabsf.S +++ b/libc/tinymath/fabsf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fabsf: .leafprologue .profilable diff --git a/libc/tinymath/fabsl.S b/libc/tinymath/fabsl.S index 0d49a7c6e..9a27e7223 100644 --- a/libc/tinymath/fabsl.S +++ b/libc/tinymath/fabsl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ fabsl: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/fld.S b/libc/tinymath/fld.S index 8fc565180..fa3f47565 100644 --- a/libc/tinymath/fld.S +++ b/libc/tinymath/fld.S @@ -17,8 +17,8 @@ │ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA │ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ -#include "libc/macros.inc" -.yoink __FILE__ +#include "libc/macros.h" +.source __FILE__ fld1: fld1 ret diff --git a/libc/tinymath/floor.S b/libc/tinymath/floor.S index 0204de690..aac0fd830 100644 --- a/libc/tinymath/floor.S +++ b/libc/tinymath/floor.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / vroundsd $_MM_FROUND_TO_NEG_INF|_MM_FROUND_NO_EXC,%xmm0,%xmm0,%xmm0 diff --git a/libc/tinymath/floorf.S b/libc/tinymath/floorf.S index f3c07d788..4159e99b2 100644 --- a/libc/tinymath/floorf.S +++ b/libc/tinymath/floorf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_floorf: .leafprologue diff --git a/libc/tinymath/floorl.S b/libc/tinymath/floorl.S index 702e4887d..32dad8650 100644 --- a/libc/tinymath/floorl.S +++ b/libc/tinymath/floorl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_floorl: .profilable diff --git a/libc/tinymath/fmax.S b/libc/tinymath/fmax.S index 09b701eca..205a853bf 100644 --- a/libc/tinymath/fmax.S +++ b/libc/tinymath/fmax.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmax: .leafprologue diff --git a/libc/tinymath/fmaxf.S b/libc/tinymath/fmaxf.S index 46e79e5b5..2ddb1b8b0 100644 --- a/libc/tinymath/fmaxf.S +++ b/libc/tinymath/fmaxf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmaxf: .leafprologue diff --git a/libc/tinymath/fmaxl.S b/libc/tinymath/fmaxl.S index 5d4a12988..ecc800745 100644 --- a/libc/tinymath/fmaxl.S +++ b/libc/tinymath/fmaxl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmaxl: push %rbp diff --git a/libc/tinymath/fmin.S b/libc/tinymath/fmin.S index 010ba7667..5c3469241 100644 --- a/libc/tinymath/fmin.S +++ b/libc/tinymath/fmin.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmin: .leafprologue diff --git a/libc/tinymath/fminf.S b/libc/tinymath/fminf.S index aff71cbba..1030e69f6 100644 --- a/libc/tinymath/fminf.S +++ b/libc/tinymath/fminf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fminf: .leafprologue diff --git a/libc/tinymath/fminl.S b/libc/tinymath/fminl.S index f0ccb16ef..c9bf8b335 100644 --- a/libc/tinymath/fminl.S +++ b/libc/tinymath/fminl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fminl: push %rbp diff --git a/libc/tinymath/fmod.S b/libc/tinymath/fmod.S index 95da26bba..daea9df16 100644 --- a/libc/tinymath/fmod.S +++ b/libc/tinymath/fmod.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / fmod [sic] does (𝑥 rem 𝑦) w/ round()-style rounding. / diff --git a/libc/tinymath/fmodf.S b/libc/tinymath/fmodf.S index 4d3741590..3146d3c3a 100644 --- a/libc/tinymath/fmodf.S +++ b/libc/tinymath/fmodf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmodf: ezlea tinymath_fmodl,ax diff --git a/libc/tinymath/fmodl.S b/libc/tinymath/fmodl.S index 298832762..05856347e 100644 --- a/libc/tinymath/fmodl.S +++ b/libc/tinymath/fmodl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_fmodl: push %rbp diff --git a/libc/tinymath/fpclassify.S b/libc/tinymath/fpclassify.S index 2a7def742..716330474 100644 --- a/libc/tinymath/fpclassify.S +++ b/libc/tinymath/fpclassify.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ __fpclassify: .leafprologue diff --git a/libc/tinymath/fpclassifyf.S b/libc/tinymath/fpclassifyf.S index f7b23ba70..a6c7fd07c 100644 --- a/libc/tinymath/fpclassifyf.S +++ b/libc/tinymath/fpclassifyf.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ __fpclassifyf: .leafprologue diff --git a/libc/tinymath/fpclassifyl.S b/libc/tinymath/fpclassifyl.S index 033411486..49fb38cd8 100644 --- a/libc/tinymath/fpclassifyl.S +++ b/libc/tinymath/fpclassifyl.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/math.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ __fpclassifyl: push %rbp diff --git a/libc/tinymath/frexp.S b/libc/tinymath/frexp.S index 6155b0354..ba118be08 100644 --- a/libc/tinymath/frexp.S +++ b/libc/tinymath/frexp.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_frexp: .leafprologue diff --git a/libc/tinymath/hypot.S b/libc/tinymath/hypot.S index e084f2f54..6fc164bde 100644 --- a/libc/tinymath/hypot.S +++ b/libc/tinymath/hypot.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns euclidean distance in 2d space. tinymath_hypot: diff --git a/libc/tinymath/hypotf.S b/libc/tinymath/hypotf.S index 543420827..be3b04f6d 100644 --- a/libc/tinymath/hypotf.S +++ b/libc/tinymath/hypotf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns euclidean distance in 2d space. tinymath_hypotf: diff --git a/libc/tinymath/hypotl.S b/libc/tinymath/hypotl.S index e7a6def3d..efd3a4e29 100644 --- a/libc/tinymath/hypotl.S +++ b/libc/tinymath/hypotl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns euclidean distance in 2d space. tinymath_hypotl: diff --git a/libc/tinymath/ilogb.S b/libc/tinymath/ilogb.S index c3a9bf5f6..bebd8aead 100644 --- a/libc/tinymath/ilogb.S +++ b/libc/tinymath/ilogb.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ilogb: ezlea tinymath_ilogbl,ax diff --git a/libc/tinymath/ilogbf.S b/libc/tinymath/ilogbf.S index 63670c5e7..4ac0af438 100644 --- a/libc/tinymath/ilogbf.S +++ b/libc/tinymath/ilogbf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ilogbf: ezlea tinymath_ilogbl,ax diff --git a/libc/tinymath/ilogbl.S b/libc/tinymath/ilogbl.S index d349aa6e8..a6def73cd 100644 --- a/libc/tinymath/ilogbl.S +++ b/libc/tinymath/ilogbl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ilogbl: .profilable diff --git a/libc/tinymath/isgreater.S b/libc/tinymath/isgreater.S index 7c3dd1655..352563f15 100644 --- a/libc/tinymath/isgreater.S +++ b/libc/tinymath/isgreater.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreaterf: .leafprologue diff --git a/libc/tinymath/isgreaterequal.S b/libc/tinymath/isgreaterequal.S index 287edc02a..ba99d9fb9 100644 --- a/libc/tinymath/isgreaterequal.S +++ b/libc/tinymath/isgreaterequal.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreaterequal: .leafprologue diff --git a/libc/tinymath/isgreaterequalf.S b/libc/tinymath/isgreaterequalf.S index 868b1147d..b5e8aa33b 100644 --- a/libc/tinymath/isgreaterequalf.S +++ b/libc/tinymath/isgreaterequalf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreaterequalf: .leafprologue diff --git a/libc/tinymath/isgreaterequall.S b/libc/tinymath/isgreaterequall.S index 39759bb12..1ae282569 100644 --- a/libc/tinymath/isgreaterequall.S +++ b/libc/tinymath/isgreaterequall.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreaterequall: push %rbp diff --git a/libc/tinymath/isgreaterf.S b/libc/tinymath/isgreaterf.S index 570ac9556..9aa5abaae 100644 --- a/libc/tinymath/isgreaterf.S +++ b/libc/tinymath/isgreaterf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreater: .leafprologue diff --git a/libc/tinymath/isgreaterl.S b/libc/tinymath/isgreaterl.S index 786554c26..676fd706c 100644 --- a/libc/tinymath/isgreaterl.S +++ b/libc/tinymath/isgreaterl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isgreaterl: push %rbp diff --git a/libc/tinymath/isless.S b/libc/tinymath/isless.S index b7ebf7770..98993efd5 100644 --- a/libc/tinymath/isless.S +++ b/libc/tinymath/isless.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isless: .leafprologue diff --git a/libc/tinymath/islessequal.S b/libc/tinymath/islessequal.S index 5003ca650..a194d9691 100644 --- a/libc/tinymath/islessequal.S +++ b/libc/tinymath/islessequal.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessequal: .leafprologue diff --git a/libc/tinymath/islessequalf.S b/libc/tinymath/islessequalf.S index d52b69e6d..268f2eb8b 100644 --- a/libc/tinymath/islessequalf.S +++ b/libc/tinymath/islessequalf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessequalf: .leafprologue diff --git a/libc/tinymath/islessequall.S b/libc/tinymath/islessequall.S index c6240915e..bdab3da00 100644 --- a/libc/tinymath/islessequall.S +++ b/libc/tinymath/islessequall.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessequall: push %rbp diff --git a/libc/tinymath/islessf.S b/libc/tinymath/islessf.S index a76843b8f..fbe2ef30d 100644 --- a/libc/tinymath/islessf.S +++ b/libc/tinymath/islessf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessf: .leafprologue diff --git a/libc/tinymath/islessgreater.S b/libc/tinymath/islessgreater.S index 095370ce2..ffff8d43e 100644 --- a/libc/tinymath/islessgreater.S +++ b/libc/tinymath/islessgreater.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessgreater: .leafprologue diff --git a/libc/tinymath/islessgreaterf.S b/libc/tinymath/islessgreaterf.S index 8b8178545..211157c00 100644 --- a/libc/tinymath/islessgreaterf.S +++ b/libc/tinymath/islessgreaterf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessgreaterf: .leafprologue diff --git a/libc/tinymath/islessgreaterl.S b/libc/tinymath/islessgreaterl.S index 606817b14..26d497c6c 100644 --- a/libc/tinymath/islessgreaterl.S +++ b/libc/tinymath/islessgreaterl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessgreaterl: push %rbp diff --git a/libc/tinymath/islessl.S b/libc/tinymath/islessl.S index 6b4a986e4..d548dbbff 100644 --- a/libc/tinymath/islessl.S +++ b/libc/tinymath/islessl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_islessl: push %rbp diff --git a/libc/tinymath/isunordered.S b/libc/tinymath/isunordered.S index c09eabff8..7e323518e 100644 --- a/libc/tinymath/isunordered.S +++ b/libc/tinymath/isunordered.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isunordered: .leafprologue diff --git a/libc/tinymath/isunorderedf.S b/libc/tinymath/isunorderedf.S index c0dcde966..22eec020a 100644 --- a/libc/tinymath/isunorderedf.S +++ b/libc/tinymath/isunorderedf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isunorderedf: .leafprologue diff --git a/libc/tinymath/isunorderedl.S b/libc/tinymath/isunorderedl.S index a393b52a7..727996a2a 100644 --- a/libc/tinymath/isunorderedl.S +++ b/libc/tinymath/isunorderedl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_isunorderedl: .leafprologue diff --git a/libc/tinymath/ldexp.S b/libc/tinymath/ldexp.S index 6fb1dbc5d..9d87c9a61 100644 --- a/libc/tinymath/ldexp.S +++ b/libc/tinymath/ldexp.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ldexp: push %rbp diff --git a/libc/tinymath/ldexpf.S b/libc/tinymath/ldexpf.S index 63c0932af..18cd3264b 100644 --- a/libc/tinymath/ldexpf.S +++ b/libc/tinymath/ldexpf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ldexpf: push %rbp diff --git a/libc/tinymath/ldexpl.S b/libc/tinymath/ldexpl.S index ef8f14e5c..2bbbbd546 100644 --- a/libc/tinymath/ldexpl.S +++ b/libc/tinymath/ldexpl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_ldexpl: .profilable diff --git a/libc/tinymath/log.S b/libc/tinymath/log.S index 46ab62eae..289a7f98f 100644 --- a/libc/tinymath/log.S +++ b/libc/tinymath/log.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns natural logarithm of 𝑥. / diff --git a/libc/tinymath/log10.S b/libc/tinymath/log10.S index 8cd6961bc..4858aaa3c 100644 --- a/libc/tinymath/log10.S +++ b/libc/tinymath/log10.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calculates log₁₀𝑥. / diff --git a/libc/tinymath/log10f.S b/libc/tinymath/log10f.S index 8c7f86ec2..ad1023e2d 100644 --- a/libc/tinymath/log10f.S +++ b/libc/tinymath/log10f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calculates log₁₀𝑥. / diff --git a/libc/tinymath/log10l.S b/libc/tinymath/log10l.S index 265d73bbe..52067ba07 100644 --- a/libc/tinymath/log10l.S +++ b/libc/tinymath/log10l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calculates log₁₀𝑥. / diff --git a/libc/tinymath/log1p.S b/libc/tinymath/log1p.S index d6a623e08..b6ae09a40 100644 --- a/libc/tinymath/log1p.S +++ b/libc/tinymath/log1p.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ log1p: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/log1pf.S b/libc/tinymath/log1pf.S index 671cdae3d..9bc4f8658 100644 --- a/libc/tinymath/log1pf.S +++ b/libc/tinymath/log1pf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ log1pf: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/log1pl.S b/libc/tinymath/log1pl.S index ba4a01385..804a3856f 100644 --- a/libc/tinymath/log1pl.S +++ b/libc/tinymath/log1pl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ log1pl: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/log2.S b/libc/tinymath/log2.S index 6163d2211..49d4c5360 100644 --- a/libc/tinymath/log2.S +++ b/libc/tinymath/log2.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calculates log₂𝑥. / diff --git a/libc/tinymath/log2f.S b/libc/tinymath/log2f.S index 69e258158..9d1979034 100644 --- a/libc/tinymath/log2f.S +++ b/libc/tinymath/log2f.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ log2f: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/log2l.S b/libc/tinymath/log2l.S index f1b76282f..e1f2eae57 100644 --- a/libc/tinymath/log2l.S +++ b/libc/tinymath/log2l.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Calculates log₂𝑥. / diff --git a/libc/tinymath/logb.S b/libc/tinymath/logb.S index 572a78df7..e0925dc6a 100644 --- a/libc/tinymath/logb.S +++ b/libc/tinymath/logb.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ logb: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/logbf.S b/libc/tinymath/logbf.S index 8af502fdb..d7b9e1197 100644 --- a/libc/tinymath/logbf.S +++ b/libc/tinymath/logbf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ logbf: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/logbl.S b/libc/tinymath/logbl.S index 27545cd4f..e5dee2a8c 100644 --- a/libc/tinymath/logbl.S +++ b/libc/tinymath/logbl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ logbl: push %rbp mov %rsp,%rbp diff --git a/libc/tinymath/logf.S b/libc/tinymath/logf.S index bfa9265fd..78c0ac4fc 100644 --- a/libc/tinymath/logf.S +++ b/libc/tinymath/logf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns natural logarithm of 𝑥. / diff --git a/libc/tinymath/logl.S b/libc/tinymath/logl.S index c796b9275..de42b06a4 100644 --- a/libc/tinymath/logl.S +++ b/libc/tinymath/logl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns natural logarithm of 𝑥. / diff --git a/libc/tinymath/lrint.S b/libc/tinymath/lrint.S index b0c836e78..b87717986 100644 --- a/libc/tinymath/lrint.S +++ b/libc/tinymath/lrint.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_lrint: cvtsd2siq %xmm0,%rax diff --git a/libc/tinymath/lrintf.S b/libc/tinymath/lrintf.S index 3d313c880..e95156787 100644 --- a/libc/tinymath/lrintf.S +++ b/libc/tinymath/lrintf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_lrintf: cvtss2siq %xmm0,%rax diff --git a/libc/tinymath/lrintl.S b/libc/tinymath/lrintl.S index e469a2bf8..fb8fd9677 100644 --- a/libc/tinymath/lrintl.S +++ b/libc/tinymath/lrintl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_lrintl: push %rbp diff --git a/libc/tinymath/lround.S b/libc/tinymath/lround.S index b37d83039..458651285 100644 --- a/libc/tinymath/lround.S +++ b/libc/tinymath/lround.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Rounds to nearest integer, away from zero. / diff --git a/libc/tinymath/lroundf.S b/libc/tinymath/lroundf.S index f44897731..ac5408b66 100644 --- a/libc/tinymath/lroundf.S +++ b/libc/tinymath/lroundf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Rounds to nearest integer, away from zero. / diff --git a/libc/tinymath/lroundl.S b/libc/tinymath/lroundl.S index 86b1cda84..17965f5ef 100644 --- a/libc/tinymath/lroundl.S +++ b/libc/tinymath/lroundl.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/lib/pc.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_lroundl: push %rbp diff --git a/libc/tinymath/nearbyint.S b/libc/tinymath/nearbyint.S index e4d933692..758e32eca 100644 --- a/libc/tinymath/nearbyint.S +++ b/libc/tinymath/nearbyint.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_nearbyint: .profilable diff --git a/libc/tinymath/nearbyintf.S b/libc/tinymath/nearbyintf.S index 2831ecc8c..b9480d788 100644 --- a/libc/tinymath/nearbyintf.S +++ b/libc/tinymath/nearbyintf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_nearbyintf: .profilable diff --git a/libc/tinymath/nearbyintl.S b/libc/tinymath/nearbyintl.S index 2a012aa8f..5ca05bc4f 100644 --- a/libc/tinymath/nearbyintl.S +++ b/libc/tinymath/nearbyintl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_nearbyintl: .profilable diff --git a/libc/tinymath/pow.S b/libc/tinymath/pow.S index 1928569fa..3e76bdc13 100644 --- a/libc/tinymath/pow.S +++ b/libc/tinymath/pow.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑥^𝑦. / diff --git a/libc/tinymath/powf.S b/libc/tinymath/powf.S index bd38fc725..2b2432ca5 100644 --- a/libc/tinymath/powf.S +++ b/libc/tinymath/powf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑥^𝑦. / diff --git a/libc/tinymath/powl.S b/libc/tinymath/powl.S index 090c0786e..05fb1b5b3 100644 --- a/libc/tinymath/powl.S +++ b/libc/tinymath/powl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns 𝑥^𝑦. / diff --git a/libc/tinymath/remainder.S b/libc/tinymath/remainder.S index 83af0d4e2..025697f20 100644 --- a/libc/tinymath/remainder.S +++ b/libc/tinymath/remainder.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / remainder(𝑥,𝑦) means (𝑥 rem 𝑦) w/ rint()-style rounding. / diff --git a/libc/tinymath/remainderf.S b/libc/tinymath/remainderf.S index c0857b945..03d3c81f0 100644 --- a/libc/tinymath/remainderf.S +++ b/libc/tinymath/remainderf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_remainderf: ezlea tinymath_remainderl,ax diff --git a/libc/tinymath/remainderl.S b/libc/tinymath/remainderl.S index 146314d98..399c57f35 100644 --- a/libc/tinymath/remainderl.S +++ b/libc/tinymath/remainderl.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/lib/pc.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_remainderl: push %rbp diff --git a/libc/tinymath/rint.S b/libc/tinymath/rint.S index 43487d08b..d45e5ae74 100644 --- a/libc/tinymath/rint.S +++ b/libc/tinymath/rint.S @@ -20,7 +20,7 @@ #include "libc/nexgen32e/x86feature.h" #include "libc/bits/smmintrin.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_rint: #if !X86_NEED(SSE4_2) diff --git a/libc/tinymath/rintf.S b/libc/tinymath/rintf.S index c30f204ca..4387213bb 100644 --- a/libc/tinymath/rintf.S +++ b/libc/tinymath/rintf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_rintf: .leafprologue diff --git a/libc/tinymath/rintl.S b/libc/tinymath/rintl.S index 6e29dc5b9..c2dc92aa4 100644 --- a/libc/tinymath/rintl.S +++ b/libc/tinymath/rintl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_rintl: push %rbp diff --git a/libc/tinymath/round.S b/libc/tinymath/round.S index b2a7b13e0..7c82a7d27 100644 --- a/libc/tinymath/round.S +++ b/libc/tinymath/round.S @@ -20,7 +20,7 @@ #include "libc/macros.h" #include "libc/bits/smmintrin.h" #include "libc/nexgen32e/x86feature.h" -.yoink __FILE__ +.source __FILE__ / Rounds to nearest integer, away from zero. / diff --git a/libc/tinymath/roundf.S b/libc/tinymath/roundf.S index a6a98be99..1a6f6bf30 100644 --- a/libc/tinymath/roundf.S +++ b/libc/tinymath/roundf.S @@ -20,7 +20,7 @@ #include "libc/macros.h" #include "libc/bits/smmintrin.h" #include "libc/nexgen32e/x86feature.h" -.yoink __FILE__ +.source __FILE__ / Rounds to nearest integer, away from zero. / diff --git a/libc/tinymath/roundl.S b/libc/tinymath/roundl.S index 24917a507..577117cd3 100644 --- a/libc/tinymath/roundl.S +++ b/libc/tinymath/roundl.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/lib/pc.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_roundl: push %rbp diff --git a/libc/tinymath/scalb.S b/libc/tinymath/scalb.S index 96de70909..48f2db4cc 100644 --- a/libc/tinymath/scalb.S +++ b/libc/tinymath/scalb.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalb: push %rbp diff --git a/libc/tinymath/scalbf.S b/libc/tinymath/scalbf.S index 21dacc92a..f6d81aa4c 100644 --- a/libc/tinymath/scalbf.S +++ b/libc/tinymath/scalbf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbf: push %rbp diff --git a/libc/tinymath/scalbl.S b/libc/tinymath/scalbl.S index 2e70e07e7..d8ffff216 100644 --- a/libc/tinymath/scalbl.S +++ b/libc/tinymath/scalbl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbl: push %rbp diff --git a/libc/tinymath/scalbln.S b/libc/tinymath/scalbln.S index 726734464..8da9072b1 100644 --- a/libc/tinymath/scalbln.S +++ b/libc/tinymath/scalbln.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbln: push %rbp diff --git a/libc/tinymath/scalblnl.S b/libc/tinymath/scalblnl.S index 1e8ce10b2..da769bf95 100644 --- a/libc/tinymath/scalblnl.S +++ b/libc/tinymath/scalblnl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalblnf: push %rbp diff --git a/libc/tinymath/scalbn.S b/libc/tinymath/scalbn.S index 89cacb2f9..5dbdb53eb 100644 --- a/libc/tinymath/scalbn.S +++ b/libc/tinymath/scalbn.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbn: push %rbp diff --git a/libc/tinymath/scalbnf.S b/libc/tinymath/scalbnf.S index 30d6075fa..118848c0b 100644 --- a/libc/tinymath/scalbnf.S +++ b/libc/tinymath/scalbnf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbnl: .profilable diff --git a/libc/tinymath/scalbnl.S b/libc/tinymath/scalbnl.S index fc538eac9..1f9b774dc 100644 --- a/libc/tinymath/scalbnl.S +++ b/libc/tinymath/scalbnl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_scalbnf: push %rbp diff --git a/libc/tinymath/signbit.S b/libc/tinymath/signbit.S index c91459a78..768bd9368 100644 --- a/libc/tinymath/signbit.S +++ b/libc/tinymath/signbit.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_signbit: .leafprologue diff --git a/libc/tinymath/signbitf.S b/libc/tinymath/signbitf.S index f0f8f9b42..7a6132c4d 100644 --- a/libc/tinymath/signbitf.S +++ b/libc/tinymath/signbitf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_signbitf: .leafprologue diff --git a/libc/tinymath/signbitl.S b/libc/tinymath/signbitl.S index 630a3f416..536cd2071 100644 --- a/libc/tinymath/signbitl.S +++ b/libc/tinymath/signbitl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_signbitl: push %rbp diff --git a/libc/tinymath/significand.S b/libc/tinymath/significand.S index 24552ca7a..dead6afe6 100644 --- a/libc/tinymath/significand.S +++ b/libc/tinymath/significand.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_significand: push %rbp diff --git a/libc/tinymath/significandf.S b/libc/tinymath/significandf.S index 4622c63fc..790bf337d 100644 --- a/libc/tinymath/significandf.S +++ b/libc/tinymath/significandf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_significandf: push %rbp diff --git a/libc/tinymath/significandl.S b/libc/tinymath/significandl.S index 71b755a61..ced4c06d8 100644 --- a/libc/tinymath/significandl.S +++ b/libc/tinymath/significandl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_significandl: push %rbp diff --git a/libc/tinymath/sin.S b/libc/tinymath/sin.S index 713550dc2..d9ee8329a 100644 --- a/libc/tinymath/sin.S +++ b/libc/tinymath/sin.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine of 𝑥. / diff --git a/libc/tinymath/sincos.S b/libc/tinymath/sincos.S index fe0a5294b..6b77b0421 100644 --- a/libc/tinymath/sincos.S +++ b/libc/tinymath/sincos.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine and cosine of 𝑥. / diff --git a/libc/tinymath/sincosf.S b/libc/tinymath/sincosf.S index 2aac57fac..5f3f48031 100644 --- a/libc/tinymath/sincosf.S +++ b/libc/tinymath/sincosf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine and cosine of 𝑥. / diff --git a/libc/tinymath/sincosl.S b/libc/tinymath/sincosl.S index faf4d5ba0..9a7f0a1ab 100644 --- a/libc/tinymath/sincosl.S +++ b/libc/tinymath/sincosl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine and cosine of 𝑥. / diff --git a/libc/tinymath/sinf.S b/libc/tinymath/sinf.S index ed5c9a003..c98fbd49c 100644 --- a/libc/tinymath/sinf.S +++ b/libc/tinymath/sinf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine of 𝑥. / diff --git a/libc/tinymath/sinl.S b/libc/tinymath/sinl.S index 7afde135c..e5953a933 100644 --- a/libc/tinymath/sinl.S +++ b/libc/tinymath/sinl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns sine of 𝑥. / diff --git a/libc/tinymath/sqrt.S b/libc/tinymath/sqrt.S index 83f072bfb..7e51efe5b 100644 --- a/libc/tinymath/sqrt.S +++ b/libc/tinymath/sqrt.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_sqrt: .leafprologue diff --git a/libc/tinymath/sqrtf.S b/libc/tinymath/sqrtf.S index 06810380c..44e6ae11f 100644 --- a/libc/tinymath/sqrtf.S +++ b/libc/tinymath/sqrtf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_sqrtf: .leafprologue diff --git a/libc/tinymath/sqrtl.S b/libc/tinymath/sqrtl.S index 5095b44f7..f231dbe13 100644 --- a/libc/tinymath/sqrtl.S +++ b/libc/tinymath/sqrtl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns square root of 𝑥. / diff --git a/libc/tinymath/tan.S b/libc/tinymath/tan.S index 06829d602..d0007f5d1 100644 --- a/libc/tinymath/tan.S +++ b/libc/tinymath/tan.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns tangent of 𝑥. / diff --git a/libc/tinymath/tanf.S b/libc/tinymath/tanf.S index 1f96d83c1..f7f5a468b 100644 --- a/libc/tinymath/tanf.S +++ b/libc/tinymath/tanf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns tangent of 𝑥. / diff --git a/libc/tinymath/tanl.S b/libc/tinymath/tanl.S index 4ecc9b01b..0b85826f2 100644 --- a/libc/tinymath/tanl.S +++ b/libc/tinymath/tanl.S @@ -19,7 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "ape/lib/pc.h" #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Returns tangent of 𝑥. / diff --git a/libc/tinymath/trunc.S b/libc/tinymath/trunc.S index 8117dfd56..ba0f63ca2 100644 --- a/libc/tinymath/trunc.S +++ b/libc/tinymath/trunc.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ / Rounds to integer, toward zero. / diff --git a/libc/tinymath/truncf.S b/libc/tinymath/truncf.S index 99ba9acf6..6223c3562 100644 --- a/libc/tinymath/truncf.S +++ b/libc/tinymath/truncf.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_truncf: .leafprologue diff --git a/libc/tinymath/truncl.S b/libc/tinymath/truncl.S index c70ff4e72..8e755bcc7 100644 --- a/libc/tinymath/truncl.S +++ b/libc/tinymath/truncl.S @@ -18,7 +18,7 @@ │ 02110-1301 USA │ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/macros.h" -.yoink __FILE__ +.source __FILE__ tinymath_truncl: .profilable diff --git a/libc/unicode/strwidth.c b/libc/unicode/strwidth.c index dd54f5720..8451d7419 100644 --- a/libc/unicode/strwidth.c +++ b/libc/unicode/strwidth.c @@ -22,6 +22,7 @@ #include "libc/limits.h" #include "libc/str/internal.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/unicode/unicode.h" #define kOneTrueTabWidth 8 diff --git a/libc/zipos/zipcentraldir.S b/libc/zipos/zipcentraldir.S index 9acf3cbed..2c2fd0793 100644 --- a/libc/zipos/zipcentraldir.S +++ b/libc/zipos/zipcentraldir.S @@ -49,10 +49,10 @@ __zip_end: .weak v_zip_commentsize .previous - yoink __zipos_close - yoink __zipos_fstat - yoink __zipos_open - yoink __zipos_parseuri - yoink __zipos_read - yoink __zipos_stat - yoink __FILE__ + .yoink __zipos_close + .yoink __zipos_fstat + .yoink __zipos_open + .yoink __zipos_parseuri + .yoink __zipos_read + .yoink __zipos_stat + .source __FILE__ diff --git a/test/libc/str/getutf16_test.c b/test/libc/str/getutf16_test.c index 0b60cf14c..db5792bed 100644 --- a/test/libc/str/getutf16_test.c +++ b/test/libc/str/getutf16_test.c @@ -19,6 +19,7 @@ ╚─────────────────────────────────────────────────────────────────────────────*/ #include "libc/bits/bits.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/testlib/testlib.h" TEST(getutf16, testNul) { diff --git a/test/libc/str/tpdecode_test.c b/test/libc/str/tpdecode_test.c index 4c0e51d08..11c360eb1 100644 --- a/test/libc/str/tpdecode_test.c +++ b/test/libc/str/tpdecode_test.c @@ -25,6 +25,7 @@ #include "libc/limits.h" #include "libc/runtime/gc.h" #include "libc/str/str.h" +#include "libc/str/tpdecode.h" #include "libc/testlib/testlib.h" wint_t wc; diff --git a/test/libc/str/tpencode_test.c b/test/libc/str/tpencode_test.c index 0aa2afa67..697192b63 100644 --- a/test/libc/str/tpencode_test.c +++ b/test/libc/str/tpencode_test.c @@ -21,6 +21,7 @@ #include "libc/bits/progn.h" #include "libc/bits/safemacros.h" #include "libc/str/str.h" +#include "libc/str/tpencode.h" #include "libc/testlib/testlib.h" char buf[8]; @@ -36,9 +37,10 @@ TEST(tpencode, testSpace) { } TEST(tpencode, testGlyph) { - ASSERT_BINEQ(u"ΓåÆ", PROGN(ASSERT_EQ(3, tpencode(buf, 8, u'→', false)), buf)); - ASSERT_BINEQ(u"ΓåÆ", - PROGN(ASSERT_EQ(3, (tpencode)(buf, 8, u'→', false)), buf)); + ASSERT_EQ(3, tpencode(buf, 8, u'→', false)); + ASSERT_BINEQ(u"ΓåÆ", buf); + ASSERT_EQ(3, (tpencode)(buf, 8, u'→', false)); + ASSERT_BINEQ(u"ΓåÆ", buf); } TEST(tpencode, testMathematicalNotMuhPolicyDrivenBehavior_negativeOne) { diff --git a/tool/emacs/cosmo-asm-mode.el b/tool/emacs/cosmo-asm-mode.el index 996630d01..36566656d 100644 --- a/tool/emacs/cosmo-asm-mode.el +++ b/tool/emacs/cosmo-asm-mode.el @@ -8,6 +8,7 @@ ;; Reconfigures GNU Emacs syntax highlighting for GNU Assembler syntax. (require 'asm-mode) +(require 'cosmo-cpp-constants) (defun cosmo-regexpify (x) (let ((join (lambda (sep lis) @@ -144,6 +145,11 @@ ;; ("^/.*$" . font-lock-comment-face) + ;; Preprocessor Constants + ;; TODO(jart): Why won't it work?? ;_; + (,(concat "\\b" (cosmo-regexpify cosmo-cpp-constants) "\\b") ;; regexp-opt + 1 font-lock-constant-face) + ;; Immediate Argument ;; ;; - Valid @@ -192,7 +198,7 @@ cpp-font-lock-keywords - '(;; GNU-Style Assembler Comment (Ltd. 80x86 &c.) + `(;; GNU-Style Assembler Comment (Ltd. 80x86 &c.) ;; ;; - Valid ;; @@ -273,7 +279,7 @@ (1 font-lock-constant-face) (2 font-lock-constant-face)) - ;; Decimal Literal + ;; Bultin Constants ;; ;; - Valid ;; diff --git a/tool/emacs/cosmo-c-builtins.el b/tool/emacs/cosmo-c-builtins.el index 8be0eeab4..b57289c1e 100644 --- a/tool/emacs/cosmo-c-builtins.el +++ b/tool/emacs/cosmo-c-builtins.el @@ -1314,6 +1314,7 @@ "EXPROPRIATE" "YOINK" "STATIC_YOINK" + "STATIC_YOINK_SOURCE" "STRINGIFY" "isconstant" "chooseexpr" diff --git a/tool/emacs/cosmo-c-constants.el b/tool/emacs/cosmo-c-constants.el index 99538ba17..28d20cd9e 100644 --- a/tool/emacs/cosmo-c-constants.el +++ b/tool/emacs/cosmo-c-constants.el @@ -1,232 +1,106 @@ +(defconst cosmo-c-constants-c11 + '("__func__" + "__VA_ARGS__" + "__STDC__" + "__STDC_HOSTED__" + "__STDC_VERSION__" + "__TIME__" + "__STDC_ISO_10646__" + "__STDC_MB_MIGHT_NEQ_WC__" + "__STDC_UTF_16__" + "__STDC_UTF_32__" + "__STDC_ANALYZABLE__" + "__STDC_IEC_559_COMPLEX__" + "__STDC_LIB_EXT1__" + "__STDC_NO_ATOMICS__" + "__STDC_NO_COMPLEX__" + "__STDC_NO_THREADS__" + "__STDC_NO_VLA__" + "__STDC_WANT_LIB_EXT1__")) + +(defconst cosmo-c-constants-limits + '("SIZEOF_SHORT" + "SIZEOF_INT" + "SIZEOF_LONG" + "SIZEOF_LONG_LONG" + "SIZEOF_POINTER" + "SIZEOF_PTRDIFF_T" + "SIZEOF_SIZE_T" + "SIZEOF_WCHAR_T" + "SIZEOF_WINT_T" + "SIZEOF_FLOAT" + "SIZEOF_FLOAT128" + "SIZEOF_DOUBLE" + "SIZEOF_FLOAT80" + "SIZEOF_LONG_DOUBLE" + "SIZEOF_INTMAX" + "SCHAR_MAX" + "SHRT_MAX" + "INT_MAX" + "LONG_MAX" + "LLONG_MAX" + "LONG_LONG_MAX" + "SIZE_MAX" + "INT8_MAX" + "INT16_MAX" + "INT32_MAX" + "INT64_MAX" + "WINT_MAX" + "WCHAR_MAX" + "INTPTR_MAX" + "PTRDIFF_MAX" + "SCHAR_MIN" + "SHRT_MIN" + "UINT_MIN" + "INT_MIN" + "LONG_MIN" + "LLONG_MIN" + "LONG_LONG_MIN" + "SIZE_MIN" + "INT8_MIN" + "INT16_MIN" + "INT32_MIN" + "INT64_MIN" + "INTMAX_MIN" + "INTPTR_MIN" + "WINT_MIN" + "WCHAR_MIN" + "PTRDIFF_MIN" + "USHRT_MAX" + "UINT_MAX" + "ULONG_MAX" + "ULLONG_MAX" + "ULONG_LONG_MAX" + "UINTPTR_MAX" + "UINT8_MAX" + "UINT16_MAX" + "UINT32_MAX" + "UINT64_MAX" + "USHRT_MIN" + "ULONG_MIN" + "ULLONG_MIN" + "ULONG_LONG_MIN" + "UINT8_MIN" + "UINT16_MIN" + "UINT32_MIN" + "UINT64_MIN" + "UINTMAX_MIN" + "UINTPTR_MIN" + "MB_CUR_MAX" + "MB_LEN_MAX" + "INTMAX_MAX" + "UINTMAX_MAX" + "INTMAX_MAX" + "UINTMAX_MAX" + "DBL_MIN" + "DBL_MAX" + "FLT_MIN" + "FLT_MAX")) + (defconst cosmo-c-constants-regex - (let ( - - (c11-constants - '("__func__" - "__STDC_IEC_559__" - "__VA_ARGS__" - "__FILE__" - "__LINE__" - "__DATE__" - "__STDC__" - "__STDC_HOSTED__" - "__STDC_VERSION__" - "__TIME__" - "__STDC_ISO_10646__" - "__STDC_MB_MIGHT_NEQ_WC__" - "__STDC_UTF_16__" - "__STDC_UTF_32__" - "__STDC_ANALYZABLE__" - "__STDC_IEC_559_COMPLEX__" - "__STDC_LIB_EXT1__" - "__STDC_NO_ATOMICS__" - "__STDC_NO_COMPLEX__" - "__STDC_NO_THREADS__" - "__STDC_NO_VLA__" - "__STDC_WANT_LIB_EXT1__")) - - (gcc-cpp-412-constants - '("__BASE_FILE__" - "__CHAR_BIT__" - "__FUNCTION__" - "__GNUC_MINOR__" - "__GNUC_PATCHLEVEL__" - "__GNUC__" - "__GNUG__" - "__INCLUDE_LEVEL__" - "__INTMAX_MAX__" - "__INT_MAX__" - "__LONG_LONG_MAX__" - "__LONG_MAX__" - "__SCHAR_MAX__" - "__SHRT_MAX__" - "__DBL_MIN__" - "__DBL_MAX__" - "__FLT_MIN__" - "__FLT_MAX__" - "__WCHAR_MAX__" - "__WCHAR_UNSIGNED__")) - - (gcc-cpp-92-constants - '("__x86_64__" - "__amd64__" - "__WINT_MAX__" - "__BIGGEST_ALIGNMENT__" - "__SIZE_MAX__" - "__PTRDIFF_MAX__" - "__UINTMAX_MAX__" - "__SIG_ATOMIC_MAX__" - "__INT8_MAX__" - "__INT16_MAX__" - "__INT32_MAX__" - "__INT64_MAX__" - "__UINT8_MAX__" - "__UINT16_MAX__" - "__UINT32_MAX__" - "__UINT64_MAX__" - "__INT_LEAST8_MAX__" - "__INT_LEAST16_MAX__" - "__INT_LEAST32_MAX__" - "__INT_LEAST64_MAX__" - "__UINT_LEAST8_MAX__" - "__UINT_LEAST16_MAX__" - "__UINT_LEAST32_MAX__" - "__UINT_LEAST64_MAX__" - "__INT_FAST8_MAX__" - "__INT_FAST16_MAX__" - "__INT_FAST32_MAX__" - "__INT_FAST64_MAX__" - "__UINT_FAST8_MAX__" - "__UINT_FAST16_MAX__" - "__UINT_FAST32_MAX__" - "__UINT_FAST64_MAX__" - "__INTPTR_MAX__" - "__UINTPTR_MAX__" - "__WCHAR_MIN__" - "__WINT_MIN__" - "__SIG_ATOMIC_MIN__" - "__SCHAR_WIDTH__" - "__SHRT_WIDTH__" - "__INT_WIDTH__" - "__LONG_WIDTH__" - "__LONG_LONG_WIDTH__" - "__PTRDIFF_WIDTH__" - "__SIG_ATOMIC_WIDTH__" - "__SIZE_WIDTH__" - "__WCHAR_WIDTH__" - "__WINT_WIDTH__" - "__INT_LEAST8_WIDTH__" - "__INT_LEAST16_WIDTH__" - "__INT_LEAST32_WIDTH__" - "__INT_LEAST64_WIDTH__" - "__INT_FAST8_WIDTH__" - "__INT_FAST16_WIDTH__" - "__INT_FAST32_WIDTH__" - "__INT_FAST64_WIDTH__" - "__INTPTR_WIDTH__" - "__INTMAX_WIDTH__" - "__SIZEOF_INT__" - "__SIZEOF_INTMAX__" - "__SIZEOF_UINTMAX__" - "__SIZEOF_LONG__" - "__SIZEOF_LONG_LONG__" - "__SIZEOF_SHORT__" - "__SIZEOF_POINTER__" - "__SIZEOF_FLOAT__" - "__SIZEOF_DOUBLE__" - "__SIZEOF_LONG_DOUBLE__" - "__SIZEOF_SIZE_T__" - "__SIZEOF_WCHAR_T__" - "__SIZEOF_WINT_T__" - "__SIZEOF_PTRDIFF_T__" - "__TIMESTAMP__")) - - (limits - '("SIZEOF_SHORT" - "SIZEOF_INT" - "SIZEOF_LONG" - "SIZEOF_LONG_LONG" - "SIZEOF_POINTER" - "SIZEOF_PTRDIFF_T" - "SIZEOF_SIZE_T" - "SIZEOF_WCHAR_T" - "SIZEOF_WINT_T" - "SIZEOF_FLOAT" - "SIZEOF_FLOAT128" - "SIZEOF_DOUBLE" - "SIZEOF_FLOAT80" - "SIZEOF_LONG_DOUBLE" - "SIZEOF_INTMAX" - "SCHAR_MAX" - "SHRT_MAX" - "INT_MAX" - "LONG_MAX" - "LLONG_MAX" - "LONG_LONG_MAX" - "SIZE_MAX" - "INT8_MAX" - "INT16_MAX" - "INT32_MAX" - "INT64_MAX" - "WINT_MAX" - "WCHAR_MAX" - "INTPTR_MAX" - "PTRDIFF_MAX" - "SCHAR_MIN" - "SHRT_MIN" - "UINT_MIN" - "INT_MIN" - "LONG_MIN" - "LLONG_MIN" - "LONG_LONG_MIN" - "SIZE_MIN" - "INT8_MIN" - "INT16_MIN" - "INT32_MIN" - "INT64_MIN" - "INTMAX_MIN" - "INTPTR_MIN" - "WINT_MIN" - "WCHAR_MIN" - "PTRDIFF_MIN" - "USHRT_MAX" - "UINT_MAX" - "ULONG_MAX" - "ULLONG_MAX" - "ULONG_LONG_MAX" - "UINTPTR_MAX" - "UINT8_MAX" - "UINT16_MAX" - "UINT32_MAX" - "UINT64_MAX" - "USHRT_MIN" - "ULONG_MIN" - "ULLONG_MIN" - "ULONG_LONG_MIN" - "UINT8_MIN" - "UINT16_MIN" - "UINT32_MIN" - "UINT64_MIN" - "UINTMAX_MIN" - "UINTPTR_MIN" - "MB_CUR_MAX" - "MB_LEN_MAX" - "INTMAX_MAX" - "UINTMAX_MAX" - "INTMAX_MAX" - "UINTMAX_MAX" - "DBL_MIN" - "DBL_MAX" - "FLT_MIN" - "FLT_MAX")) - - (cosmopolitan-constants - '("__SAUCE__" - "PAGESIZE" - "FRAMESIZE" - "BIGPAGESIZE" - "ENV_MAX" - "ARG_MAX" - "CMD_MAX" - "PATH_MAX" - "BUFSIZ" - "CACHELINE" - "CHAR_BIT" - "NAME_MAX" - "NSIG" - "CHILD_MAX" - "OPEN_MAX" - "ATEXIT_MAX" - "__x86__" - "__i386__")) - - ) - (concat "\\_<" - (regexp-opt (append c11-constants - gcc-cpp-412-constants - gcc-cpp-92-constants - cosmopolitan-constants - limits)) - "\\_>"))) + (concat "\\_<" + (regexp-opt (append cosmo-c-constants-c11 + cosmo-c-constants-limits)) + "\\_>")) (provide 'cosmo-c-constants) diff --git a/tool/emacs/cosmo-cpp-constants.el b/tool/emacs/cosmo-cpp-constants.el new file mode 100644 index 000000000..585efce4d --- /dev/null +++ b/tool/emacs/cosmo-cpp-constants.el @@ -0,0 +1,133 @@ +(defconst cosmo-cpp-constants-c11 + '("__STDC_IEC_559__" + "__FILE__" + "__LINE__" + "__DATE__")) + +(defconst cosmo-cpp-constants-gcc-412 + '("__BASE_FILE__" + "__CHAR_BIT__" + "__FUNCTION__" + "__GNUC_MINOR__" + "__GNUC_PATCHLEVEL__" + "__GNUC__" + "__GNUG__" + "__INCLUDE_LEVEL__" + "__INTMAX_MAX__" + "__INT_MAX__" + "__LONG_LONG_MAX__" + "__LONG_MAX__" + "__SCHAR_MAX__" + "__SHRT_MAX__" + "__DBL_MIN__" + "__DBL_MAX__" + "__FLT_MIN__" + "__FLT_MAX__" + "__WCHAR_MAX__" + "__WCHAR_UNSIGNED__")) + +(defconst cosmo-cpp-constants-gcc-92 + '("__x86_64__" + "__amd64__" + "__WINT_MAX__" + "__BIGGEST_ALIGNMENT__" + "__SIZE_MAX__" + "__PTRDIFF_MAX__" + "__UINTMAX_MAX__" + "__SIG_ATOMIC_MAX__" + "__INT8_MAX__" + "__INT16_MAX__" + "__INT32_MAX__" + "__INT64_MAX__" + "__UINT8_MAX__" + "__UINT16_MAX__" + "__UINT32_MAX__" + "__UINT64_MAX__" + "__INT_LEAST8_MAX__" + "__INT_LEAST16_MAX__" + "__INT_LEAST32_MAX__" + "__INT_LEAST64_MAX__" + "__UINT_LEAST8_MAX__" + "__UINT_LEAST16_MAX__" + "__UINT_LEAST32_MAX__" + "__UINT_LEAST64_MAX__" + "__INT_FAST8_MAX__" + "__INT_FAST16_MAX__" + "__INT_FAST32_MAX__" + "__INT_FAST64_MAX__" + "__UINT_FAST8_MAX__" + "__UINT_FAST16_MAX__" + "__UINT_FAST32_MAX__" + "__UINT_FAST64_MAX__" + "__INTPTR_MAX__" + "__UINTPTR_MAX__" + "__WCHAR_MIN__" + "__WINT_MIN__" + "__SIG_ATOMIC_MIN__" + "__SCHAR_WIDTH__" + "__SHRT_WIDTH__" + "__INT_WIDTH__" + "__LONG_WIDTH__" + "__LONG_LONG_WIDTH__" + "__PTRDIFF_WIDTH__" + "__SIG_ATOMIC_WIDTH__" + "__SIZE_WIDTH__" + "__WCHAR_WIDTH__" + "__WINT_WIDTH__" + "__INT_LEAST8_WIDTH__" + "__INT_LEAST16_WIDTH__" + "__INT_LEAST32_WIDTH__" + "__INT_LEAST64_WIDTH__" + "__INT_FAST8_WIDTH__" + "__INT_FAST16_WIDTH__" + "__INT_FAST32_WIDTH__" + "__INT_FAST64_WIDTH__" + "__INTPTR_WIDTH__" + "__INTMAX_WIDTH__" + "__SIZEOF_INT__" + "__SIZEOF_INTMAX__" + "__SIZEOF_UINTMAX__" + "__SIZEOF_LONG__" + "__SIZEOF_LONG_LONG__" + "__SIZEOF_SHORT__" + "__SIZEOF_POINTER__" + "__SIZEOF_FLOAT__" + "__SIZEOF_DOUBLE__" + "__SIZEOF_LONG_DOUBLE__" + "__SIZEOF_SIZE_T__" + "__SIZEOF_WCHAR_T__" + "__SIZEOF_WINT_T__" + "__SIZEOF_PTRDIFF_T__" + "__TIMESTAMP__")) + +(defconst cosmo-cpp-constants-cosmopolitan + '("__SAUCE__" + "PAGESIZE" + "FRAMESIZE" + "BIGPAGESIZE" + "ENV_MAX" + "ARG_MAX" + "CMD_MAX" + "PATH_MAX" + "BUFSIZ" + "CACHELINE" + "CHAR_BIT" + "NAME_MAX" + "NSIG" + "CHILD_MAX" + "OPEN_MAX" + "ATEXIT_MAX" + "IM_FEELING_NAUGHTY" + "__x86__" + "__i386__")) + +(defconst cosmo-cpp-constants + (append cosmo-cpp-constants-c11 + cosmo-cpp-constants-gcc-92 + cosmo-cpp-constants-gcc-412 + cosmo-cpp-constants-cosmopolitan)) + +(defconst cosmo-cpp-constants-regex + (concat "\\_<" (regexp-opt cosmo-cpp-constants) "\\_>")) + +(provide 'cosmo-cpp-constants) diff --git a/tool/emacs/cosmo-format.el b/tool/emacs/cosmo-format.el index 48d048768..c4b50e9bd 100644 --- a/tool/emacs/cosmo-format.el +++ b/tool/emacs/cosmo-format.el @@ -114,18 +114,15 @@ (write-region nil nil tmp) (let ((buf (get-buffer-create "*clang-format*")) (exe (cosmo--find-clang-format-bin))) - ;; (with-current-buffer buf - ;; (set-process-sentinel - ;; (call-process exe tmp t nil arg) - ;; (lambda (_ _) - ;; (display-buffer buf)))) (with-current-buffer buf (call-process exe tmp t nil arg)) (replace-buffer-contents buf) (kill-buffer buf) (delete-file tmp nil)))))))) -(add-hook 'before-save-hook 'cosmo-format) +;; Emacs 26.3+ needed for replace-buffer-contents; so worth it!! +(unless (version-list-< (version-to-list emacs-version) '(26 3)) + (add-hook 'before-save-hook 'cosmo-format)) (provide 'cosmo-format) diff --git a/tool/emacs/cosmo-stuff.el b/tool/emacs/cosmo-stuff.el index 78558b05f..b768eeeda 100644 --- a/tool/emacs/cosmo-stuff.el +++ b/tool/emacs/cosmo-stuff.el @@ -14,10 +14,11 @@ (require 'asm-mode) (require 'cc-mode) (require 'fortran) +(require 'cosmo-c-types) +(require 'cosmo-c-keywords) (require 'cosmo-c-builtins) (require 'cosmo-c-constants) -(require 'cosmo-c-keywords) -(require 'cosmo-c-types) +(require 'cosmo-cpp-constants) (require 'dired) (require 'javadown) (require 'ld-script) @@ -693,6 +694,7 @@ (font-lock-add-keywords nil `((,cosmo-c-keywords-regex . font-lock-keyword-face) (,cosmo-c-builtins-regex . font-lock-builtin-face) + (,cosmo-cpp-constants-regex . font-lock-constant-face) (,cosmo-c-constants-regex . font-lock-constant-face) (,cosmo-c-types-regex . font-lock-type-face)))) diff --git a/tool/emacs/cosmo.el b/tool/emacs/cosmo.el new file mode 100644 index 000000000..88fb36d7f --- /dev/null +++ b/tool/emacs/cosmo.el @@ -0,0 +1,7 @@ +(require 'ld-script) +(require 'optinfo-mode) +(require 'protobuf-mode) +(require 'cosmo-format) +(require 'cosmo-asm-mode) +(require 'cosmo-stuff) +(provide 'cosmo) diff --git a/tool/scripts/configure-emacs.sh b/tool/scripts/configure-emacs.sh new file mode 100755 index 000000000..735b36955 --- /dev/null +++ b/tool/scripts/configure-emacs.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if ! [ -e ape/ape.S ]; then + echo please cd to cosmopolitan root directory >&2 + exit 1 +fi + +COSMOPOLITAN="$PWD" +EMACSCONFIGS="$HOME/.emacs.d/init.el" +[ -e "$EMACSCONFIGS" ] || EMACSCONFIGS="$HOME/.emacs" + +cat >>"$EMACSCONFIGS" <