0004-ARC-Add-support-for-ARCv3-processors.patch 101 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036
  1. From ac6163148698545dd56471edabf97ffc23a519da Mon Sep 17 00:00:00 2001
  2. From: Alexey Brodkin <abrodkin@synopsys.com>
  3. Date: Tue, 2 Jan 2024 03:38:32 -0800
  4. Subject: [PATCH] ARC: Add support for ARCv3 processors
  5. Signed-off-by: Vineet Gupta <vgupta@kernel.org>
  6. Signed-off-by: Pavel Kozlov <pavel.kozlov@synopsys.com>
  7. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
  8. ---
  9. config.h.in | 6 +
  10. elf/dl-runtime.c | 4 +-
  11. elf/elf.h | 5 +-
  12. nptl/Makefile | 5 +-
  13. scripts/build-many-glibcs.py | 6 +
  14. scripts/config.sub | 8 +
  15. sysdeps/arc/Implies | 1 -
  16. sysdeps/arc/__longjmp.S | 62 +-
  17. sysdeps/arc/arc32/Implies | 1 +
  18. sysdeps/arc/arc64/Implies | 1 +
  19. sysdeps/arc/arc64/fpu/libm-test-ulps | 1141 +++++++++++++++++
  20. sysdeps/arc/arc64/fpu/libm-test-ulps-name | 1 +
  21. sysdeps/arc/{ => arc64}/nofpu/libm-test-ulps | 1 +
  22. sysdeps/arc/arc64/nofpu/libm-test-ulps-name | 1 +
  23. sysdeps/arc/atomic-machine.h | 41 +-
  24. sysdeps/arc/bits/setjmp.h | 6 +-
  25. sysdeps/arc/configure | 80 +-
  26. sysdeps/arc/configure.ac | 36 +
  27. sysdeps/arc/dl-machine.h | 75 +-
  28. sysdeps/arc/dl-trampoline.S | 89 +-
  29. sysdeps/arc/fpu/math-use-builtins-fma.h | 18 +-
  30. sysdeps/arc/fpu/math-use-builtins-sqrt.h | 18 +-
  31. sysdeps/arc/isa-asm-macro-32.h | 61 +
  32. sysdeps/arc/isa-asm-macro-64.h | 86 ++
  33. sysdeps/arc/isa-asm-macros.h | 35 +
  34. sysdeps/arc/nofpu/libm-test-ulps | 1 +
  35. sysdeps/arc/nptl/pthreaddef.h | 2 +-
  36. sysdeps/arc/preconfigure | 18 +-
  37. sysdeps/arc/setjmp.S | 55 +-
  38. sysdeps/arc/sfp-machine.h | 55 +-
  39. sysdeps/arc/start.S | 14 +-
  40. sysdeps/arc/sysdep.h | 5 +-
  41. sysdeps/unix/sysv/linux/arc/Makefile | 8 +-
  42. sysdeps/unix/sysv/linux/arc/arc32/Implies | 1 +
  43. .../sysv/linux/arc/{ => arc32}/arch-syscall.h | 0
  44. .../sysv/linux/arc/{ => arc32}/c++-types.data | 0
  45. .../linux/arc/{ => arc32}/fixup-asm-unistd.h | 0
  46. .../sysv/linux/arc/{ => arc32}/ld.abilist | 0
  47. .../arc/{ => arc32}/libBrokenLocale.abilist | 0
  48. .../sysv/linux/arc/{ => arc32}/libanl.abilist | 0
  49. .../sysv/linux/arc/{ => arc32}/libc.abilist | 0
  50. .../arc/{ => arc32}/libc_malloc_debug.abilist | 0
  51. .../linux/arc/{ => arc32}/libcrypt.abilist | 0
  52. .../sysv/linux/arc/{ => arc32}/libdl.abilist | 0
  53. .../sysv/linux/arc/{ => arc32}/libm.abilist | 0
  54. .../linux/arc/{ => arc32}/libpthread.abilist | 0
  55. .../linux/arc/{ => arc32}/libresolv.abilist | 0
  56. .../sysv/linux/arc/{ => arc32}/librt.abilist | 0
  57. .../arc/{ => arc32}/libthread_db.abilist | 0
  58. .../linux/arc/{ => arc32}/libutil.abilist | 0
  59. sysdeps/unix/sysv/linux/arc/arc64/Implies | 2 +
  60. .../sysv/linux/arc/{ => arc64}/arch-syscall.h | 59 +-
  61. .../sysv/linux/arc/{ => arc64}/c++-types.data | 48 +-
  62. .../sysv/linux/arc/{ => arc64}/ld.abilist | 8 +-
  63. .../arc/{ => arc64}/libBrokenLocale.abilist | 0
  64. .../sysv/linux/arc/{ => arc64}/libanl.abilist | 0
  65. .../sysv/linux/arc/{ => arc64}/libc.abilist | 82 +-
  66. .../arc/{ => arc64}/libc_malloc_debug.abilist | 8 +-
  67. .../linux/arc/{ => arc64}/libcrypt.abilist | 0
  68. .../sysv/linux/arc/{ => arc64}/libdl.abilist | 0
  69. .../sysv/linux/arc/{ => arc64}/libm.abilist | 0
  70. .../linux/arc/{ => arc64}/libpthread.abilist | 0
  71. .../linux/arc/{ => arc64}/libresolv.abilist | 4 +-
  72. .../sysv/linux/arc/{ => arc64}/librt.abilist | 0
  73. .../arc/{ => arc64}/libthread_db.abilist | 0
  74. .../linux/arc/{ => arc64}/libutil.abilist | 0
  75. sysdeps/unix/sysv/linux/arc/bits/fcntl.h | 62 +
  76. .../sysv/linux/arc/bits/types/__sigset_t.h | 2 +-
  77. sysdeps/unix/sysv/linux/arc/clone.S | 30 +-
  78. sysdeps/unix/sysv/linux/arc/clone3.S | 14 +-
  79. sysdeps/unix/sysv/linux/arc/getcontext.S | 71 +-
  80. sysdeps/unix/sysv/linux/arc/setcontext.S | 88 +-
  81. sysdeps/unix/sysv/linux/arc/shlib-versions | 8 +
  82. sysdeps/unix/sysv/linux/arc/swapcontext.S | 129 +-
  83. sysdeps/unix/sysv/linux/arc/sys/ucontext.h | 1 +
  84. sysdeps/unix/sysv/linux/arc/syscall.S | 16 +-
  85. sysdeps/unix/sysv/linux/arc/sysdep.h | 16 +-
  86. sysdeps/unix/sysv/linux/arc/vfork.S | 4 +-
  87. timezone/zic.c | 2 +-
  88. 79 files changed, 2211 insertions(+), 390 deletions(-)
  89. mode change 100755 => 100644 scripts/config.sub
  90. create mode 100644 sysdeps/arc/arc32/Implies
  91. create mode 100644 sysdeps/arc/arc64/Implies
  92. create mode 100644 sysdeps/arc/arc64/fpu/libm-test-ulps
  93. create mode 100644 sysdeps/arc/arc64/fpu/libm-test-ulps-name
  94. copy sysdeps/arc/{ => arc64}/nofpu/libm-test-ulps (99%)
  95. create mode 100644 sysdeps/arc/arc64/nofpu/libm-test-ulps-name
  96. create mode 100644 sysdeps/arc/isa-asm-macro-32.h
  97. create mode 100644 sysdeps/arc/isa-asm-macro-64.h
  98. create mode 100644 sysdeps/arc/isa-asm-macros.h
  99. create mode 100644 sysdeps/unix/sysv/linux/arc/arc32/Implies
  100. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/arch-syscall.h (100%)
  101. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/c++-types.data (100%)
  102. rename sysdeps/unix/sysv/linux/arc/{ => arc32}/fixup-asm-unistd.h (100%)
  103. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/ld.abilist (100%)
  104. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libBrokenLocale.abilist (100%)
  105. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libanl.abilist (100%)
  106. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libc.abilist (100%)
  107. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libc_malloc_debug.abilist (100%)
  108. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libcrypt.abilist (100%)
  109. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libdl.abilist (100%)
  110. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libm.abilist (100%)
  111. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libpthread.abilist (100%)
  112. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libresolv.abilist (100%)
  113. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/librt.abilist (100%)
  114. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libthread_db.abilist (100%)
  115. copy sysdeps/unix/sysv/linux/arc/{ => arc32}/libutil.abilist (100%)
  116. create mode 100644 sysdeps/unix/sysv/linux/arc/arc64/Implies
  117. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/arch-syscall.h (89%)
  118. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/c++-types.data (73%)
  119. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/ld.abilist (54%)
  120. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libBrokenLocale.abilist (100%)
  121. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libanl.abilist (100%)
  122. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libc.abilist (97%)
  123. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libc_malloc_debug.abilist (80%)
  124. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libcrypt.abilist (100%)
  125. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libdl.abilist (100%)
  126. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libm.abilist (100%)
  127. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libpthread.abilist (100%)
  128. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libresolv.abilist (95%)
  129. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/librt.abilist (100%)
  130. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libthread_db.abilist (100%)
  131. rename sysdeps/unix/sysv/linux/arc/{ => arc64}/libutil.abilist (100%)
  132. create mode 100644 sysdeps/unix/sysv/linux/arc/bits/fcntl.h
  133. diff --git a/config.h.in b/config.h.in
  134. index 0dedc124f7..d69b4166c0 100644
  135. --- a/config.h.in
  136. +++ b/config.h.in
  137. @@ -120,6 +120,12 @@
  138. /* ARC big endian ABI */
  139. #undef HAVE_ARC_BE
  140. +/* ARC64:32 ABI */
  141. +#undef HAVE_ARC32
  142. +
  143. +/* ARC64:64 ABI */
  144. +#undef HAVE_ARC64
  145. +
  146. /* C-SKY ABI version. */
  147. #undef CSKYABI
  148. diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
  149. index 32a8bfcf74..68ffdb1c24 100644
  150. --- a/elf/dl-runtime.c
  151. +++ b/elf/dl-runtime.c
  152. @@ -42,7 +42,7 @@ _dl_fixup (
  153. # ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  154. ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  155. # endif
  156. - struct link_map *l, ElfW(Word) reloc_arg)
  157. + struct link_map *l, uintptr_t reloc_arg)
  158. {
  159. const ElfW(Sym) *const symtab
  160. = (const void *) D_PTR (l, l_info[DT_SYMTAB]);
  161. @@ -170,7 +170,7 @@ _dl_profile_fixup (
  162. #ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
  163. ELF_MACHINE_RUNTIME_FIXUP_ARGS,
  164. #endif
  165. - struct link_map *l, ElfW(Word) reloc_arg,
  166. + struct link_map *l, uintptr_t reloc_arg,
  167. ElfW(Addr) retaddr, void *regs, long int *framesizep)
  168. {
  169. void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = _dl_mcount;
  170. diff --git a/elf/elf.h b/elf/elf.h
  171. index 89fc8021e9..05cc75c631 100644
  172. --- a/elf/elf.h
  173. +++ b/elf/elf.h
  174. @@ -358,6 +358,8 @@ typedef struct
  175. #define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
  176. #define EM_CSKY 252 /* C-SKY */
  177. +#define EM_ARCV3 253 /* Synopsys ARCv3 64-bit ISA */
  178. +#define EM_ARCV3_32 255 /* Synopsys ARCv3 32-bit ISA */
  179. #define EM_LOONGARCH 258 /* LoongArch */
  180. #define EM_NUM 259
  181. @@ -4216,12 +4218,13 @@ enum
  182. /* Processor specific values for the Shdr sh_type field. */
  183. #define SHT_ARC_ATTRIBUTES (SHT_LOPROC + 1) /* ARC attributes section. */
  184. -/* ARCompact/ARCv2 specific relocs. */
  185. +/* ARCompact/ARCv2/ARCv3 specific relocs. */
  186. #define R_ARC_NONE 0x0
  187. #define R_ARC_8 0x1
  188. #define R_ARC_16 0x2
  189. #define R_ARC_24 0x3
  190. #define R_ARC_32 0x4
  191. +#define R_ARC_64 0x5
  192. #define R_ARC_B22_PCREL 0x6
  193. #define R_ARC_H30 0x7
  194. diff --git a/nptl/Makefile b/nptl/Makefile
  195. index ffa5722e48..c8b7674c27 100644
  196. --- a/nptl/Makefile
  197. +++ b/nptl/Makefile
  198. @@ -353,6 +353,7 @@ tests = \
  199. tst-thread-exit-clobber \
  200. tst-thread-setspecific \
  201. tst-thread_local1 \
  202. + tst-eintr1 \
  203. tst-tsd3 \
  204. tst-tsd4 \
  205. # tests
  206. @@ -397,10 +398,6 @@ tests-time64 := \
  207. tst-cancel4_2-time64
  208. # tests-time64
  209. -# This test can run into task limits because of a linux kernel bug
  210. -# and then cause the make process to fail too, see bug 24537.
  211. -xtests += tst-eintr1
  212. -
  213. test-srcs = tst-oddstacklimit
  214. gen-as-const-headers = unwindbuf.sym
  215. diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
  216. index 73ffc57c86..6f53c195cd 100755
  217. --- a/scripts/build-many-glibcs.py
  218. +++ b/scripts/build-many-glibcs.py
  219. @@ -172,6 +172,12 @@ class Context(object):
  220. self.add_config(arch='arceb',
  221. os_name='linux-gnu',
  222. gcc_cfg=['--disable-multilib', '--with-cpu=hs38'])
  223. + self.add_config(arch='arc64',
  224. + os_name='linux-gnu',
  225. + gcc_cfg=['--disable-multilib'])
  226. + self.add_config(arch='arc64',
  227. + os_name='linux-gnuhf',
  228. + gcc_cfg=['--disable-multilib', '--with-fpu=fpud'])
  229. self.add_config(arch='alpha',
  230. os_name='linux-gnu')
  231. self.add_config(arch='arm',
  232. diff --git a/scripts/config.sub b/scripts/config.sub
  233. old mode 100755
  234. new mode 100644
  235. index dba16e84c7..4d9a117c9c
  236. --- a/scripts/config.sub
  237. +++ b/scripts/config.sub
  238. @@ -1170,6 +1170,14 @@ case $cpu-$vendor in
  239. cpu=mipsallegrexel
  240. vendor=sony
  241. ;;
  242. + arc32*-*)
  243. + cpu=arc32
  244. + vendor=linux
  245. + ;;
  246. + arc64*-*)
  247. + cpu=arc64
  248. + vendor=linux
  249. + ;;
  250. tile*-*)
  251. basic_os=${basic_os:-linux-gnu}
  252. ;;
  253. diff --git a/sysdeps/arc/Implies b/sysdeps/arc/Implies
  254. index 780c4e2467..12ca48b4c9 100644
  255. --- a/sysdeps/arc/Implies
  256. +++ b/sysdeps/arc/Implies
  257. @@ -1,3 +1,2 @@
  258. -wordsize-32
  259. ieee754/flt-32
  260. ieee754/dbl-64
  261. diff --git a/sysdeps/arc/__longjmp.S b/sysdeps/arc/__longjmp.S
  262. index a57054bce0..920e535ffd 100644
  263. --- a/sysdeps/arc/__longjmp.S
  264. +++ b/sysdeps/arc/__longjmp.S
  265. @@ -24,25 +24,49 @@
  266. ENTRY (__longjmp)
  267. - LDR (blink, r0, 0)
  268. - LDR (sp, r0, 1)
  269. - LDR (fp, r0, 2)
  270. - LDR (gp, r0, 3)
  271. -
  272. - LDR (r13, r0, 4)
  273. - LDR (r14, r0, 5)
  274. - LDR (r15, r0, 6)
  275. - LDR (r16, r0, 7)
  276. - LDR (r17, r0, 8)
  277. - LDR (r18, r0, 9)
  278. - LDR (r19, r0, 10)
  279. - LDR (r20, r0, 11)
  280. - LDR (r21, r0, 12)
  281. - LDR (r22, r0, 13)
  282. - LDR (r23, r0, 14)
  283. - LDR (r24, r0, 15)
  284. -
  285. - mov.f r0, r1
  286. + LDR.as blink, r0, 0
  287. + LDR.as sp, r0, 1
  288. + LDR.as fp, r0, 2
  289. + LDR.as gp, r0, 3
  290. +
  291. + LDR.as r13, r0, 4
  292. + LDR.as r14, r0, 5
  293. + LDR.as r15, r0, 6
  294. + LDR.as r16, r0, 7
  295. + LDR.as r17, r0, 8
  296. + LDR.as r18, r0, 9
  297. + LDR.as r19, r0, 10
  298. + LDR.as r20, r0, 11
  299. + LDR.as r21, r0, 12
  300. + LDR.as r22, r0, 13
  301. + LDR.as r23, r0, 14
  302. + LDR.as r24, r0, 15
  303. +
  304. +#if defined(__ARCV3__)
  305. + LDR.as r25, r0, 16
  306. + LDR.as r26, r0, 17
  307. +#endif
  308. +
  309. +#if defined (__ARC_FLOAT_ABI_HARD__)
  310. + FLDR.as f16, r0, 18
  311. + FLDR.as f17, r0, 19
  312. + FLDR.as f18, r0, 20
  313. + FLDR.as f19, r0, 21
  314. + FLDR.as f20, r0, 22
  315. + FLDR.as f21, r0, 23
  316. + FLDR.as f22, r0, 24
  317. + FLDR.as f23, r0, 25
  318. + FLDR.as f24, r0, 26
  319. + FLDR.as f25, r0, 27
  320. + FLDR.as f26, r0, 28
  321. + FLDR.as f27, r0, 29
  322. + FLDR.as f28, r0, 30
  323. + FLDR.as f29, r0, 31
  324. + FLDR.as f30, r0, 32
  325. + FLDR.as f31, r0, 33
  326. +#endif
  327. +
  328. + MOVR.f r0, r1
  329. j.d [blink]
  330. mov.z r0, 1 /* don't return 0 to setjmp callsite from longjmp. */
  331. diff --git a/sysdeps/arc/arc32/Implies b/sysdeps/arc/arc32/Implies
  332. new file mode 100644
  333. index 0000000000..39a34c5f57
  334. --- /dev/null
  335. +++ b/sysdeps/arc/arc32/Implies
  336. @@ -0,0 +1 @@
  337. +wordsize-32
  338. diff --git a/sysdeps/arc/arc64/Implies b/sysdeps/arc/arc64/Implies
  339. new file mode 100644
  340. index 0000000000..a8cae95f9d
  341. --- /dev/null
  342. +++ b/sysdeps/arc/arc64/Implies
  343. @@ -0,0 +1 @@
  344. +wordsize-64
  345. diff --git a/sysdeps/arc/arc64/fpu/libm-test-ulps b/sysdeps/arc/arc64/fpu/libm-test-ulps
  346. new file mode 100644
  347. index 0000000000..f3b8753c4d
  348. --- /dev/null
  349. +++ b/sysdeps/arc/arc64/fpu/libm-test-ulps
  350. @@ -0,0 +1,1141 @@
  351. +# Begin of automatic generation
  352. +
  353. +# Maximal error of functions:
  354. +Function: "acos":
  355. +double: 1
  356. +float: 1
  357. +
  358. +Function: "acos_downward":
  359. +double: 1
  360. +float: 1
  361. +
  362. +Function: "acos_towardzero":
  363. +double: 1
  364. +float: 1
  365. +
  366. +Function: "acos_upward":
  367. +double: 1
  368. +float: 1
  369. +
  370. +Function: "acosh":
  371. +double: 2
  372. +float: 2
  373. +
  374. +Function: "acosh_downward":
  375. +double: 2
  376. +float: 2
  377. +
  378. +Function: "acosh_towardzero":
  379. +double: 2
  380. +float: 2
  381. +
  382. +Function: "acosh_upward":
  383. +double: 2
  384. +float: 2
  385. +
  386. +Function: "asin":
  387. +double: 1
  388. +float: 1
  389. +
  390. +Function: "asin_downward":
  391. +double: 1
  392. +float: 1
  393. +
  394. +Function: "asin_towardzero":
  395. +double: 1
  396. +float: 1
  397. +
  398. +Function: "asin_upward":
  399. +double: 2
  400. +float: 1
  401. +
  402. +Function: "asinh":
  403. +double: 2
  404. +float: 2
  405. +
  406. +Function: "asinh_downward":
  407. +double: 3
  408. +float: 3
  409. +
  410. +Function: "asinh_towardzero":
  411. +double: 2
  412. +float: 2
  413. +
  414. +Function: "asinh_upward":
  415. +double: 3
  416. +float: 3
  417. +
  418. +Function: "atan":
  419. +double: 1
  420. +float: 1
  421. +
  422. +Function: "atan2":
  423. +float: 1
  424. +
  425. +Function: "atan2_downward":
  426. +double: 1
  427. +float: 2
  428. +
  429. +Function: "atan2_towardzero":
  430. +double: 1
  431. +float: 2
  432. +
  433. +Function: "atan2_upward":
  434. +double: 1
  435. +float: 1
  436. +
  437. +Function: "atan_downward":
  438. +double: 1
  439. +float: 2
  440. +
  441. +Function: "atan_towardzero":
  442. +double: 1
  443. +float: 1
  444. +
  445. +Function: "atan_upward":
  446. +double: 1
  447. +float: 2
  448. +
  449. +Function: "atanh":
  450. +double: 2
  451. +float: 2
  452. +
  453. +Function: "atanh_downward":
  454. +double: 3
  455. +float: 3
  456. +
  457. +Function: "atanh_towardzero":
  458. +double: 2
  459. +float: 2
  460. +
  461. +Function: "atanh_upward":
  462. +double: 3
  463. +float: 3
  464. +
  465. +Function: "cabs":
  466. +double: 1
  467. +
  468. +Function: "cabs_downward":
  469. +double: 1
  470. +
  471. +Function: "cabs_towardzero":
  472. +double: 1
  473. +
  474. +Function: "cabs_upward":
  475. +double: 1
  476. +float: 1
  477. +
  478. +Function: Real part of "cacos":
  479. +double: 1
  480. +float: 2
  481. +
  482. +Function: Imaginary part of "cacos":
  483. +double: 2
  484. +float: 2
  485. +
  486. +Function: Real part of "cacos_downward":
  487. +double: 3
  488. +float: 2
  489. +
  490. +Function: Imaginary part of "cacos_downward":
  491. +double: 5
  492. +float: 3
  493. +
  494. +Function: Real part of "cacos_towardzero":
  495. +double: 3
  496. +float: 2
  497. +
  498. +Function: Imaginary part of "cacos_towardzero":
  499. +double: 4
  500. +float: 2
  501. +
  502. +Function: Real part of "cacos_upward":
  503. +double: 2
  504. +float: 2
  505. +
  506. +Function: Imaginary part of "cacos_upward":
  507. +double: 5
  508. +float: 5
  509. +
  510. +Function: Real part of "cacosh":
  511. +double: 2
  512. +float: 2
  513. +
  514. +Function: Imaginary part of "cacosh":
  515. +double: 1
  516. +float: 2
  517. +
  518. +Function: Real part of "cacosh_downward":
  519. +double: 4
  520. +float: 2
  521. +
  522. +Function: Imaginary part of "cacosh_downward":
  523. +double: 3
  524. +float: 3
  525. +
  526. +Function: Real part of "cacosh_towardzero":
  527. +double: 4
  528. +float: 2
  529. +
  530. +Function: Imaginary part of "cacosh_towardzero":
  531. +double: 3
  532. +float: 2
  533. +
  534. +Function: Real part of "cacosh_upward":
  535. +double: 4
  536. +float: 3
  537. +
  538. +Function: Imaginary part of "cacosh_upward":
  539. +double: 3
  540. +float: 2
  541. +
  542. +Function: "carg":
  543. +float: 1
  544. +
  545. +Function: "carg_downward":
  546. +double: 1
  547. +float: 2
  548. +
  549. +Function: "carg_towardzero":
  550. +double: 1
  551. +float: 2
  552. +
  553. +Function: "carg_upward":
  554. +double: 1
  555. +float: 1
  556. +
  557. +Function: Real part of "casin":
  558. +double: 1
  559. +float: 1
  560. +
  561. +Function: Imaginary part of "casin":
  562. +double: 2
  563. +float: 2
  564. +
  565. +Function: Real part of "casin_downward":
  566. +double: 3
  567. +float: 2
  568. +
  569. +Function: Imaginary part of "casin_downward":
  570. +double: 5
  571. +float: 3
  572. +
  573. +Function: Real part of "casin_towardzero":
  574. +double: 3
  575. +float: 1
  576. +
  577. +Function: Imaginary part of "casin_towardzero":
  578. +double: 4
  579. +float: 2
  580. +
  581. +Function: Real part of "casin_upward":
  582. +double: 3
  583. +float: 2
  584. +
  585. +Function: Imaginary part of "casin_upward":
  586. +double: 5
  587. +float: 5
  588. +
  589. +Function: Real part of "casinh":
  590. +double: 2
  591. +float: 2
  592. +
  593. +Function: Imaginary part of "casinh":
  594. +double: 1
  595. +float: 1
  596. +
  597. +Function: Real part of "casinh_downward":
  598. +double: 5
  599. +float: 3
  600. +
  601. +Function: Imaginary part of "casinh_downward":
  602. +double: 3
  603. +float: 2
  604. +
  605. +Function: Real part of "casinh_towardzero":
  606. +double: 4
  607. +float: 2
  608. +
  609. +Function: Imaginary part of "casinh_towardzero":
  610. +double: 3
  611. +float: 1
  612. +
  613. +Function: Real part of "casinh_upward":
  614. +double: 5
  615. +float: 5
  616. +
  617. +Function: Imaginary part of "casinh_upward":
  618. +double: 3
  619. +float: 2
  620. +
  621. +Function: Real part of "catan":
  622. +double: 1
  623. +float: 1
  624. +
  625. +Function: Imaginary part of "catan":
  626. +double: 1
  627. +float: 1
  628. +
  629. +Function: Real part of "catan_downward":
  630. +double: 1
  631. +float: 2
  632. +
  633. +Function: Imaginary part of "catan_downward":
  634. +double: 2
  635. +float: 2
  636. +
  637. +Function: Real part of "catan_towardzero":
  638. +double: 1
  639. +float: 2
  640. +
  641. +Function: Imaginary part of "catan_towardzero":
  642. +double: 2
  643. +float: 2
  644. +
  645. +Function: Real part of "catan_upward":
  646. +double: 1
  647. +float: 1
  648. +
  649. +Function: Imaginary part of "catan_upward":
  650. +double: 2
  651. +float: 2
  652. +
  653. +Function: Real part of "catanh":
  654. +double: 1
  655. +float: 1
  656. +
  657. +Function: Imaginary part of "catanh":
  658. +double: 1
  659. +float: 1
  660. +
  661. +Function: Real part of "catanh_downward":
  662. +double: 2
  663. +float: 2
  664. +
  665. +Function: Imaginary part of "catanh_downward":
  666. +double: 1
  667. +float: 2
  668. +
  669. +Function: Real part of "catanh_towardzero":
  670. +double: 2
  671. +float: 2
  672. +
  673. +Function: Imaginary part of "catanh_towardzero":
  674. +double: 1
  675. +float: 2
  676. +
  677. +Function: Real part of "catanh_upward":
  678. +double: 4
  679. +float: 4
  680. +
  681. +Function: Imaginary part of "catanh_upward":
  682. +double: 1
  683. +float: 1
  684. +
  685. +Function: "cbrt":
  686. +double: 4
  687. +float: 1
  688. +
  689. +Function: "cbrt_downward":
  690. +double: 4
  691. +float: 1
  692. +
  693. +Function: "cbrt_towardzero":
  694. +double: 3
  695. +float: 1
  696. +
  697. +Function: "cbrt_upward":
  698. +double: 5
  699. +float: 1
  700. +
  701. +Function: Real part of "ccos":
  702. +double: 1
  703. +float: 1
  704. +
  705. +Function: Imaginary part of "ccos":
  706. +double: 1
  707. +float: 1
  708. +
  709. +Function: Real part of "ccos_downward":
  710. +double: 1
  711. +float: 1
  712. +
  713. +Function: Imaginary part of "ccos_downward":
  714. +double: 3
  715. +float: 3
  716. +
  717. +Function: Real part of "ccos_towardzero":
  718. +double: 1
  719. +float: 2
  720. +
  721. +Function: Imaginary part of "ccos_towardzero":
  722. +double: 3
  723. +float: 3
  724. +
  725. +Function: Real part of "ccos_upward":
  726. +double: 1
  727. +float: 2
  728. +
  729. +Function: Imaginary part of "ccos_upward":
  730. +double: 2
  731. +float: 2
  732. +
  733. +Function: Real part of "ccosh":
  734. +double: 1
  735. +float: 1
  736. +
  737. +Function: Imaginary part of "ccosh":
  738. +double: 1
  739. +float: 1
  740. +
  741. +Function: Real part of "ccosh_downward":
  742. +double: 2
  743. +float: 2
  744. +
  745. +Function: Imaginary part of "ccosh_downward":
  746. +double: 3
  747. +float: 3
  748. +
  749. +Function: Real part of "ccosh_towardzero":
  750. +double: 2
  751. +float: 3
  752. +
  753. +Function: Imaginary part of "ccosh_towardzero":
  754. +double: 3
  755. +float: 3
  756. +
  757. +Function: Real part of "ccosh_upward":
  758. +double: 1
  759. +float: 2
  760. +
  761. +Function: Imaginary part of "ccosh_upward":
  762. +double: 2
  763. +float: 2
  764. +
  765. +Function: Real part of "cexp":
  766. +double: 2
  767. +float: 1
  768. +
  769. +Function: Imaginary part of "cexp":
  770. +double: 1
  771. +float: 2
  772. +
  773. +Function: Real part of "cexp_downward":
  774. +double: 2
  775. +float: 2
  776. +
  777. +Function: Imaginary part of "cexp_downward":
  778. +double: 3
  779. +float: 3
  780. +
  781. +Function: Real part of "cexp_towardzero":
  782. +double: 2
  783. +float: 2
  784. +
  785. +Function: Imaginary part of "cexp_towardzero":
  786. +double: 3
  787. +float: 3
  788. +
  789. +Function: Real part of "cexp_upward":
  790. +double: 2
  791. +float: 2
  792. +
  793. +Function: Imaginary part of "cexp_upward":
  794. +double: 3
  795. +float: 2
  796. +
  797. +Function: Real part of "clog":
  798. +double: 3
  799. +float: 3
  800. +
  801. +Function: Imaginary part of "clog":
  802. +double: 1
  803. +float: 1
  804. +
  805. +Function: Real part of "clog10":
  806. +double: 3
  807. +float: 4
  808. +
  809. +Function: Imaginary part of "clog10":
  810. +double: 2
  811. +float: 2
  812. +
  813. +Function: Real part of "clog10_downward":
  814. +double: 5
  815. +float: 5
  816. +
  817. +Function: Imaginary part of "clog10_downward":
  818. +double: 2
  819. +float: 4
  820. +
  821. +Function: Real part of "clog10_towardzero":
  822. +double: 5
  823. +float: 6
  824. +
  825. +Function: Imaginary part of "clog10_towardzero":
  826. +double: 2
  827. +float: 4
  828. +
  829. +Function: Real part of "clog10_upward":
  830. +double: 6
  831. +float: 5
  832. +
  833. +Function: Imaginary part of "clog10_upward":
  834. +double: 2
  835. +float: 4
  836. +
  837. +Function: Real part of "clog_downward":
  838. +double: 4
  839. +float: 3
  840. +
  841. +Function: Imaginary part of "clog_downward":
  842. +double: 1
  843. +float: 2
  844. +
  845. +Function: Real part of "clog_towardzero":
  846. +double: 4
  847. +float: 4
  848. +
  849. +Function: Imaginary part of "clog_towardzero":
  850. +double: 1
  851. +float: 3
  852. +
  853. +Function: Real part of "clog_upward":
  854. +double: 4
  855. +float: 3
  856. +
  857. +Function: Imaginary part of "clog_upward":
  858. +double: 1
  859. +float: 2
  860. +
  861. +Function: "cos":
  862. +double: 1
  863. +float: 1
  864. +
  865. +Function: "cos_downward":
  866. +double: 1
  867. +float: 1
  868. +
  869. +Function: "cos_towardzero":
  870. +double: 1
  871. +float: 1
  872. +
  873. +Function: "cos_upward":
  874. +double: 1
  875. +float: 1
  876. +
  877. +Function: "cosh":
  878. +double: 2
  879. +float: 2
  880. +
  881. +Function: "cosh_downward":
  882. +double: 3
  883. +float: 2
  884. +
  885. +Function: "cosh_towardzero":
  886. +double: 3
  887. +float: 2
  888. +
  889. +Function: "cosh_upward":
  890. +double: 2
  891. +float: 2
  892. +
  893. +Function: Real part of "cpow":
  894. +double: 2
  895. +float: 5
  896. +
  897. +Function: Imaginary part of "cpow":
  898. +float: 2
  899. +
  900. +Function: Real part of "cpow_downward":
  901. +double: 5
  902. +float: 8
  903. +
  904. +Function: Imaginary part of "cpow_downward":
  905. +double: 1
  906. +float: 2
  907. +
  908. +Function: Real part of "cpow_towardzero":
  909. +double: 5
  910. +float: 8
  911. +
  912. +Function: Imaginary part of "cpow_towardzero":
  913. +double: 1
  914. +float: 2
  915. +
  916. +Function: Real part of "cpow_upward":
  917. +double: 4
  918. +float: 1
  919. +
  920. +Function: Imaginary part of "cpow_upward":
  921. +double: 1
  922. +float: 2
  923. +
  924. +Function: Real part of "csin":
  925. +double: 1
  926. +float: 1
  927. +
  928. +Function: Real part of "csin_downward":
  929. +double: 3
  930. +float: 3
  931. +
  932. +Function: Imaginary part of "csin_downward":
  933. +double: 1
  934. +float: 1
  935. +
  936. +Function: Real part of "csin_towardzero":
  937. +double: 3
  938. +float: 3
  939. +
  940. +Function: Imaginary part of "csin_towardzero":
  941. +double: 1
  942. +float: 1
  943. +
  944. +Function: Real part of "csin_upward":
  945. +double: 2
  946. +float: 2
  947. +
  948. +Function: Imaginary part of "csin_upward":
  949. +double: 1
  950. +float: 2
  951. +
  952. +Function: Real part of "csinh":
  953. +float: 1
  954. +
  955. +Function: Imaginary part of "csinh":
  956. +double: 1
  957. +float: 1
  958. +
  959. +Function: Real part of "csinh_downward":
  960. +double: 2
  961. +float: 1
  962. +
  963. +Function: Imaginary part of "csinh_downward":
  964. +double: 3
  965. +float: 3
  966. +
  967. +Function: Real part of "csinh_towardzero":
  968. +double: 2
  969. +float: 2
  970. +
  971. +Function: Imaginary part of "csinh_towardzero":
  972. +double: 3
  973. +float: 3
  974. +
  975. +Function: Real part of "csinh_upward":
  976. +double: 1
  977. +float: 2
  978. +
  979. +Function: Imaginary part of "csinh_upward":
  980. +double: 2
  981. +float: 2
  982. +
  983. +Function: Real part of "csqrt":
  984. +double: 2
  985. +float: 2
  986. +
  987. +Function: Imaginary part of "csqrt":
  988. +double: 2
  989. +float: 2
  990. +
  991. +Function: Real part of "csqrt_downward":
  992. +double: 5
  993. +float: 4
  994. +
  995. +Function: Imaginary part of "csqrt_downward":
  996. +double: 4
  997. +float: 3
  998. +
  999. +Function: Real part of "csqrt_towardzero":
  1000. +double: 4
  1001. +float: 3
  1002. +
  1003. +Function: Imaginary part of "csqrt_towardzero":
  1004. +double: 4
  1005. +float: 3
  1006. +
  1007. +Function: Real part of "csqrt_upward":
  1008. +double: 5
  1009. +float: 4
  1010. +
  1011. +Function: Imaginary part of "csqrt_upward":
  1012. +double: 3
  1013. +float: 3
  1014. +
  1015. +Function: Real part of "ctan":
  1016. +double: 1
  1017. +float: 1
  1018. +
  1019. +Function: Imaginary part of "ctan":
  1020. +double: 2
  1021. +float: 2
  1022. +
  1023. +Function: Real part of "ctan_downward":
  1024. +double: 6
  1025. +float: 5
  1026. +
  1027. +Function: Imaginary part of "ctan_downward":
  1028. +double: 2
  1029. +float: 2
  1030. +
  1031. +Function: Real part of "ctan_towardzero":
  1032. +double: 5
  1033. +float: 2
  1034. +
  1035. +Function: Imaginary part of "ctan_towardzero":
  1036. +double: 2
  1037. +float: 2
  1038. +
  1039. +Function: Real part of "ctan_upward":
  1040. +double: 2
  1041. +float: 4
  1042. +
  1043. +Function: Imaginary part of "ctan_upward":
  1044. +double: 1
  1045. +float: 2
  1046. +
  1047. +Function: Real part of "ctanh":
  1048. +double: 2
  1049. +float: 2
  1050. +
  1051. +Function: Imaginary part of "ctanh":
  1052. +double: 2
  1053. +float: 2
  1054. +
  1055. +Function: Real part of "ctanh_downward":
  1056. +double: 2
  1057. +float: 2
  1058. +
  1059. +Function: Imaginary part of "ctanh_downward":
  1060. +double: 6
  1061. +float: 5
  1062. +
  1063. +Function: Real part of "ctanh_towardzero":
  1064. +double: 2
  1065. +float: 2
  1066. +
  1067. +Function: Imaginary part of "ctanh_towardzero":
  1068. +double: 5
  1069. +float: 2
  1070. +
  1071. +Function: Real part of "ctanh_upward":
  1072. +double: 1
  1073. +float: 2
  1074. +
  1075. +Function: Imaginary part of "ctanh_upward":
  1076. +double: 3
  1077. +float: 3
  1078. +
  1079. +Function: "erf":
  1080. +double: 1
  1081. +float: 1
  1082. +
  1083. +Function: "erf_downward":
  1084. +double: 1
  1085. +float: 1
  1086. +
  1087. +Function: "erf_towardzero":
  1088. +double: 1
  1089. +float: 1
  1090. +
  1091. +Function: "erf_upward":
  1092. +double: 1
  1093. +float: 1
  1094. +
  1095. +Function: "erfc":
  1096. +double: 3
  1097. +float: 3
  1098. +
  1099. +Function: "erfc_downward":
  1100. +double: 4
  1101. +float: 4
  1102. +
  1103. +Function: "erfc_towardzero":
  1104. +double: 3
  1105. +float: 3
  1106. +
  1107. +Function: "erfc_upward":
  1108. +double: 4
  1109. +float: 4
  1110. +
  1111. +Function: "exp":
  1112. +double: 1
  1113. +float: 1
  1114. +
  1115. +Function: "exp10":
  1116. +double: 2
  1117. +float: 1
  1118. +
  1119. +Function: "exp10_downward":
  1120. +double: 3
  1121. +float: 1
  1122. +
  1123. +Function: "exp10_towardzero":
  1124. +double: 3
  1125. +float: 1
  1126. +
  1127. +Function: "exp10_upward":
  1128. +double: 2
  1129. +float: 1
  1130. +
  1131. +Function: "exp2":
  1132. +double: 1
  1133. +
  1134. +Function: "exp2_downward":
  1135. +double: 1
  1136. +float: 1
  1137. +
  1138. +Function: "exp2_towardzero":
  1139. +double: 1
  1140. +float: 1
  1141. +
  1142. +Function: "exp2_upward":
  1143. +double: 1
  1144. +float: 1
  1145. +
  1146. +Function: "exp_downward":
  1147. +double: 1
  1148. +float: 1
  1149. +
  1150. +Function: "exp_towardzero":
  1151. +double: 1
  1152. +float: 1
  1153. +
  1154. +Function: "exp_upward":
  1155. +double: 1
  1156. +float: 1
  1157. +
  1158. +Function: "expm1":
  1159. +double: 1
  1160. +float: 1
  1161. +
  1162. +Function: "expm1_downward":
  1163. +double: 1
  1164. +float: 1
  1165. +
  1166. +Function: "expm1_towardzero":
  1167. +double: 1
  1168. +float: 2
  1169. +
  1170. +Function: "expm1_upward":
  1171. +double: 1
  1172. +float: 1
  1173. +
  1174. +Function: "gamma":
  1175. +double: 4
  1176. +float: 7
  1177. +
  1178. +Function: "gamma_downward":
  1179. +double: 4
  1180. +float: 4
  1181. +
  1182. +Function: "gamma_towardzero":
  1183. +double: 4
  1184. +float: 3
  1185. +
  1186. +Function: "gamma_upward":
  1187. +double: 4
  1188. +float: 5
  1189. +
  1190. +Function: "hypot":
  1191. +double: 1
  1192. +float: 1
  1193. +
  1194. +Function: "hypot_downward":
  1195. +double: 1
  1196. +float: 1
  1197. +
  1198. +Function: "hypot_towardzero":
  1199. +double: 1
  1200. +float: 1
  1201. +
  1202. +Function: "hypot_upward":
  1203. +double: 1
  1204. +float: 1
  1205. +
  1206. +Function: "j0":
  1207. +double: 4
  1208. +float: 9
  1209. +
  1210. +Function: "j0_downward":
  1211. +double: 6
  1212. +float: 8
  1213. +
  1214. +Function: "j0_towardzero":
  1215. +double: 4
  1216. +float: 9
  1217. +
  1218. +Function: "j0_upward":
  1219. +double: 4
  1220. +float: 9
  1221. +
  1222. +Function: "j1":
  1223. +double: 3
  1224. +float: 9
  1225. +
  1226. +Function: "j1_downward":
  1227. +double: 9
  1228. +float: 9
  1229. +
  1230. +Function: "j1_towardzero":
  1231. +double: 5
  1232. +float: 9
  1233. +
  1234. +Function: "j1_upward":
  1235. +double: 5
  1236. +float: 8
  1237. +
  1238. +Function: "jn":
  1239. +double: 4
  1240. +float: 4
  1241. +
  1242. +Function: "jn_downward":
  1243. +double: 4
  1244. +float: 5
  1245. +
  1246. +Function: "jn_towardzero":
  1247. +double: 4
  1248. +float: 5
  1249. +
  1250. +Function: "jn_upward":
  1251. +double: 5
  1252. +float: 5
  1253. +
  1254. +Function: "lgamma":
  1255. +double: 4
  1256. +float: 7
  1257. +
  1258. +Function: "lgamma_downward":
  1259. +double: 4
  1260. +float: 4
  1261. +
  1262. +Function: "lgamma_towardzero":
  1263. +double: 4
  1264. +float: 3
  1265. +
  1266. +Function: "lgamma_upward":
  1267. +double: 4
  1268. +float: 5
  1269. +
  1270. +Function: "log":
  1271. +double: 1
  1272. +
  1273. +Function: "log10":
  1274. +double: 2
  1275. +float: 2
  1276. +
  1277. +Function: "log10_downward":
  1278. +double: 2
  1279. +float: 3
  1280. +
  1281. +Function: "log10_towardzero":
  1282. +double: 2
  1283. +float: 2
  1284. +
  1285. +Function: "log10_upward":
  1286. +double: 2
  1287. +float: 2
  1288. +
  1289. +Function: "log1p":
  1290. +double: 1
  1291. +float: 1
  1292. +
  1293. +Function: "log1p_downward":
  1294. +double: 1
  1295. +float: 2
  1296. +
  1297. +Function: "log1p_towardzero":
  1298. +double: 2
  1299. +float: 2
  1300. +
  1301. +Function: "log1p_upward":
  1302. +double: 2
  1303. +float: 2
  1304. +
  1305. +Function: "log2":
  1306. +double: 2
  1307. +float: 1
  1308. +
  1309. +Function: "log2_downward":
  1310. +double: 1
  1311. +float: 1
  1312. +
  1313. +Function: "log2_towardzero":
  1314. +double: 1
  1315. +float: 1
  1316. +
  1317. +Function: "log2_upward":
  1318. +double: 1
  1319. +float: 1
  1320. +
  1321. +Function: "log_downward":
  1322. +double: 1
  1323. +float: 1
  1324. +
  1325. +Function: "log_towardzero":
  1326. +double: 1
  1327. +float: 1
  1328. +
  1329. +Function: "log_upward":
  1330. +double: 1
  1331. +float: 1
  1332. +
  1333. +Function: "pow":
  1334. +double: 1
  1335. +
  1336. +Function: "pow_downward":
  1337. +double: 1
  1338. +float: 1
  1339. +
  1340. +Function: "pow_towardzero":
  1341. +double: 1
  1342. +float: 1
  1343. +
  1344. +Function: "pow_upward":
  1345. +double: 1
  1346. +float: 1
  1347. +
  1348. +Function: "sin":
  1349. +double: 1
  1350. +float: 1
  1351. +
  1352. +Function: "sin_downward":
  1353. +double: 1
  1354. +float: 1
  1355. +
  1356. +Function: "sin_towardzero":
  1357. +double: 1
  1358. +float: 1
  1359. +
  1360. +Function: "sin_upward":
  1361. +double: 1
  1362. +float: 1
  1363. +
  1364. +Function: "sincos":
  1365. +double: 1
  1366. +float: 1
  1367. +
  1368. +Function: "sincos_downward":
  1369. +double: 1
  1370. +float: 1
  1371. +
  1372. +Function: "sincos_towardzero":
  1373. +double: 1
  1374. +float: 1
  1375. +
  1376. +Function: "sincos_upward":
  1377. +double: 1
  1378. +float: 1
  1379. +
  1380. +Function: "sinh":
  1381. +double: 2
  1382. +float: 2
  1383. +
  1384. +Function: "sinh_downward":
  1385. +double: 3
  1386. +float: 3
  1387. +
  1388. +Function: "sinh_towardzero":
  1389. +double: 3
  1390. +float: 2
  1391. +
  1392. +Function: "sinh_upward":
  1393. +double: 3
  1394. +float: 3
  1395. +
  1396. +Function: "tan":
  1397. +float: 1
  1398. +
  1399. +Function: "tan_downward":
  1400. +double: 1
  1401. +float: 2
  1402. +
  1403. +Function: "tan_towardzero":
  1404. +double: 1
  1405. +float: 1
  1406. +
  1407. +Function: "tan_upward":
  1408. +double: 1
  1409. +float: 1
  1410. +
  1411. +Function: "tanh":
  1412. +double: 2
  1413. +float: 2
  1414. +
  1415. +Function: "tanh_downward":
  1416. +double: 3
  1417. +float: 3
  1418. +
  1419. +Function: "tanh_towardzero":
  1420. +double: 2
  1421. +float: 2
  1422. +
  1423. +Function: "tanh_upward":
  1424. +double: 3
  1425. +float: 3
  1426. +
  1427. +Function: "tgamma":
  1428. +double: 9
  1429. +float: 8
  1430. +
  1431. +Function: "tgamma_downward":
  1432. +double: 9
  1433. +float: 7
  1434. +
  1435. +Function: "tgamma_towardzero":
  1436. +double: 9
  1437. +float: 7
  1438. +
  1439. +Function: "tgamma_upward":
  1440. +double: 8
  1441. +float: 8
  1442. +
  1443. +Function: "y0":
  1444. +double: 3
  1445. +float: 8
  1446. +
  1447. +Function: "y0_downward":
  1448. +double: 3
  1449. +float: 8
  1450. +
  1451. +Function: "y0_towardzero":
  1452. +double: 3
  1453. +float: 8
  1454. +
  1455. +Function: "y0_upward":
  1456. +double: 2
  1457. +float: 8
  1458. +
  1459. +Function: "y1":
  1460. +double: 3
  1461. +float: 9
  1462. +
  1463. +Function: "y1_downward":
  1464. +double: 6
  1465. +float: 8
  1466. +
  1467. +Function: "y1_towardzero":
  1468. +double: 3
  1469. +float: 9
  1470. +
  1471. +Function: "y1_upward":
  1472. +double: 6
  1473. +float: 9
  1474. +
  1475. +Function: "yn":
  1476. +double: 3
  1477. +float: 3
  1478. +
  1479. +Function: "yn_downward":
  1480. +double: 3
  1481. +float: 4
  1482. +
  1483. +Function: "yn_towardzero":
  1484. +double: 3
  1485. +float: 3
  1486. +
  1487. +Function: "yn_upward":
  1488. +double: 4
  1489. +float: 5
  1490. +
  1491. +# end of automatic generation
  1492. diff --git a/sysdeps/arc/arc64/fpu/libm-test-ulps-name b/sysdeps/arc/arc64/fpu/libm-test-ulps-name
  1493. new file mode 100644
  1494. index 0000000000..8c4fba4f9a
  1495. --- /dev/null
  1496. +++ b/sysdeps/arc/arc64/fpu/libm-test-ulps-name
  1497. @@ -0,0 +1 @@
  1498. +ARC
  1499. diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/arc64/nofpu/libm-test-ulps
  1500. similarity index 99%
  1501. copy from sysdeps/arc/nofpu/libm-test-ulps
  1502. copy to sysdeps/arc/arc64/nofpu/libm-test-ulps
  1503. index 6ac2830b25..26632ff8f2 100644
  1504. --- a/sysdeps/arc/nofpu/libm-test-ulps
  1505. +++ b/sysdeps/arc/arc64/nofpu/libm-test-ulps
  1506. @@ -205,6 +205,7 @@ float: 7
  1507. Function: "hypot":
  1508. double: 1
  1509. +float: 1
  1510. Function: "j0":
  1511. double: 2
  1512. diff --git a/sysdeps/arc/arc64/nofpu/libm-test-ulps-name b/sysdeps/arc/arc64/nofpu/libm-test-ulps-name
  1513. new file mode 100644
  1514. index 0000000000..8a9879ebd6
  1515. --- /dev/null
  1516. +++ b/sysdeps/arc/arc64/nofpu/libm-test-ulps-name
  1517. @@ -0,0 +1 @@
  1518. +ARC soft-float
  1519. diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h
  1520. index 6ac3d87dd9..f1565b317b 100644
  1521. --- a/sysdeps/arc/atomic-machine.h
  1522. +++ b/sysdeps/arc/atomic-machine.h
  1523. @@ -19,7 +19,23 @@
  1524. #ifndef _ARC_BITS_ATOMIC_H
  1525. #define _ARC_BITS_ATOMIC_H 1
  1526. -#define __HAVE_64B_ATOMICS 0
  1527. +#include <stdint.h>
  1528. +
  1529. +typedef int32_t atomic32_t;
  1530. +typedef uint32_t uatomic32_t;
  1531. +typedef int64_t atomic64_t;
  1532. +typedef uint64_t uatomic64_t;
  1533. +
  1534. +typedef intptr_t atomicptr_t;
  1535. +typedef uintptr_t uatomicptr_t;
  1536. +typedef intmax_t atomic_max_t;
  1537. +typedef uintmax_t uatomic_max_t;
  1538. +
  1539. +# if defined(__ARC64_ARCH64__)
  1540. +# define __HAVE_64B_ATOMICS 1
  1541. +# else
  1542. +# define __HAVE_64B_ATOMICS 0
  1543. +# endif
  1544. #define USE_ATOMIC_COMPILER_BUILTINS 1
  1545. /* ARC does have legacy atomic EX reg, [mem] instruction but the micro-arch
  1546. @@ -30,15 +46,16 @@
  1547. (abort (), 0)
  1548. #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \
  1549. (abort (), 0)
  1550. -#define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
  1551. - (abort (), 0)
  1552. +
  1553. +# if !defined(__ARC64__)
  1554. +# define __arch_compare_and_exchange_bool_64_acq(mem, newval, oldval) \
  1555. + (abort (), 0)
  1556. +#endif
  1557. #define __arch_compare_and_exchange_val_8_int(mem, newval, oldval, model) \
  1558. (abort (), (__typeof (*mem)) 0)
  1559. #define __arch_compare_and_exchange_val_16_int(mem, newval, oldval, model) \
  1560. (abort (), (__typeof (*mem)) 0)
  1561. -#define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
  1562. - (abort (), (__typeof (*mem)) 0)
  1563. #define __arch_compare_and_exchange_val_32_int(mem, newval, oldval, model) \
  1564. ({ \
  1565. @@ -48,6 +65,20 @@
  1566. __oldval; \
  1567. })
  1568. +# if defined(__ARC64__)
  1569. +# define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
  1570. + ({ \
  1571. + typeof (*mem) __oldval = (oldval); \
  1572. + __atomic_compare_exchange_n (mem, (void *) &__oldval, newval, 0, \
  1573. + model, __ATOMIC_RELAXED); \
  1574. + __oldval; \
  1575. + })
  1576. +# else
  1577. +/* ARCv2 has LOCKD/SCOND but not sure if gcc atomic builtins exist. */
  1578. +# define __arch_compare_and_exchange_val_64_int(mem, newval, oldval, model) \
  1579. + (abort (), (__typeof (*mem)) 0)
  1580. +#endif
  1581. +
  1582. #define atomic_compare_and_exchange_val_acq(mem, new, old) \
  1583. __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
  1584. mem, new, old, __ATOMIC_ACQUIRE)
  1585. diff --git a/sysdeps/arc/bits/setjmp.h b/sysdeps/arc/bits/setjmp.h
  1586. index d1604cde1f..2ca85a679d 100644
  1587. --- a/sysdeps/arc/bits/setjmp.h
  1588. +++ b/sysdeps/arc/bits/setjmp.h
  1589. @@ -20,7 +20,11 @@
  1590. #define _ARC_BITS_SETJMP_H 1
  1591. /* Saves r13-r25 (callee-saved), fp (frame pointer), sp (stack pointer),
  1592. - blink (branch-n-link). */
  1593. + blink (branch-n-link), FP regs. */
  1594. +#if defined (__ARC_FLOAT_ABI_HARD__)
  1595. +typedef long int __jmp_buf[64];
  1596. +#else
  1597. typedef long int __jmp_buf[32];
  1598. +#endif
  1599. #endif
  1600. diff --git a/sysdeps/arc/configure b/sysdeps/arc/configure
  1601. index 7b27e26490..d7b19db793 100644
  1602. --- a/sysdeps/arc/configure
  1603. +++ b/sysdeps/arc/configure
  1604. @@ -10,7 +10,7 @@ libc_cv_asm_line_sep='`'
  1605. printf "%s\n" "#define ASM_LINE_SEP $libc_cv_asm_line_sep" >>confdefs.h
  1606. -# For big endian ABI, generate a symbol for selecting right dynamic linker
  1607. +# For arc64:64 generate a symbol for selecting right dynamic linker
  1608. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
  1609. @@ -155,6 +155,77 @@ printf "%s\n" "$ac_cv_path_EGREP" >&6; }
  1610. EGREP="$ac_cv_path_EGREP"
  1611. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for arc64" >&5
  1612. +printf %s "checking for arc64... " >&6; }
  1613. +if test ${libc_cv_arc64+y}
  1614. +then :
  1615. + printf %s "(cached) " >&6
  1616. +else $as_nop
  1617. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1618. +/* end confdefs.h. */
  1619. +#ifdef __ARC64_ARCH64__
  1620. + yes
  1621. + #endif
  1622. +
  1623. +_ACEOF
  1624. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1625. + $EGREP "yes" >/dev/null 2>&1
  1626. +then :
  1627. + libc_cv_arc64=yes
  1628. +else $as_nop
  1629. + libc_cv_arc64=no
  1630. +fi
  1631. +rm -rf conftest*
  1632. +
  1633. +fi
  1634. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arc64" >&5
  1635. +printf "%s\n" "$libc_cv_arc64" >&6; }
  1636. +if test $libc_cv_arc64 = yes; then
  1637. + # For shlib-versions.
  1638. + printf "%s\n" "#define HAVE_ARC64 1" >>confdefs.h
  1639. +
  1640. + config_vars="$config_vars
  1641. +default-abi = arc64le"
  1642. +
  1643. +else
  1644. +
  1645. +# For arc64:32 generate a symbol for selecting right dynamic linker
  1646. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for arc32" >&5
  1647. +printf %s "checking for arc32... " >&6; }
  1648. +if test ${libc_cv_arc32+y}
  1649. +then :
  1650. + printf %s "(cached) " >&6
  1651. +else $as_nop
  1652. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  1653. +/* end confdefs.h. */
  1654. +#ifdef __ARC64_ARCH32__
  1655. + yes
  1656. + #endif
  1657. +
  1658. +_ACEOF
  1659. +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1660. + $EGREP "yes" >/dev/null 2>&1
  1661. +then :
  1662. + libc_cv_arc32=yes
  1663. +else $as_nop
  1664. + libc_cv_arc32=no
  1665. +fi
  1666. +rm -rf conftest*
  1667. +
  1668. +fi
  1669. +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arc32" >&5
  1670. +printf "%s\n" "$libc_cv_arc32" >&6; }
  1671. +
  1672. +if test $libc_cv_arc32 = yes; then
  1673. + # For shlib-versions.
  1674. + printf "%s\n" "#define HAVE_ARC32 1" >>confdefs.h
  1675. +
  1676. + config_vars="$config_vars
  1677. +default-abi = arc32le"
  1678. +
  1679. +else
  1680. +
  1681. +# For big endian ABI, generate a symbol for selecting right dynamic linker
  1682. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for big endian" >&5
  1683. printf %s "checking for big endian... " >&6; }
  1684. if test ${libc_cv_arc_be+y}
  1685. @@ -189,5 +260,12 @@ default-abi = arcbe"
  1686. else
  1687. config_vars="$config_vars
  1688. default-abi = arcle"
  1689. +# big endian
  1690. +fi
  1691. +
  1692. +# arc64:32
  1693. +fi
  1694. +
  1695. +# arc64:64
  1696. fi
  1697. diff --git a/sysdeps/arc/configure.ac b/sysdeps/arc/configure.ac
  1698. index 619da4e088..4e84f17105 100644
  1699. --- a/sysdeps/arc/configure.ac
  1700. +++ b/sysdeps/arc/configure.ac
  1701. @@ -9,6 +9,35 @@ libc_cv_have_sdata_section=no
  1702. libc_cv_asm_line_sep='`'
  1703. AC_DEFINE_UNQUOTED(ASM_LINE_SEP, $libc_cv_asm_line_sep)
  1704. +# For arc64:64 generate a symbol for selecting right dynamic linker
  1705. +AC_CACHE_CHECK([for arc64],
  1706. + [libc_cv_arc64],
  1707. + [AC_EGREP_CPP(yes,[#ifdef __ARC64_ARCH64__
  1708. + yes
  1709. + #endif
  1710. + ], libc_cv_arc64=yes, libc_cv_arc64=no)])
  1711. +if test $libc_cv_arc64 = yes; then
  1712. + # For shlib-versions.
  1713. + AC_DEFINE(HAVE_ARC64)
  1714. + LIBC_CONFIG_VAR([default-abi], [arc64le])
  1715. +
  1716. +else
  1717. +
  1718. +# For arc64:32 generate a symbol for selecting right dynamic linker
  1719. +AC_CACHE_CHECK([for arc32],
  1720. + [libc_cv_arc32],
  1721. + [AC_EGREP_CPP(yes,[#ifdef __ARC64_ARCH32__
  1722. + yes
  1723. + #endif
  1724. + ], libc_cv_arc32=yes, libc_cv_arc32=no)])
  1725. +
  1726. +if test $libc_cv_arc32 = yes; then
  1727. + # For shlib-versions.
  1728. + AC_DEFINE(HAVE_ARC32)
  1729. + LIBC_CONFIG_VAR([default-abi], [arc32le])
  1730. +
  1731. +else
  1732. +
  1733. # For big endian ABI, generate a symbol for selecting right dynamic linker
  1734. AC_CACHE_CHECK([for big endian],
  1735. [libc_cv_arc_be],
  1736. @@ -22,4 +51,11 @@ if test $libc_cv_arc_be = yes; then
  1737. LIBC_CONFIG_VAR([default-abi], [arcbe])
  1738. else
  1739. LIBC_CONFIG_VAR([default-abi], [arcle])
  1740. +# big endian
  1741. +fi
  1742. +
  1743. +# arc64:32
  1744. +fi
  1745. +
  1746. +# arc64:64
  1747. fi
  1748. diff --git a/sysdeps/arc/dl-machine.h b/sysdeps/arc/dl-machine.h
  1749. index 4dc652a449..dbb7394c27 100644
  1750. --- a/sysdeps/arc/dl-machine.h
  1751. +++ b/sysdeps/arc/dl-machine.h
  1752. @@ -32,18 +32,19 @@
  1753. #include <dl-tls.h>
  1754. #include <dl-static-tls.h>
  1755. #include <dl-machine-rel.h>
  1756. +#include <sysdep.h>
  1757. /* Dynamic Linking ABI for ARCv2 ISA.
  1758. - PLT
  1759. + .plt
  1760. -------------------------------- <---- DT_PLTGOT
  1761. | ld r11, [pcl, off-to-GOT[1] | 0
  1762. | | 4
  1763. - plt0 | ld r10, [pcl, off-to-GOT[2] | 8
  1764. + PLT0 | ld r10, [pcl, off-to-GOT[2] | 8
  1765. | | 12
  1766. | j [r10] | 16
  1767. --------------------------------
  1768. - | Base address of GOT | 20
  1769. + | Base address of .got.plt | 20
  1770. --------------------------------
  1771. | ld r12, [pcl, off-to-GOT[3] | 24
  1772. plt1 | |
  1773. @@ -69,11 +70,11 @@
  1774. --------------
  1775. | [1] | Module info - setup by ld.so
  1776. --------------
  1777. - | [2] | resolver entry point
  1778. + | [2] | resolver entry point: _dl_runtime_resolve
  1779. --------------
  1780. | [3] |
  1781. | ... | Runtime address for function symbols
  1782. - | [f] |
  1783. + | [f] | Initially point to PLT0
  1784. --------------
  1785. For ARCompact, the PLT is 12 bytes due to short instructions
  1786. @@ -91,6 +92,8 @@ static inline int
  1787. elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
  1788. {
  1789. return (ehdr->e_machine == EM_ARCV2 /* ARC HS. */
  1790. + || ehdr->e_machine == EM_ARCV3 /* ARCv3: ARC64. */
  1791. + || ehdr->e_machine == EM_ARCV3_32 /* ARCv3: ARC32. */
  1792. || ehdr->e_machine == EM_ARC_COMPACT); /* ARC 700. */
  1793. }
  1794. @@ -114,7 +117,7 @@ elf_machine_load_address (void)
  1795. /* For build address, below generates
  1796. ld r0, [pcl, _GLOBAL_OFFSET_TABLE_@pcl]. */
  1797. build_addr = elf_machine_dynamic ();
  1798. - __asm__ ("add %0, pcl, _DYNAMIC@pcl \n" : "=r" (run_addr));
  1799. + __asm__ ("ADDR %0, pcl, _DYNAMIC@pcl \n" : "=r" (run_addr));
  1800. return run_addr - build_addr;
  1801. }
  1802. @@ -131,10 +134,13 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
  1803. if (l->l_info[DT_JMPREL] && lazy)
  1804. {
  1805. - /* On ARC DT_PLTGOT point to .plt whose 5th word (after the PLT header)
  1806. - contains the address of .got. */
  1807. + /* update .got.plt[1] and .got.plt[2].
  1808. + DT_PLTGOT point to base of .plt and PLT0 is 3 instructions
  1809. + for total of 20 bytes, see illustration at top.
  1810. + The word right after contains base address of .got.plt. */
  1811. ElfW(Addr) *plt_base = (ElfW(Addr) *) D_PTR (l, l_info[DT_PLTGOT]);
  1812. - ElfW(Addr) *got = (ElfW(Addr) *) (plt_base[5] + l->l_addr);
  1813. + ElfW(Addr) *got_build = (ElfW(Addr) *) ((uintptr_t)plt_base + 20);
  1814. + ElfW(Addr) *got = (ElfW(Addr) *) (*got_build + l->l_addr);
  1815. got[1] = (ElfW(Addr)) l; /* Identify this shared object. */
  1816. @@ -152,6 +158,8 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
  1817. -optionally adjusts argc for executable if exec passed as cmd
  1818. -calls into app main with address of finaliser. */
  1819. +#ifdef __ARC64_ARCH64__
  1820. +
  1821. #define RTLD_START asm ("\
  1822. .text \n\
  1823. .globl __start \n\
  1824. @@ -159,25 +167,55 @@ elf_machine_runtime_setup (struct link_map *l, struct r_scope_elem *scope[],
  1825. __start: \n\
  1826. /* (1). bootstrap ld.so. */ \n\
  1827. bl.d _dl_start \n\
  1828. - mov_s r0, sp /* pass ptr to aux vector tbl. */ \n\
  1829. - mov r13, r0 /* safekeep app elf entry point. */ \n\
  1830. - ld_s r1, [sp] /* orig argc. */ \n\
  1831. + MOVR r0, sp /* pass ptr to aux vector tbl. */ \n\
  1832. + MOVR r14, r0 /* safekeep app elf entry point. */ \n\
  1833. + LDR r1, sp /* orig argc. */ \n\
  1834. \n\
  1835. /* (2). call preinit stuff. */ \n\
  1836. - ld r0, [pcl, _rtld_local@pcl] \n\
  1837. - add r2, sp, 4 ; argv \n\
  1838. - add2 r3, r2, r1 \n\
  1839. - add r3, r3, 4 ; env \n\
  1840. + LDR r0, pcl, _rtld_local@pcl \n\
  1841. + ADDR r2, sp, 8 ; argv \n\
  1842. + ADD3R r3, r2, r1 \n\
  1843. + ADDR r3, r3, 8 ; env \n\
  1844. bl _dl_init@plt \n\
  1845. \n\
  1846. /* (3) call app elf entry point. */ \n\
  1847. - add r0, pcl, _dl_fini@pcl \n\
  1848. - j [r13] \n\
  1849. + ADDR r0, pcl, _dl_fini@pcl \n\
  1850. + j [r14] \n\
  1851. \n\
  1852. .size __start,.-__start \n\
  1853. .previous \n\
  1854. ");
  1855. +#else
  1856. +
  1857. +#define RTLD_START asm ("\
  1858. +.text \n\
  1859. +.globl __start \n\
  1860. +.type __start, @function \n\
  1861. +__start: \n\
  1862. + /* (1). bootstrap ld.so. */ \n\
  1863. + bl.d _dl_start \n\
  1864. + MOVR r0, sp /* pass ptr to aux vector tbl. */ \n\
  1865. + MOVR r14, r0 /* safekeep app elf entry point. */ \n\
  1866. + LDR r1, sp /* orig argc. */ \n\
  1867. + \n\
  1868. + /* (2). call preinit stuff. */ \n\
  1869. + LDR r0, pcl, _rtld_local@pcl \n\
  1870. + ADDR r2, sp, 4 ; argv \n\
  1871. + ADD2R r3, r2, r1 \n\
  1872. + ADDR r3, r3, 4 ; env \n\
  1873. + bl _dl_init@plt \n\
  1874. + \n\
  1875. + /* (3) call app elf entry point. */ \n\
  1876. + ADDR r0, pcl, _dl_fini@pcl \n\
  1877. + j [r14] \n\
  1878. + \n\
  1879. + .size __start,.-__start \n\
  1880. + .previous \n\
  1881. +");
  1882. +
  1883. +#endif
  1884. +
  1885. /* ELF_RTYPE_CLASS_PLT iff TYPE describes relocation of a PLT entry, so
  1886. PLT entries should not be allowed to define the value.
  1887. ELF_RTYPE_CLASS_NOCOPY iff TYPE should not be allowed to resolve to one
  1888. @@ -289,6 +327,7 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[],
  1889. break;
  1890. case R_ARC_32:
  1891. + case R_ARC_64:
  1892. *reloc_addr += value + reloc->r_addend;
  1893. break;
  1894. diff --git a/sysdeps/arc/dl-trampoline.S b/sysdeps/arc/dl-trampoline.S
  1895. index 1b307a616f..386009d41e 100644
  1896. --- a/sysdeps/arc/dl-trampoline.S
  1897. +++ b/sysdeps/arc/dl-trampoline.S
  1898. @@ -31,42 +31,71 @@
  1899. ENTRY (_dl_runtime_resolve)
  1900. /* save args to func being resolved before entering resolver. */
  1901. - push_s r0
  1902. - push_s r1
  1903. - push_s r2
  1904. - push_s r3
  1905. - st.a r4, [sp, -4]
  1906. - st.a r5, [sp, -4]
  1907. - st.a r6, [sp, -4]
  1908. - st.a r7, [sp, -4]
  1909. - st.a r8, [sp, -4]
  1910. - st.a r9, [sp, -4]
  1911. - cfi_adjust_cfa_offset (40)
  1912. - push_s blink
  1913. - cfi_adjust_cfa_offset (4)
  1914. + PUSHR r0
  1915. + PUSHR r1
  1916. + PUSHR r2
  1917. + PUSHR r3
  1918. + PUSHR r4
  1919. + PUSHR r5
  1920. + PUSHR r6
  1921. + PUSHR r7
  1922. + PUSHR r8
  1923. + PUSHR r9
  1924. +
  1925. +#if defined (__ARC_FLOAT_ABI_HARD__)
  1926. + FPUSHR f0
  1927. + FPUSHR f1
  1928. + FPUSHR f2
  1929. + FPUSHR f3
  1930. + FPUSHR f4
  1931. + FPUSHR f5
  1932. + FPUSHR f6
  1933. + FPUSHR f7
  1934. + cfi_adjust_cfa_offset (18*REGSZ)
  1935. +#else
  1936. + cfi_adjust_cfa_offset (10*REGSZ)
  1937. +#endif
  1938. +
  1939. + PUSHR blink
  1940. + cfi_adjust_cfa_offset (REGSZ)
  1941. cfi_rel_offset (blink, 0)
  1942. - mov_s r1, r12
  1943. + MOVR r1, r12
  1944. bl.d _dl_fixup
  1945. - mov r0, r11
  1946. + MOVR r0, r11
  1947. /* restore regs back. */
  1948. - ld.ab blink,[sp, 4]
  1949. - cfi_adjust_cfa_offset (-4)
  1950. + POPR blink
  1951. + cfi_adjust_cfa_offset (-REGSZ)
  1952. cfi_restore (blink)
  1953. - ld.ab r9, [sp, 4]
  1954. - ld.ab r8, [sp, 4]
  1955. - ld.ab r7, [sp, 4]
  1956. - ld.ab r6, [sp, 4]
  1957. - ld.ab r5, [sp, 4]
  1958. - ld.ab r4, [sp, 4]
  1959. - pop_s r3
  1960. - pop_s r2
  1961. - pop_s r1
  1962. - cfi_adjust_cfa_offset (-36)
  1963. - j_s.d [r0] /* r0 has resolved function addr. */
  1964. - pop_s r0 /* restore first arg to resolved call. */
  1965. - cfi_adjust_cfa_offset (-4)
  1966. +#if defined (__ARC_FLOAT_ABI_HARD__)
  1967. + FPOPR f7
  1968. + FPOPR f6
  1969. + FPOPR f5
  1970. + FPOPR f4
  1971. + FPOPR f3
  1972. + FPOPR f2
  1973. + FPOPR f1
  1974. + FPOPR f0
  1975. +#endif
  1976. + POPR r9
  1977. + POPR r8
  1978. + POPR r7
  1979. + POPR r6
  1980. + POPR r5
  1981. + POPR r4
  1982. + POPR r3
  1983. + POPR r2
  1984. + POPR r1
  1985. +#if defined (__ARC_FLOAT_ABI_HARD__)
  1986. + cfi_adjust_cfa_offset (-17*REGSZ)
  1987. +#else
  1988. + cfi_adjust_cfa_offset (-9*REGSZ)
  1989. +#endif
  1990. +
  1991. + j.d [r0] /* r0 has resolved function addr. */
  1992. + POPR r0 /* restore first arg to resolved call. */
  1993. + cfi_adjust_cfa_offset (-REGSZ)
  1994. cfi_restore (r0)
  1995. END (_dl_runtime_resolve)
  1996. diff --git a/sysdeps/arc/fpu/math-use-builtins-fma.h b/sysdeps/arc/fpu/math-use-builtins-fma.h
  1997. index 2acd8113ce..59c7ed0343 100644
  1998. --- a/sysdeps/arc/fpu/math-use-builtins-fma.h
  1999. +++ b/sysdeps/arc/fpu/math-use-builtins-fma.h
  2000. @@ -1,13 +1,17 @@
  2001. -#if defined __ARC_FPU_DP_FMA__
  2002. +#if defined __ARCV3__
  2003. # define USE_FMA_BUILTIN 1
  2004. -#else
  2005. -# define USE_FMA_BUILTIN 0
  2006. -#endif
  2007. -
  2008. -#if defined __ARC_FPU_SP_FMA__
  2009. # define USE_FMAF_BUILTIN 1
  2010. #else
  2011. -# define USE_FMAF_BUILTIN 0
  2012. +# if defined __ARC_FPU_DP_FMA__
  2013. +# define USE_FMA_BUILTIN 1
  2014. +# else
  2015. +# define USE_FMA_BUILTIN 0
  2016. +# endif
  2017. +# if defined __ARC_FPU_SP_FMA__
  2018. +# define USE_FMAF_BUILTIN 1
  2019. +# else
  2020. +# define USE_FMAF_BUILTIN 0
  2021. +# endif
  2022. #endif
  2023. #define USE_FMAL_BUILTIN 0
  2024. diff --git a/sysdeps/arc/fpu/math-use-builtins-sqrt.h b/sysdeps/arc/fpu/math-use-builtins-sqrt.h
  2025. index a449bc6092..40a07730ea 100644
  2026. --- a/sysdeps/arc/fpu/math-use-builtins-sqrt.h
  2027. +++ b/sysdeps/arc/fpu/math-use-builtins-sqrt.h
  2028. @@ -1,13 +1,17 @@
  2029. -#if defined __ARC_FPU_DP_DIV__
  2030. +#if defined __ARCV3__
  2031. # define USE_SQRT_BUILTIN 1
  2032. -#else
  2033. -# define USE_SQRT_BUILTIN 0
  2034. -#endif
  2035. -
  2036. -#if defined __ARC_FPU_SP_DIV__
  2037. # define USE_SQRTF_BUILTIN 1
  2038. #else
  2039. -# define USE_SQRTF_BUILTIN 0
  2040. +# if defined __ARC_FPU_DP_DIV__
  2041. +# define USE_SQRT_BUILTIN 1
  2042. +# else
  2043. +# define USE_SQRT_BUILTIN 0
  2044. +# endif
  2045. +# if defined __ARC_FPU_SP_DIV__
  2046. +# define USE_SQRTF_BUILTIN 1
  2047. +# else
  2048. +# define USE_SQRTF_BUILTIN 0
  2049. +# endif
  2050. #endif
  2051. #define USE_SQRTL_BUILTIN 0
  2052. diff --git a/sysdeps/arc/isa-asm-macro-32.h b/sysdeps/arc/isa-asm-macro-32.h
  2053. new file mode 100644
  2054. index 0000000000..98cd249059
  2055. --- /dev/null
  2056. +++ b/sysdeps/arc/isa-asm-macro-32.h
  2057. @@ -0,0 +1,61 @@
  2058. +# define REGSZ 4
  2059. +
  2060. +.irp aa,,.as
  2061. +.macro LDR\aa d, s, off=0
  2062. + ld\aa \d, [\s, \off]
  2063. +.endm
  2064. +.endr
  2065. +
  2066. +.irp aa,,.as
  2067. +.macro STR\aa d, s, off=0
  2068. + st\aa \d, [\s, \off]
  2069. +.endm
  2070. +.endr
  2071. +
  2072. +.macro PUSHR r
  2073. + push \r
  2074. +.endm
  2075. +
  2076. +.macro POPR r
  2077. + pop \r
  2078. +.endm
  2079. +
  2080. +.irp cc,,.f
  2081. +.macro MOVR\cc d, s
  2082. + mov\cc \d, \s
  2083. +.endm
  2084. +.endr
  2085. +
  2086. +.irp cc,,.nz
  2087. +.macro ADDR\cc d, s, v
  2088. + add\cc \d, \s, \v
  2089. +.endm
  2090. +.endr
  2091. +
  2092. +.macro ADD2R d, s, v
  2093. + add2 \d, \s, \v
  2094. +.endm
  2095. +
  2096. +.macro ADD3R d, s, v
  2097. + add3 \d, \s, \v
  2098. +.endm
  2099. +
  2100. +.macro SUBR d, s, v
  2101. + sub \d, \s, \v
  2102. +.endm
  2103. +
  2104. +.macro ANDR d, s, v
  2105. + and \d, \s, \v
  2106. +.endm
  2107. +
  2108. +.irp cc,,eq,hi
  2109. +.macro BRR\cc d, s, v
  2110. + br\cc \d, \s, \v
  2111. +.endm
  2112. +.endr
  2113. +
  2114. +.irp cc,,.ne
  2115. +.macro CMPR\cc d, s
  2116. + cmp\cc \d, \s
  2117. +.endm
  2118. +.endr
  2119. diff --git a/sysdeps/arc/isa-asm-macro-64.h b/sysdeps/arc/isa-asm-macro-64.h
  2120. new file mode 100644
  2121. index 0000000000..02b1dc2c37
  2122. --- /dev/null
  2123. +++ b/sysdeps/arc/isa-asm-macro-64.h
  2124. @@ -0,0 +1,86 @@
  2125. +# define REGSZ 8
  2126. +
  2127. +.irp aa,,.as
  2128. +.macro LDR\aa d, s, off=0
  2129. + ldl\aa \d, [\s, \off]
  2130. +.endm
  2131. +.endr
  2132. +
  2133. +.irp aa,,.as
  2134. +.macro STR\aa d, s, off=0
  2135. + stl\aa \d, [\s, \off]
  2136. +.endm
  2137. +.endr
  2138. +
  2139. +.macro PUSHR r
  2140. + pushl \r
  2141. +.endm
  2142. +
  2143. +.macro POPR r
  2144. + popl \r
  2145. +.endm
  2146. +
  2147. +.irp cc,,.f
  2148. +.macro MOVR\cc d, s
  2149. + movl\cc \d, \s
  2150. +.endm
  2151. +.endr
  2152. +
  2153. +.irp cc,,.nz
  2154. +.macro ADDR\cc d, s, v
  2155. + addl\cc \d, \s, \v
  2156. +.endm
  2157. +.endr
  2158. +
  2159. +.macro ADD2R d, s, v
  2160. + add2l \d, \s, \v
  2161. +.endm
  2162. +
  2163. +.macro ADD3R d, s, v
  2164. + add3l \d, \s, \v
  2165. +.endm
  2166. +
  2167. +.macro SUBR d, s, v
  2168. + subl \d, \s, \v
  2169. +.endm
  2170. +
  2171. +.macro ANDR d, s, v
  2172. + andl \d, \s, \v
  2173. +.endm
  2174. +
  2175. +.irp cc,eq,hi
  2176. +.macro BRR\cc d, s, v
  2177. +; arc64 gas doesn't support BRHIL pseudo-instruction
  2178. +.ifeqs "\cc","hi"
  2179. + brlo\()l \s, \d, \v
  2180. +.else
  2181. + br\cc\()l \d, \s, \v
  2182. +.endif
  2183. +.endm
  2184. +.endr
  2185. +
  2186. +.irp cc,,.ne
  2187. +.macro CMPR\cc d, s
  2188. + cmpl\cc \d, \s
  2189. +.endm
  2190. +.endr
  2191. +
  2192. +.irp aa,,.as,.aw,.ab
  2193. +.macro FLDR\aa d, s, off=0
  2194. + fld64\aa \d, [\s, \off]
  2195. +.endm
  2196. +.endr
  2197. +
  2198. +.irp aa,,.as,.aw,.ab
  2199. +.macro FSTR\aa d, s, off=0
  2200. + fst64\aa \d, [\s, \off]
  2201. +.endm
  2202. +.endr
  2203. +
  2204. +.macro FPUSHR r
  2205. + FSTR.aw \r, sp, -REGSZ
  2206. +.endm
  2207. +
  2208. +.macro FPOPR r
  2209. + FLDR.ab \r, sp, REGSZ
  2210. +.endm
  2211. diff --git a/sysdeps/arc/isa-asm-macros.h b/sysdeps/arc/isa-asm-macros.h
  2212. new file mode 100644
  2213. index 0000000000..f9f5e4f630
  2214. --- /dev/null
  2215. +++ b/sysdeps/arc/isa-asm-macros.h
  2216. @@ -0,0 +1,35 @@
  2217. +/* ISA Specific Assembler macros for ARC.
  2218. + Copyright (C) 2020 Free Software Foundation, Inc.
  2219. + This file is part of the GNU C Library.
  2220. +
  2221. + The GNU C Library is free software; you can redistribute it and/or
  2222. + modify it under the terms of the GNU Lesser General Public License as
  2223. + published by the Free Software Foundation; either version 2.1 of the
  2224. + License, or (at your option) any later version.
  2225. +
  2226. + The GNU C Library is distributed in the hope that it will be useful,
  2227. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  2228. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  2229. + Lesser General Public License for more details.
  2230. +
  2231. + You should have received a copy of the GNU Lesser General Public
  2232. + License along with the GNU C Library; if not, see
  2233. + <https://www.gnu.org/licenses/>. */
  2234. +
  2235. +#ifdef __ASSEMBLER__
  2236. +
  2237. +# ifdef __ARC64_ARCH64__
  2238. +# include <sysdeps/arc/isa-asm-macro-64.h>
  2239. +# else
  2240. +# include <sysdeps/arc/isa-asm-macro-32.h>
  2241. +# endif
  2242. +
  2243. +#else
  2244. +
  2245. +# ifdef __ARC64_ARCH64__
  2246. +asm(".include \"sysdeps/arc/isa-asm-macro-64.h\"\n");
  2247. +# else
  2248. +asm(".include \"sysdeps/arc/isa-asm-macro-32.h\"\n");
  2249. +# endif
  2250. +
  2251. +#endif
  2252. diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/nofpu/libm-test-ulps
  2253. index 6ac2830b25..26632ff8f2 100644
  2254. --- a/sysdeps/arc/nofpu/libm-test-ulps
  2255. +++ b/sysdeps/arc/nofpu/libm-test-ulps
  2256. @@ -205,6 +205,7 @@ float: 7
  2257. Function: "hypot":
  2258. double: 1
  2259. +float: 1
  2260. Function: "j0":
  2261. double: 2
  2262. diff --git a/sysdeps/arc/nptl/pthreaddef.h b/sysdeps/arc/nptl/pthreaddef.h
  2263. index 336eded15c..3b51e59a35 100644
  2264. --- a/sysdeps/arc/nptl/pthreaddef.h
  2265. +++ b/sysdeps/arc/nptl/pthreaddef.h
  2266. @@ -23,7 +23,7 @@
  2267. #define ARCH_MIN_GUARD_SIZE 0
  2268. /* Required stack pointer alignment at beginning. */
  2269. -#define STACK_ALIGN 4
  2270. +#define STACK_ALIGN 8
  2271. /* Minimal stack size after allocating thread descriptor and guard size. */
  2272. #define MINIMAL_REST_STACK 2048
  2273. diff --git a/sysdeps/arc/preconfigure b/sysdeps/arc/preconfigure
  2274. index a79db0239a..eab4af0eab 100644
  2275. --- a/sysdeps/arc/preconfigure
  2276. +++ b/sysdeps/arc/preconfigure
  2277. @@ -1,14 +1,22 @@
  2278. case "$machine" in
  2279. arc*)
  2280. - base_machine=arc
  2281. - machine=arc
  2282. + with_fp_cond=0
  2283. + isarc64=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep __LP64__| wc -l`
  2284. +
  2285. + case "$isarc64" in
  2286. + 0)
  2287. + base_machine=arc
  2288. + machine=arc/arc32
  2289. + ;;
  2290. + 1)
  2291. + base_machine=arc
  2292. + machine=arc/arc64
  2293. + ;;
  2294. + esac
  2295. gccfloat=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | grep __ARC_FPU_| wc -l`
  2296. if test "$gccfloat" != "0"; then
  2297. with_fp_cond=1
  2298. - else
  2299. - with_fp_cond=0
  2300. fi
  2301. ;;
  2302. -
  2303. esac
  2304. diff --git a/sysdeps/arc/setjmp.S b/sysdeps/arc/setjmp.S
  2305. index 9ecdb9daae..e39b526837 100644
  2306. --- a/sysdeps/arc/setjmp.S
  2307. +++ b/sysdeps/arc/setjmp.S
  2308. @@ -41,24 +41,47 @@ ENTRY (__sigsetjmp)
  2309. that will be right next to this setjmp call-site in BLINK
  2310. since "C" caller of this routine will do a branch-n-link. */
  2311. - STR (blink, r0, 0)
  2312. - STR (sp, r0, 1)
  2313. - STR (fp, r0, 2)
  2314. - STR (gp, r0, 3)
  2315. + STR.as blink, r0, 0
  2316. + STR.as sp, r0, 1
  2317. + STR.as fp, r0, 2
  2318. + STR.as gp, r0, 3
  2319. - STR (r13, r0, 4)
  2320. - STR (r14, r0, 5)
  2321. - STR (r15, r0, 6)
  2322. - STR (r16, r0, 7)
  2323. - STR (r17, r0, 8)
  2324. - STR (r18, r0, 9)
  2325. - STR (r19, r0, 10)
  2326. - STR (r20, r0, 11)
  2327. - STR (r21, r0, 12)
  2328. - STR (r22, r0, 13)
  2329. - STR (r23, r0, 14)
  2330. - STR (r24, r0, 15)
  2331. + STR.as r13, r0, 4
  2332. + STR.as r14, r0, 5
  2333. + STR.as r15, r0, 6
  2334. + STR.as r16, r0, 7
  2335. + STR.as r17, r0, 8
  2336. + STR.as r18, r0, 9
  2337. + STR.as r19, r0, 10
  2338. + STR.as r20, r0, 11
  2339. + STR.as r21, r0, 12
  2340. + STR.as r22, r0, 13
  2341. + STR.as r23, r0, 14
  2342. + STR.as r24, r0, 15
  2343. +#if defined(__ARCV3__)
  2344. + STR.as r25, r0, 16
  2345. + STR.as r26, r0, 17
  2346. +#endif
  2347. +
  2348. +#if defined (__ARC_FLOAT_ABI_HARD__)
  2349. + FSTR.as f16, r0, 18
  2350. + FSTR.as f17, r0, 19
  2351. + FSTR.as f18, r0, 20
  2352. + FSTR.as f19, r0, 21
  2353. + FSTR.as f20, r0, 22
  2354. + FSTR.as f21, r0, 23
  2355. + FSTR.as f22, r0, 24
  2356. + FSTR.as f23, r0, 25
  2357. + FSTR.as f24, r0, 26
  2358. + FSTR.as f25, r0, 27
  2359. + FSTR.as f26, r0, 28
  2360. + FSTR.as f27, r0, 29
  2361. + FSTR.as f28, r0, 30
  2362. + FSTR.as f29, r0, 31
  2363. + FSTR.as f30, r0, 32
  2364. + FSTR.as f31, r0, 33
  2365. +#endif
  2366. b __sigjmp_save
  2367. END (__sigsetjmp)
  2368. diff --git a/sysdeps/arc/sfp-machine.h b/sysdeps/arc/sfp-machine.h
  2369. index 0917a7ae17..4743b694a2 100644
  2370. --- a/sysdeps/arc/sfp-machine.h
  2371. +++ b/sysdeps/arc/sfp-machine.h
  2372. @@ -17,10 +17,12 @@
  2373. <https://www.gnu.org/licenses/>. */
  2374. -#define _FP_W_TYPE_SIZE 32
  2375. -#define _FP_W_TYPE unsigned long
  2376. -#define _FP_WS_TYPE signed long
  2377. -#define _FP_I_TYPE long
  2378. +#ifndef __ARC64__
  2379. +
  2380. +# define _FP_W_TYPE_SIZE 32
  2381. +# define _FP_W_TYPE unsigned long
  2382. +# define _FP_WS_TYPE signed long
  2383. +# define _FP_I_TYPE long
  2384. #define _FP_MUL_MEAT_S(R,X,Y) \
  2385. _FP_MUL_MEAT_1_wide(_FP_WFRACBITS_S,R,X,Y,umul_ppmm)
  2386. @@ -67,4 +69,49 @@
  2387. R##_c = FP_CLS_NAN; \
  2388. } while (0)
  2389. +#else
  2390. +
  2391. +# define _FP_W_TYPE_SIZE 64
  2392. +# define _FP_W_TYPE unsigned long long
  2393. +# define _FP_WS_TYPE signed long long
  2394. +# define _FP_I_TYPE long long
  2395. +
  2396. +# define _FP_MUL_MEAT_S(R, X, Y) \
  2397. + _FP_MUL_MEAT_1_imm (_FP_WFRACBITS_S, R, X, Y)
  2398. +# define _FP_MUL_MEAT_D(R, X, Y) \
  2399. + _FP_MUL_MEAT_1_wide (_FP_WFRACBITS_D, R, X, Y, umul_ppmm)
  2400. +# define _FP_MUL_MEAT_Q(R, X, Y) \
  2401. + _FP_MUL_MEAT_2_wide_3mul (_FP_WFRACBITS_Q, R, X, Y, umul_ppmm)
  2402. +
  2403. +# define _FP_MUL_MEAT_DW_S(R, X, Y) \
  2404. + _FP_MUL_MEAT_DW_1_imm (_FP_WFRACBITS_S, R, X, Y)
  2405. +# define _FP_MUL_MEAT_DW_D(R, X, Y) \
  2406. + _FP_MUL_MEAT_DW_1_wide (_FP_WFRACBITS_D, R, X, Y, umul_ppmm)
  2407. +# define _FP_MUL_MEAT_DW_Q(R, X, Y) \
  2408. + _FP_MUL_MEAT_DW_2_wide_3mul (_FP_WFRACBITS_Q, R, X, Y, umul_ppmm)
  2409. +
  2410. +# define _FP_DIV_MEAT_S(R, X, Y) _FP_DIV_MEAT_1_imm (S, R, X, Y, _FP_DIV_HELP_imm)
  2411. +# define _FP_DIV_MEAT_D(R, X, Y) _FP_DIV_MEAT_1_udiv_norm (D, R, X, Y)
  2412. +# define _FP_DIV_MEAT_Q(R, X, Y) _FP_DIV_MEAT_2_udiv (Q, R, X, Y)
  2413. +
  2414. +# define _FP_NANFRAC_S _FP_QNANBIT_S
  2415. +# define _FP_NANFRAC_D _FP_QNANBIT_D
  2416. +# define _FP_NANFRAC_Q _FP_QNANBIT_Q, 0
  2417. +
  2418. +#define _FP_NANSIGN_S 0
  2419. +#define _FP_NANSIGN_D 0
  2420. +#define _FP_NANSIGN_Q 0
  2421. +
  2422. +#define _FP_KEEPNANFRACP 0
  2423. +#define _FP_QNANNEGATEDP 0
  2424. +
  2425. +#define _FP_CHOOSENAN(fs, wc, R, X, Y, OP) \
  2426. + do { \
  2427. + R##_s = _FP_NANSIGN_##fs; \
  2428. + _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
  2429. + R##_c = FP_CLS_NAN; \
  2430. + } while (0)
  2431. +
  2432. +#endif
  2433. +
  2434. #define _FP_TININESS_AFTER_ROUNDING 1
  2435. diff --git a/sysdeps/arc/start.S b/sysdeps/arc/start.S
  2436. index db3bab6395..42ead9d302 100644
  2437. --- a/sysdeps/arc/start.S
  2438. +++ b/sysdeps/arc/start.S
  2439. @@ -57,12 +57,12 @@ ENTRY (ENTRY_POINT)
  2440. cfi_undefined (blink)
  2441. mov fp, 0
  2442. - ld_s r1, [sp] /* argc. */
  2443. + LDR r1, sp /* argc. */
  2444. - mov_s r5, r0 /* rltd_fini. */
  2445. - add_s r2, sp, 4 /* argv. */
  2446. - and sp, sp, -8
  2447. - mov r6, sp
  2448. + MOVR r5, r0 /* rltd_fini. */
  2449. + ADDR r2, sp, REGSZ /* argv. */
  2450. + ANDR sp, sp, -2*REGSZ
  2451. + MOVR r6, sp
  2452. /* __libc_start_main (main, argc, argv, init, fini, rtld_fini, stack_end). */
  2453. @@ -70,10 +70,10 @@ ENTRY (ENTRY_POINT)
  2454. mov r4, 0 /* Used to be fini. */
  2455. #ifdef SHARED
  2456. - ld r0, [pcl, @main@gotpc]
  2457. + LDR r0, pcl, @main@gotpc
  2458. bl __libc_start_main@plt
  2459. #else
  2460. - mov_s r0, main
  2461. + MOVR r0, main
  2462. bl __libc_start_main
  2463. #endif
  2464. diff --git a/sysdeps/arc/sysdep.h b/sysdeps/arc/sysdep.h
  2465. index 4f024f6b73..ba6ecddbac 100644
  2466. --- a/sysdeps/arc/sysdep.h
  2467. +++ b/sysdeps/arc/sysdep.h
  2468. @@ -47,7 +47,6 @@
  2469. # define CALL_MCOUNT /* Do nothing for now. */
  2470. -# define STR(reg, rbase, off) st reg, [rbase, off * 4]
  2471. -# define LDR(reg, rbase, off) ld reg, [rbase, off * 4]
  2472. -
  2473. #endif /* __ASSEMBLER__ */
  2474. +
  2475. +#include <sysdeps/arc/isa-asm-macros.h>
  2476. diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
  2477. index eca9a9fd3a..00d655bcd3 100644
  2478. --- a/sysdeps/unix/sysv/linux/arc/Makefile
  2479. +++ b/sysdeps/unix/sysv/linux/arc/Makefile
  2480. @@ -12,11 +12,13 @@ sysdep_headers += sys/cachectl.h
  2481. sysdep_routines += cacheflush
  2482. endif
  2483. -abi-variants := arcle arcbe
  2484. +abi-variants := arcle arcbe arc32le arc64le
  2485. ifeq (,$(filter $(default-abi),$(abi-variants)))
  2486. $(error Unknown ABI $(default-abi), must be one of $(abi-variants))
  2487. endif
  2488. -abi-arcle-condition := !defined __BIG_ENDIAN__
  2489. -abi-arcbe-condition := defined __BIG_ENDIAN__
  2490. +abi-arcle-condition := !defined __ARC64__ && !defined __BIG_ENDIAN__
  2491. +abi-arcbe-condition := !defined __ARC64__ && defined __BIG_ENDIAN__
  2492. +abi-arc32le-condition := defined __ARC64_ARCH32__ && !defined __BIG_ENDIAN__
  2493. +abi-arc64le-condition := defined __ARC64_ARCH64__ && !defined __BIG_ENDIAN__
  2494. diff --git a/sysdeps/unix/sysv/linux/arc/arc32/Implies b/sysdeps/unix/sysv/linux/arc/arc32/Implies
  2495. new file mode 100644
  2496. index 0000000000..9670973cfa
  2497. --- /dev/null
  2498. +++ b/sysdeps/unix/sysv/linux/arc/arc32/Implies
  2499. @@ -0,0 +1 @@
  2500. +unix/sysv/linux/arc
  2501. diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arc32/arch-syscall.h
  2502. similarity index 100%
  2503. copy from sysdeps/unix/sysv/linux/arc/arch-syscall.h
  2504. copy to sysdeps/unix/sysv/linux/arc/arc32/arch-syscall.h
  2505. diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/arc32/c++-types.data
  2506. similarity index 100%
  2507. copy from sysdeps/unix/sysv/linux/arc/c++-types.data
  2508. copy to sysdeps/unix/sysv/linux/arc/arc32/c++-types.data
  2509. diff --git a/sysdeps/unix/sysv/linux/arc/fixup-asm-unistd.h b/sysdeps/unix/sysv/linux/arc/arc32/fixup-asm-unistd.h
  2510. similarity index 100%
  2511. rename from sysdeps/unix/sysv/linux/arc/fixup-asm-unistd.h
  2512. rename to sysdeps/unix/sysv/linux/arc/arc32/fixup-asm-unistd.h
  2513. diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/arc32/ld.abilist
  2514. similarity index 100%
  2515. copy from sysdeps/unix/sysv/linux/arc/ld.abilist
  2516. copy to sysdeps/unix/sysv/linux/arc/arc32/ld.abilist
  2517. diff --git a/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libBrokenLocale.abilist
  2518. similarity index 100%
  2519. copy from sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
  2520. copy to sysdeps/unix/sysv/linux/arc/arc32/libBrokenLocale.abilist
  2521. diff --git a/sysdeps/unix/sysv/linux/arc/libanl.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libanl.abilist
  2522. similarity index 100%
  2523. copy from sysdeps/unix/sysv/linux/arc/libanl.abilist
  2524. copy to sysdeps/unix/sysv/linux/arc/arc32/libanl.abilist
  2525. diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libc.abilist
  2526. similarity index 100%
  2527. copy from sysdeps/unix/sysv/linux/arc/libc.abilist
  2528. copy to sysdeps/unix/sysv/linux/arc/arc32/libc.abilist
  2529. diff --git a/sysdeps/unix/sysv/linux/arc/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libc_malloc_debug.abilist
  2530. similarity index 100%
  2531. copy from sysdeps/unix/sysv/linux/arc/libc_malloc_debug.abilist
  2532. copy to sysdeps/unix/sysv/linux/arc/arc32/libc_malloc_debug.abilist
  2533. diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libcrypt.abilist
  2534. similarity index 100%
  2535. copy from sysdeps/unix/sysv/linux/arc/libcrypt.abilist
  2536. copy to sysdeps/unix/sysv/linux/arc/arc32/libcrypt.abilist
  2537. diff --git a/sysdeps/unix/sysv/linux/arc/libdl.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libdl.abilist
  2538. similarity index 100%
  2539. copy from sysdeps/unix/sysv/linux/arc/libdl.abilist
  2540. copy to sysdeps/unix/sysv/linux/arc/arc32/libdl.abilist
  2541. diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libm.abilist
  2542. similarity index 100%
  2543. copy from sysdeps/unix/sysv/linux/arc/libm.abilist
  2544. copy to sysdeps/unix/sysv/linux/arc/arc32/libm.abilist
  2545. diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libpthread.abilist
  2546. similarity index 100%
  2547. copy from sysdeps/unix/sysv/linux/arc/libpthread.abilist
  2548. copy to sysdeps/unix/sysv/linux/arc/arc32/libpthread.abilist
  2549. diff --git a/sysdeps/unix/sysv/linux/arc/libresolv.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libresolv.abilist
  2550. similarity index 100%
  2551. copy from sysdeps/unix/sysv/linux/arc/libresolv.abilist
  2552. copy to sysdeps/unix/sysv/linux/arc/arc32/libresolv.abilist
  2553. diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/arc32/librt.abilist
  2554. similarity index 100%
  2555. copy from sysdeps/unix/sysv/linux/arc/librt.abilist
  2556. copy to sysdeps/unix/sysv/linux/arc/arc32/librt.abilist
  2557. diff --git a/sysdeps/unix/sysv/linux/arc/libthread_db.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libthread_db.abilist
  2558. similarity index 100%
  2559. copy from sysdeps/unix/sysv/linux/arc/libthread_db.abilist
  2560. copy to sysdeps/unix/sysv/linux/arc/arc32/libthread_db.abilist
  2561. diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/arc32/libutil.abilist
  2562. similarity index 100%
  2563. copy from sysdeps/unix/sysv/linux/arc/libutil.abilist
  2564. copy to sysdeps/unix/sysv/linux/arc/arc32/libutil.abilist
  2565. diff --git a/sysdeps/unix/sysv/linux/arc/arc64/Implies b/sysdeps/unix/sysv/linux/arc/arc64/Implies
  2566. new file mode 100644
  2567. index 0000000000..05abf4461a
  2568. --- /dev/null
  2569. +++ b/sysdeps/unix/sysv/linux/arc/arc64/Implies
  2570. @@ -0,0 +1,2 @@
  2571. +unix/sysv/linux/arc
  2572. +unix/sysv/linux/wordsize-64
  2573. diff --git a/sysdeps/unix/sysv/linux/arc/arch-syscall.h b/sysdeps/unix/sysv/linux/arc/arc64/arch-syscall.h
  2574. similarity index 89%
  2575. rename from sysdeps/unix/sysv/linux/arc/arch-syscall.h
  2576. rename to sysdeps/unix/sysv/linux/arc/arc64/arch-syscall.h
  2577. index c1207aaa12..c73f38e567 100644
  2578. --- a/sysdeps/unix/sysv/linux/arc/arch-syscall.h
  2579. +++ b/sysdeps/unix/sysv/linux/arc/arc64/arch-syscall.h
  2580. @@ -15,11 +15,11 @@
  2581. #define __NR_capset 91
  2582. #define __NR_chdir 49
  2583. #define __NR_chroot 51
  2584. -#define __NR_clock_adjtime64 405
  2585. -#define __NR_clock_getres_time64 406
  2586. -#define __NR_clock_gettime64 403
  2587. -#define __NR_clock_nanosleep_time64 407
  2588. -#define __NR_clock_settime64 404
  2589. +#define __NR_clock_adjtime 266
  2590. +#define __NR_clock_getres 114
  2591. +#define __NR_clock_gettime 113
  2592. +#define __NR_clock_nanosleep 115
  2593. +#define __NR_clock_settime 112
  2594. #define __NR_clone 220
  2595. #define __NR_clone3 435
  2596. #define __NR_close 57
  2597. @@ -40,7 +40,7 @@
  2598. #define __NR_exit_group 94
  2599. #define __NR_faccessat 48
  2600. #define __NR_faccessat2 439
  2601. -#define __NR_fadvise64_64 223
  2602. +#define __NR_fadvise64 223
  2603. #define __NR_fallocate 47
  2604. #define __NR_fanotify_init 262
  2605. #define __NR_fanotify_mark 263
  2606. @@ -49,7 +49,7 @@
  2607. #define __NR_fchmodat 53
  2608. #define __NR_fchown 55
  2609. #define __NR_fchownat 54
  2610. -#define __NR_fcntl64 25
  2611. +#define __NR_fcntl 25
  2612. #define __NR_fdatasync 83
  2613. #define __NR_fgetxattr 10
  2614. #define __NR_finit_module 273
  2615. @@ -61,10 +61,11 @@
  2616. #define __NR_fsmount 432
  2617. #define __NR_fsopen 430
  2618. #define __NR_fspick 433
  2619. -#define __NR_fstatfs64 44
  2620. +#define __NR_fstat 80
  2621. +#define __NR_fstatfs 44
  2622. #define __NR_fsync 82
  2623. -#define __NR_ftruncate64 46
  2624. -#define __NR_futex_time64 422
  2625. +#define __NR_ftruncate 46
  2626. +#define __NR_futex 98
  2627. #define __NR_futex_waitv 449
  2628. #define __NR_get_mempolicy 236
  2629. #define __NR_get_robust_list 100
  2630. @@ -101,7 +102,6 @@
  2631. #define __NR_io_destroy 1
  2632. #define __NR_io_getevents 4
  2633. #define __NR_io_pgetevents 292
  2634. -#define __NR_io_pgetevents_time64 416
  2635. #define __NR_io_setup 0
  2636. #define __NR_io_submit 2
  2637. #define __NR_io_uring_enter 426
  2638. @@ -123,9 +123,9 @@
  2639. #define __NR_listen 201
  2640. #define __NR_listxattr 11
  2641. #define __NR_llistxattr 12
  2642. -#define __NR_llseek 62
  2643. #define __NR_lookup_dcookie 18
  2644. #define __NR_lremovexattr 15
  2645. +#define __NR_lseek 62
  2646. #define __NR_lsetxattr 6
  2647. #define __NR_madvise 233
  2648. #define __NR_mbind 235
  2649. @@ -138,7 +138,7 @@
  2650. #define __NR_mlock 228
  2651. #define __NR_mlock2 284
  2652. #define __NR_mlockall 230
  2653. -#define __NR_mmap2 222
  2654. +#define __NR_mmap 222
  2655. #define __NR_mount 40
  2656. #define __NR_mount_setattr 442
  2657. #define __NR_move_mount 429
  2658. @@ -147,8 +147,8 @@
  2659. #define __NR_mq_getsetattr 185
  2660. #define __NR_mq_notify 184
  2661. #define __NR_mq_open 180
  2662. -#define __NR_mq_timedreceive_time64 419
  2663. -#define __NR_mq_timedsend_time64 418
  2664. +#define __NR_mq_timedreceive 183
  2665. +#define __NR_mq_timedsend 182
  2666. #define __NR_mq_unlink 181
  2667. #define __NR_mremap 216
  2668. #define __NR_msgctl 187
  2669. @@ -161,6 +161,7 @@
  2670. #define __NR_munmap 215
  2671. #define __NR_name_to_handle_at 264
  2672. #define __NR_nanosleep 101
  2673. +#define __NR_newfstatat 79
  2674. #define __NR_nfsservctl 42
  2675. #define __NR_open_by_handle_at 265
  2676. #define __NR_open_tree 428
  2677. @@ -176,7 +177,7 @@
  2678. #define __NR_pkey_alloc 289
  2679. #define __NR_pkey_free 290
  2680. #define __NR_pkey_mprotect 288
  2681. -#define __NR_ppoll_time64 414
  2682. +#define __NR_ppoll 73
  2683. #define __NR_prctl 167
  2684. #define __NR_pread64 67
  2685. #define __NR_preadv 69
  2686. @@ -186,7 +187,7 @@
  2687. #define __NR_process_mrelease 448
  2688. #define __NR_process_vm_readv 270
  2689. #define __NR_process_vm_writev 271
  2690. -#define __NR_pselect6_time64 413
  2691. +#define __NR_pselect6 72
  2692. #define __NR_ptrace 117
  2693. #define __NR_pwrite64 68
  2694. #define __NR_pwritev 70
  2695. @@ -199,7 +200,7 @@
  2696. #define __NR_readv 65
  2697. #define __NR_reboot 142
  2698. #define __NR_recvfrom 207
  2699. -#define __NR_recvmmsg_time64 417
  2700. +#define __NR_recvmmsg 243
  2701. #define __NR_recvmsg 212
  2702. #define __NR_remap_file_pages 234
  2703. #define __NR_removexattr 14
  2704. @@ -214,7 +215,7 @@
  2705. #define __NR_rt_sigqueueinfo 138
  2706. #define __NR_rt_sigreturn 139
  2707. #define __NR_rt_sigsuspend 133
  2708. -#define __NR_rt_sigtimedwait_time64 421
  2709. +#define __NR_rt_sigtimedwait 137
  2710. #define __NR_rt_tgsigqueueinfo 240
  2711. #define __NR_sched_get_priority_max 125
  2712. #define __NR_sched_get_priority_min 126
  2713. @@ -222,7 +223,7 @@
  2714. #define __NR_sched_getattr 275
  2715. #define __NR_sched_getparam 121
  2716. #define __NR_sched_getscheduler 120
  2717. -#define __NR_sched_rr_get_interval_time64 423
  2718. +#define __NR_sched_rr_get_interval 127
  2719. #define __NR_sched_setaffinity 122
  2720. #define __NR_sched_setattr 274
  2721. #define __NR_sched_setparam 118
  2722. @@ -232,8 +233,8 @@
  2723. #define __NR_semctl 191
  2724. #define __NR_semget 190
  2725. #define __NR_semop 193
  2726. -#define __NR_semtimedop_time64 420
  2727. -#define __NR_sendfile64 71
  2728. +#define __NR_semtimedop 192
  2729. +#define __NR_sendfile 71
  2730. #define __NR_sendmmsg 269
  2731. #define __NR_sendmsg 211
  2732. #define __NR_sendto 206
  2733. @@ -271,7 +272,7 @@
  2734. #define __NR_socket 198
  2735. #define __NR_socketpair 199
  2736. #define __NR_splice 76
  2737. -#define __NR_statfs64 43
  2738. +#define __NR_statfs 43
  2739. #define __NR_statx 291
  2740. #define __NR_swapoff 225
  2741. #define __NR_swapon 224
  2742. @@ -287,21 +288,21 @@
  2743. #define __NR_timer_create 107
  2744. #define __NR_timer_delete 111
  2745. #define __NR_timer_getoverrun 109
  2746. -#define __NR_timer_gettime64 408
  2747. -#define __NR_timer_settime64 409
  2748. +#define __NR_timer_gettime 108
  2749. +#define __NR_timer_settime 110
  2750. #define __NR_timerfd_create 85
  2751. -#define __NR_timerfd_gettime64 410
  2752. -#define __NR_timerfd_settime64 411
  2753. +#define __NR_timerfd_gettime 87
  2754. +#define __NR_timerfd_settime 86
  2755. #define __NR_times 153
  2756. #define __NR_tkill 130
  2757. -#define __NR_truncate64 45
  2758. +#define __NR_truncate 45
  2759. #define __NR_umask 166
  2760. #define __NR_umount2 39
  2761. #define __NR_uname 160
  2762. #define __NR_unlinkat 35
  2763. #define __NR_unshare 97
  2764. #define __NR_userfaultfd 282
  2765. -#define __NR_utimensat_time64 412
  2766. +#define __NR_utimensat 88
  2767. #define __NR_vhangup 58
  2768. #define __NR_vmsplice 75
  2769. #define __NR_wait4 260
  2770. diff --git a/sysdeps/unix/sysv/linux/arc/c++-types.data b/sysdeps/unix/sysv/linux/arc/arc64/c++-types.data
  2771. similarity index 73%
  2772. rename from sysdeps/unix/sysv/linux/arc/c++-types.data
  2773. rename to sysdeps/unix/sysv/linux/arc/arc64/c++-types.data
  2774. index 0fb0143ae7..ac925ccb36 100644
  2775. --- a/sysdeps/unix/sysv/linux/arc/c++-types.data
  2776. +++ b/sysdeps/unix/sysv/linux/arc/arc64/c++-types.data
  2777. @@ -1,32 +1,32 @@
  2778. -blkcnt64_t:x
  2779. -blkcnt_t:x
  2780. +blkcnt64_t:l
  2781. +blkcnt_t:l
  2782. blksize_t:i
  2783. caddr_t:Pc
  2784. clockid_t:i
  2785. clock_t:l
  2786. daddr_t:i
  2787. -dev_t:y
  2788. +dev_t:m
  2789. fd_mask:l
  2790. -fsblkcnt64_t:y
  2791. -fsblkcnt_t:y
  2792. -fsfilcnt64_t:y
  2793. -fsfilcnt_t:y
  2794. +fsblkcnt64_t:m
  2795. +fsblkcnt_t:m
  2796. +fsfilcnt64_t:m
  2797. +fsfilcnt_t:m
  2798. fsid_t:8__fsid_t
  2799. gid_t:j
  2800. id_t:j
  2801. -ino64_t:y
  2802. -ino_t:y
  2803. +ino64_t:m
  2804. +ino_t:m
  2805. int16_t:s
  2806. int32_t:i
  2807. -int64_t:x
  2808. +int64_t:l
  2809. int8_t:a
  2810. -intptr_t:i
  2811. +intptr_t:l
  2812. key_t:i
  2813. -loff_t:x
  2814. +loff_t:l
  2815. mode_t:j
  2816. nlink_t:j
  2817. -off64_t:x
  2818. -off_t:x
  2819. +off64_t:l
  2820. +off_t:l
  2821. pid_t:i
  2822. pthread_attr_t:14pthread_attr_t
  2823. pthread_barrier_t:17pthread_barrier_t
  2824. @@ -41,27 +41,27 @@ pthread_rwlock_t:16pthread_rwlock_t
  2825. pthread_rwlockattr_t:20pthread_rwlockattr_t
  2826. pthread_spinlock_t:i
  2827. pthread_t:m
  2828. -quad_t:x
  2829. -register_t:i
  2830. -rlim64_t:y
  2831. -rlim_t:y
  2832. +quad_t:l
  2833. +register_t:l
  2834. +rlim64_t:m
  2835. +rlim_t:m
  2836. sigset_t:10__sigset_t
  2837. -size_t:j
  2838. +size_t:m
  2839. socklen_t:j
  2840. -ssize_t:i
  2841. -suseconds_t:x
  2842. -time_t:x
  2843. +ssize_t:l
  2844. +suseconds_t:l
  2845. +time_t:l
  2846. u_char:h
  2847. uid_t:j
  2848. uint:j
  2849. u_int:j
  2850. u_int16_t:t
  2851. u_int32_t:j
  2852. -u_int64_t:y
  2853. +u_int64_t:m
  2854. u_int8_t:h
  2855. ulong:m
  2856. u_long:m
  2857. -u_quad_t:y
  2858. +u_quad_t:m
  2859. useconds_t:j
  2860. ushort:t
  2861. u_short:t
  2862. diff --git a/sysdeps/unix/sysv/linux/arc/ld.abilist b/sysdeps/unix/sysv/linux/arc/arc64/ld.abilist
  2863. similarity index 54%
  2864. rename from sysdeps/unix/sysv/linux/arc/ld.abilist
  2865. rename to sysdeps/unix/sysv/linux/arc/arc64/ld.abilist
  2866. index 55f0c2ab9c..3a4bcb95f2 100644
  2867. --- a/sysdeps/unix/sysv/linux/arc/ld.abilist
  2868. +++ b/sysdeps/unix/sysv/linux/arc/arc64/ld.abilist
  2869. @@ -1,9 +1,9 @@
  2870. -GLIBC_2.32 __libc_stack_end D 0x4
  2871. -GLIBC_2.32 __stack_chk_guard D 0x4
  2872. +GLIBC_2.32 __libc_stack_end D 0x8
  2873. +GLIBC_2.32 __stack_chk_guard D 0x8
  2874. GLIBC_2.32 __tls_get_addr F
  2875. GLIBC_2.32 _dl_mcount F
  2876. -GLIBC_2.32 _r_debug D 0x14
  2877. +GLIBC_2.32 _r_debug D 0x28
  2878. GLIBC_2.34 __rtld_version_placeholder F
  2879. GLIBC_2.35 __rseq_flags D 0x4
  2880. -GLIBC_2.35 __rseq_offset D 0x4
  2881. +GLIBC_2.35 __rseq_offset D 0x8
  2882. GLIBC_2.35 __rseq_size D 0x4
  2883. diff --git a/sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libBrokenLocale.abilist
  2884. similarity index 100%
  2885. rename from sysdeps/unix/sysv/linux/arc/libBrokenLocale.abilist
  2886. rename to sysdeps/unix/sysv/linux/arc/arc64/libBrokenLocale.abilist
  2887. diff --git a/sysdeps/unix/sysv/linux/arc/libanl.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libanl.abilist
  2888. similarity index 100%
  2889. rename from sysdeps/unix/sysv/linux/arc/libanl.abilist
  2890. rename to sysdeps/unix/sysv/linux/arc/arc64/libanl.abilist
  2891. diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libc.abilist
  2892. similarity index 97%
  2893. rename from sysdeps/unix/sysv/linux/arc/libc.abilist
  2894. rename to sysdeps/unix/sysv/linux/arc/arc64/libc.abilist
  2895. index dfe0c3f7b6..d07723e742 100644
  2896. --- a/sysdeps/unix/sysv/linux/arc/libc.abilist
  2897. +++ b/sysdeps/unix/sysv/linux/arc/arc64/libc.abilist
  2898. @@ -1,7 +1,7 @@
  2899. GLIBC_2.32 _Exit F
  2900. -GLIBC_2.32 _IO_2_1_stderr_ D 0x9c
  2901. -GLIBC_2.32 _IO_2_1_stdin_ D 0x9c
  2902. -GLIBC_2.32 _IO_2_1_stdout_ D 0x9c
  2903. +GLIBC_2.32 _IO_2_1_stderr_ D 0xe0
  2904. +GLIBC_2.32 _IO_2_1_stdin_ D 0xe0
  2905. +GLIBC_2.32 _IO_2_1_stdout_ D 0xe0
  2906. GLIBC_2.32 _IO_adjust_column F
  2907. GLIBC_2.32 _IO_adjust_wcolumn F
  2908. GLIBC_2.32 _IO_default_doallocate F
  2909. @@ -27,7 +27,7 @@ GLIBC_2.32 _IO_file_doallocate F
  2910. GLIBC_2.32 _IO_file_finish F
  2911. GLIBC_2.32 _IO_file_fopen F
  2912. GLIBC_2.32 _IO_file_init F
  2913. -GLIBC_2.32 _IO_file_jumps D 0x54
  2914. +GLIBC_2.32 _IO_file_jumps D 0xa8
  2915. GLIBC_2.32 _IO_file_open F
  2916. GLIBC_2.32 _IO_file_overflow F
  2917. GLIBC_2.32 _IO_file_read F
  2918. @@ -67,7 +67,7 @@ GLIBC_2.32 _IO_iter_file F
  2919. GLIBC_2.32 _IO_iter_next F
  2920. GLIBC_2.32 _IO_least_wmarker F
  2921. GLIBC_2.32 _IO_link_in F
  2922. -GLIBC_2.32 _IO_list_all D 0x4
  2923. +GLIBC_2.32 _IO_list_all D 0x8
  2924. GLIBC_2.32 _IO_list_lock F
  2925. GLIBC_2.32 _IO_list_resetlock F
  2926. GLIBC_2.32 _IO_list_unlock F
  2927. @@ -120,7 +120,7 @@ GLIBC_2.32 _IO_wdefault_xsgetn F
  2928. GLIBC_2.32 _IO_wdefault_xsputn F
  2929. GLIBC_2.32 _IO_wdo_write F
  2930. GLIBC_2.32 _IO_wdoallocbuf F
  2931. -GLIBC_2.32 _IO_wfile_jumps D 0x54
  2932. +GLIBC_2.32 _IO_wfile_jumps D 0xa8
  2933. GLIBC_2.32 _IO_wfile_overflow F
  2934. GLIBC_2.32 _IO_wfile_seekoff F
  2935. GLIBC_2.32 _IO_wfile_sync F
  2936. @@ -128,9 +128,9 @@ GLIBC_2.32 _IO_wfile_underflow F
  2937. GLIBC_2.32 _IO_wfile_xsputn F
  2938. GLIBC_2.32 _IO_wmarker_delta F
  2939. GLIBC_2.32 _IO_wsetb F
  2940. -GLIBC_2.32 ___brk_addr D 0x4
  2941. +GLIBC_2.32 ___brk_addr D 0x8
  2942. GLIBC_2.32 __adjtimex F
  2943. -GLIBC_2.32 __after_morecore_hook D 0x4
  2944. +GLIBC_2.32 __after_morecore_hook D 0x8
  2945. GLIBC_2.32 __argz_count F
  2946. GLIBC_2.32 __argz_next F
  2947. GLIBC_2.32 __argz_stringify F
  2948. @@ -155,7 +155,7 @@ GLIBC_2.32 __ctype_b_loc F
  2949. GLIBC_2.32 __ctype_get_mb_cur_max F
  2950. GLIBC_2.32 __ctype_tolower_loc F
  2951. GLIBC_2.32 __ctype_toupper_loc F
  2952. -GLIBC_2.32 __curbrk D 0x4
  2953. +GLIBC_2.32 __curbrk D 0x8
  2954. GLIBC_2.32 __cxa_at_quick_exit F
  2955. GLIBC_2.32 __cxa_atexit F
  2956. GLIBC_2.32 __cxa_finalize F
  2957. @@ -173,7 +173,7 @@ GLIBC_2.32 __dprintf_chk F
  2958. GLIBC_2.32 __dup2 F
  2959. GLIBC_2.32 __duplocale F
  2960. GLIBC_2.32 __endmntent F
  2961. -GLIBC_2.32 __environ D 0x4
  2962. +GLIBC_2.32 __environ D 0x8
  2963. GLIBC_2.32 __errno_location F
  2964. GLIBC_2.32 __explicit_bzero_chk F
  2965. GLIBC_2.32 __fbufsize F
  2966. @@ -197,7 +197,7 @@ GLIBC_2.32 __fread_chk F
  2967. GLIBC_2.32 __fread_unlocked_chk F
  2968. GLIBC_2.32 __freadable F
  2969. GLIBC_2.32 __freading F
  2970. -GLIBC_2.32 __free_hook D 0x4
  2971. +GLIBC_2.32 __free_hook D 0x8
  2972. GLIBC_2.32 __freelocale F
  2973. GLIBC_2.32 __fsetlocking F
  2974. GLIBC_2.32 __fwprintf_chk F
  2975. @@ -289,20 +289,20 @@ GLIBC_2.32 __longjmp_chk F
  2976. GLIBC_2.32 __lseek F
  2977. GLIBC_2.32 __lxstat F
  2978. GLIBC_2.32 __lxstat64 F
  2979. -GLIBC_2.32 __malloc_hook D 0x4
  2980. +GLIBC_2.32 __malloc_hook D 0x8
  2981. GLIBC_2.32 __mbrlen F
  2982. GLIBC_2.32 __mbrtowc F
  2983. GLIBC_2.32 __mbsnrtowcs_chk F
  2984. GLIBC_2.32 __mbsrtowcs_chk F
  2985. GLIBC_2.32 __mbstowcs_chk F
  2986. -GLIBC_2.32 __memalign_hook D 0x4
  2987. +GLIBC_2.32 __memalign_hook D 0x8
  2988. GLIBC_2.32 __memcpy_chk F
  2989. GLIBC_2.32 __memmove_chk F
  2990. GLIBC_2.32 __mempcpy F
  2991. GLIBC_2.32 __mempcpy_chk F
  2992. GLIBC_2.32 __memset_chk F
  2993. GLIBC_2.32 __monstartup F
  2994. -GLIBC_2.32 __morecore D 0x4
  2995. +GLIBC_2.32 __morecore D 0x8
  2996. GLIBC_2.32 __mq_open_2 F
  2997. GLIBC_2.32 __nanosleep F
  2998. GLIBC_2.32 __newlocale F
  2999. @@ -329,8 +329,8 @@ GLIBC_2.32 __pread_chk F
  3000. GLIBC_2.32 __printf_chk F
  3001. GLIBC_2.32 __printf_fp F
  3002. GLIBC_2.32 __profile_frequency F
  3003. -GLIBC_2.32 __progname D 0x4
  3004. -GLIBC_2.32 __progname_full D 0x4
  3005. +GLIBC_2.32 __progname D 0x8
  3006. +GLIBC_2.32 __progname_full D 0x8
  3007. GLIBC_2.32 __pthread_cleanup_routine F
  3008. GLIBC_2.32 __pthread_getspecific F
  3009. GLIBC_2.32 __pthread_key_create F
  3010. @@ -359,12 +359,12 @@ GLIBC_2.32 __pthread_unwind_next F
  3011. GLIBC_2.32 __ptsname_r_chk F
  3012. GLIBC_2.32 __pwrite64 F
  3013. GLIBC_2.32 __rawmemchr F
  3014. -GLIBC_2.32 __rcmd_errstr D 0x4
  3015. +GLIBC_2.32 __rcmd_errstr D 0x8
  3016. GLIBC_2.32 __read F
  3017. GLIBC_2.32 __read_chk F
  3018. GLIBC_2.32 __readlink_chk F
  3019. GLIBC_2.32 __readlinkat_chk F
  3020. -GLIBC_2.32 __realloc_hook D 0x4
  3021. +GLIBC_2.32 __realloc_hook D 0x8
  3022. GLIBC_2.32 __realpath_chk F
  3023. GLIBC_2.32 __recv_chk F
  3024. GLIBC_2.32 __recvfrom_chk F
  3025. @@ -452,7 +452,7 @@ GLIBC_2.32 __swprintf_chk F
  3026. GLIBC_2.32 __sysconf F
  3027. GLIBC_2.32 __syslog_chk F
  3028. GLIBC_2.32 __sysv_signal F
  3029. -GLIBC_2.32 __timezone D 0x4
  3030. +GLIBC_2.32 __timezone D 0x8
  3031. GLIBC_2.32 __toascii_l F
  3032. GLIBC_2.32 __tolower_l F
  3033. GLIBC_2.32 __toupper_l F
  3034. @@ -461,7 +461,7 @@ GLIBC_2.32 __towctrans_l F
  3035. GLIBC_2.32 __towlower_l F
  3036. GLIBC_2.32 __towupper_l F
  3037. GLIBC_2.32 __ttyname_r_chk F
  3038. -GLIBC_2.32 __tzname D 0x8
  3039. +GLIBC_2.32 __tzname D 0x10
  3040. GLIBC_2.32 __uflow F
  3041. GLIBC_2.32 __underflow F
  3042. GLIBC_2.32 __uselocale F
  3043. @@ -531,7 +531,7 @@ GLIBC_2.32 __xstat F
  3044. GLIBC_2.32 __xstat64 F
  3045. GLIBC_2.32 _dl_mcount_wrapper F
  3046. GLIBC_2.32 _dl_mcount_wrapper_check F
  3047. -GLIBC_2.32 _environ D 0x4
  3048. +GLIBC_2.32 _environ D 0x8
  3049. GLIBC_2.32 _exit F
  3050. GLIBC_2.32 _flush_cache F
  3051. GLIBC_2.32 _flushlbf F
  3052. @@ -540,7 +540,7 @@ GLIBC_2.32 _longjmp F
  3053. GLIBC_2.32 _mcleanup F
  3054. GLIBC_2.32 _mcount F
  3055. GLIBC_2.32 _nl_default_dirname D 0x12
  3056. -GLIBC_2.32 _nl_domain_bindings D 0x4
  3057. +GLIBC_2.32 _nl_domain_bindings D 0x8
  3058. GLIBC_2.32 _nl_msg_cat_cntr D 0x4
  3059. GLIBC_2.32 _obstack_allocated_p F
  3060. GLIBC_2.32 _obstack_begin F
  3061. @@ -552,8 +552,8 @@ GLIBC_2.32 _pthread_cleanup_pop F
  3062. GLIBC_2.32 _pthread_cleanup_pop_restore F
  3063. GLIBC_2.32 _pthread_cleanup_push F
  3064. GLIBC_2.32 _pthread_cleanup_push_defer F
  3065. -GLIBC_2.32 _res D 0x200
  3066. -GLIBC_2.32 _res_hconf D 0x30
  3067. +GLIBC_2.32 _res D 0x238
  3068. +GLIBC_2.32 _res_hconf D 0x48
  3069. GLIBC_2.32 _setjmp F
  3070. GLIBC_2.32 _tolower F
  3071. GLIBC_2.32 _toupper F
  3072. @@ -592,9 +592,9 @@ GLIBC_2.32 argp_error F
  3073. GLIBC_2.32 argp_failure F
  3074. GLIBC_2.32 argp_help F
  3075. GLIBC_2.32 argp_parse F
  3076. -GLIBC_2.32 argp_program_bug_address D 0x4
  3077. -GLIBC_2.32 argp_program_version D 0x4
  3078. -GLIBC_2.32 argp_program_version_hook D 0x4
  3079. +GLIBC_2.32 argp_program_bug_address D 0x8
  3080. +GLIBC_2.32 argp_program_version D 0x8
  3081. +GLIBC_2.32 argp_program_version_hook D 0x8
  3082. GLIBC_2.32 argp_state_help F
  3083. GLIBC_2.32 argp_usage F
  3084. GLIBC_2.32 argz_add F
  3085. @@ -734,7 +734,7 @@ GLIBC_2.32 endttyent F
  3086. GLIBC_2.32 endusershell F
  3087. GLIBC_2.32 endutent F
  3088. GLIBC_2.32 endutxent F
  3089. -GLIBC_2.32 environ D 0x4
  3090. +GLIBC_2.32 environ D 0x8
  3091. GLIBC_2.32 envz_add F
  3092. GLIBC_2.32 envz_entry F
  3093. GLIBC_2.32 envz_get F
  3094. @@ -753,7 +753,7 @@ GLIBC_2.32 error F
  3095. GLIBC_2.32 error_at_line F
  3096. GLIBC_2.32 error_message_count D 0x4
  3097. GLIBC_2.32 error_one_per_line D 0x4
  3098. -GLIBC_2.32 error_print_progname D 0x4
  3099. +GLIBC_2.32 error_print_progname D 0x8
  3100. GLIBC_2.32 errx F
  3101. GLIBC_2.32 ether_aton F
  3102. GLIBC_2.32 ether_aton_r F
  3103. @@ -1078,7 +1078,7 @@ GLIBC_2.32 grantpt F
  3104. GLIBC_2.32 group_member F
  3105. GLIBC_2.32 gsignal F
  3106. GLIBC_2.32 gtty F
  3107. -GLIBC_2.32 h_errlist D 0x14
  3108. +GLIBC_2.32 h_errlist D 0x28
  3109. GLIBC_2.32 h_nerr D 0x4
  3110. GLIBC_2.32 hasmntopt F
  3111. GLIBC_2.32 hcreate F
  3112. @@ -1260,7 +1260,7 @@ GLIBC_2.32 malloc_stats F
  3113. GLIBC_2.32 malloc_trim F
  3114. GLIBC_2.32 malloc_usable_size F
  3115. GLIBC_2.32 mallopt F
  3116. -GLIBC_2.32 mallwatch D 0x4
  3117. +GLIBC_2.32 mallwatch D 0x8
  3118. GLIBC_2.32 mblen F
  3119. GLIBC_2.32 mbrlen F
  3120. GLIBC_2.32 mbrtoc16 F
  3121. @@ -1367,7 +1367,7 @@ GLIBC_2.32 ntohs F
  3122. GLIBC_2.32 ntp_adjtime F
  3123. GLIBC_2.32 ntp_gettime F
  3124. GLIBC_2.32 ntp_gettimex F
  3125. -GLIBC_2.32 obstack_alloc_failed_handler D 0x4
  3126. +GLIBC_2.32 obstack_alloc_failed_handler D 0x8
  3127. GLIBC_2.32 obstack_exit_failure D 0x4
  3128. GLIBC_2.32 obstack_free F
  3129. GLIBC_2.32 obstack_printf F
  3130. @@ -1383,7 +1383,7 @@ GLIBC_2.32 openat64 F
  3131. GLIBC_2.32 opendir F
  3132. GLIBC_2.32 openlog F
  3133. GLIBC_2.32 openpty F
  3134. -GLIBC_2.32 optarg D 0x4
  3135. +GLIBC_2.32 optarg D 0x8
  3136. GLIBC_2.32 opterr D 0x4
  3137. GLIBC_2.32 optind D 0x4
  3138. GLIBC_2.32 optopt D 0x4
  3139. @@ -1449,8 +1449,8 @@ GLIBC_2.32 prlimit64 F
  3140. GLIBC_2.32 process_vm_readv F
  3141. GLIBC_2.32 process_vm_writev F
  3142. GLIBC_2.32 profil F
  3143. -GLIBC_2.32 program_invocation_name D 0x4
  3144. -GLIBC_2.32 program_invocation_short_name D 0x4
  3145. +GLIBC_2.32 program_invocation_name D 0x8
  3146. +GLIBC_2.32 program_invocation_short_name D 0x8
  3147. GLIBC_2.32 pselect F
  3148. GLIBC_2.32 psiginfo F
  3149. GLIBC_2.32 psignal F
  3150. @@ -1637,7 +1637,7 @@ GLIBC_2.32 re_search F
  3151. GLIBC_2.32 re_search_2 F
  3152. GLIBC_2.32 re_set_registers F
  3153. GLIBC_2.32 re_set_syntax F
  3154. -GLIBC_2.32 re_syntax_options D 0x4
  3155. +GLIBC_2.32 re_syntax_options D 0x8
  3156. GLIBC_2.32 read F
  3157. GLIBC_2.32 readahead F
  3158. GLIBC_2.32 readdir F
  3159. @@ -1850,9 +1850,9 @@ GLIBC_2.32 statfs64 F
  3160. GLIBC_2.32 statvfs F
  3161. GLIBC_2.32 statvfs64 F
  3162. GLIBC_2.32 statx F
  3163. -GLIBC_2.32 stderr D 0x4
  3164. -GLIBC_2.32 stdin D 0x4
  3165. -GLIBC_2.32 stdout D 0x4
  3166. +GLIBC_2.32 stderr D 0x8
  3167. +GLIBC_2.32 stdin D 0x8
  3168. +GLIBC_2.32 stdout D 0x8
  3169. GLIBC_2.32 stpcpy F
  3170. GLIBC_2.32 stpncpy F
  3171. GLIBC_2.32 strcasecmp F
  3172. @@ -1984,7 +1984,7 @@ GLIBC_2.32 timerfd_gettime F
  3173. GLIBC_2.32 timerfd_settime F
  3174. GLIBC_2.32 times F
  3175. GLIBC_2.32 timespec_get F
  3176. -GLIBC_2.32 timezone D 0x4
  3177. +GLIBC_2.32 timezone D 0x8
  3178. GLIBC_2.32 tmpfile F
  3179. GLIBC_2.32 tmpfile64 F
  3180. GLIBC_2.32 tmpnam F
  3181. @@ -2013,7 +2013,7 @@ GLIBC_2.32 ttyname_r F
  3182. GLIBC_2.32 ttyslot F
  3183. GLIBC_2.32 twalk F
  3184. GLIBC_2.32 twalk_r F
  3185. -GLIBC_2.32 tzname D 0x8
  3186. +GLIBC_2.32 tzname D 0x10
  3187. GLIBC_2.32 tzset F
  3188. GLIBC_2.32 ualarm F
  3189. GLIBC_2.32 ulckpwdf F
  3190. diff --git a/sysdeps/unix/sysv/linux/arc/libc_malloc_debug.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libc_malloc_debug.abilist
  3191. similarity index 80%
  3192. rename from sysdeps/unix/sysv/linux/arc/libc_malloc_debug.abilist
  3193. rename to sysdeps/unix/sysv/linux/arc/arc64/libc_malloc_debug.abilist
  3194. index cf9f611403..c50393d8cc 100644
  3195. --- a/sysdeps/unix/sysv/linux/arc/libc_malloc_debug.abilist
  3196. +++ b/sysdeps/unix/sysv/linux/arc/arc64/libc_malloc_debug.abilist
  3197. @@ -1,7 +1,7 @@
  3198. -GLIBC_2.32 __free_hook D 0x4
  3199. -GLIBC_2.32 __malloc_hook D 0x4
  3200. -GLIBC_2.32 __memalign_hook D 0x4
  3201. -GLIBC_2.32 __realloc_hook D 0x4
  3202. +GLIBC_2.32 __free_hook D 0x8
  3203. +GLIBC_2.32 __malloc_hook D 0x8
  3204. +GLIBC_2.32 __memalign_hook D 0x8
  3205. +GLIBC_2.32 __realloc_hook D 0x8
  3206. GLIBC_2.32 aligned_alloc F
  3207. GLIBC_2.32 calloc F
  3208. GLIBC_2.32 free F
  3209. diff --git a/sysdeps/unix/sysv/linux/arc/libcrypt.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libcrypt.abilist
  3210. similarity index 100%
  3211. rename from sysdeps/unix/sysv/linux/arc/libcrypt.abilist
  3212. rename to sysdeps/unix/sysv/linux/arc/arc64/libcrypt.abilist
  3213. diff --git a/sysdeps/unix/sysv/linux/arc/libdl.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libdl.abilist
  3214. similarity index 100%
  3215. rename from sysdeps/unix/sysv/linux/arc/libdl.abilist
  3216. rename to sysdeps/unix/sysv/linux/arc/arc64/libdl.abilist
  3217. diff --git a/sysdeps/unix/sysv/linux/arc/libm.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libm.abilist
  3218. similarity index 100%
  3219. rename from sysdeps/unix/sysv/linux/arc/libm.abilist
  3220. rename to sysdeps/unix/sysv/linux/arc/arc64/libm.abilist
  3221. diff --git a/sysdeps/unix/sysv/linux/arc/libpthread.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libpthread.abilist
  3222. similarity index 100%
  3223. rename from sysdeps/unix/sysv/linux/arc/libpthread.abilist
  3224. rename to sysdeps/unix/sysv/linux/arc/arc64/libpthread.abilist
  3225. diff --git a/sysdeps/unix/sysv/linux/arc/libresolv.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libresolv.abilist
  3226. similarity index 95%
  3227. rename from sysdeps/unix/sysv/linux/arc/libresolv.abilist
  3228. rename to sysdeps/unix/sysv/linux/arc/arc64/libresolv.abilist
  3229. index 47c5072f61..76ab1dedfb 100644
  3230. --- a/sysdeps/unix/sysv/linux/arc/libresolv.abilist
  3231. +++ b/sysdeps/unix/sysv/linux/arc/arc64/libresolv.abilist
  3232. @@ -10,7 +10,7 @@ GLIBC_2.32 __loc_ntoa F
  3233. GLIBC_2.32 __p_cdname F
  3234. GLIBC_2.32 __p_cdnname F
  3235. GLIBC_2.32 __p_class F
  3236. -GLIBC_2.32 __p_class_syms D 0x54
  3237. +GLIBC_2.32 __p_class_syms D 0xa8
  3238. GLIBC_2.32 __p_fqname F
  3239. GLIBC_2.32 __p_fqnname F
  3240. GLIBC_2.32 __p_option F
  3241. @@ -18,7 +18,7 @@ GLIBC_2.32 __p_query F
  3242. GLIBC_2.32 __p_rcode F
  3243. GLIBC_2.32 __p_time F
  3244. GLIBC_2.32 __p_type F
  3245. -GLIBC_2.32 __p_type_syms D 0x228
  3246. +GLIBC_2.32 __p_type_syms D 0x450
  3247. GLIBC_2.32 __putlong F
  3248. GLIBC_2.32 __putshort F
  3249. GLIBC_2.32 __res_close F
  3250. diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/arc64/librt.abilist
  3251. similarity index 100%
  3252. rename from sysdeps/unix/sysv/linux/arc/librt.abilist
  3253. rename to sysdeps/unix/sysv/linux/arc/arc64/librt.abilist
  3254. diff --git a/sysdeps/unix/sysv/linux/arc/libthread_db.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libthread_db.abilist
  3255. similarity index 100%
  3256. rename from sysdeps/unix/sysv/linux/arc/libthread_db.abilist
  3257. rename to sysdeps/unix/sysv/linux/arc/arc64/libthread_db.abilist
  3258. diff --git a/sysdeps/unix/sysv/linux/arc/libutil.abilist b/sysdeps/unix/sysv/linux/arc/arc64/libutil.abilist
  3259. similarity index 100%
  3260. rename from sysdeps/unix/sysv/linux/arc/libutil.abilist
  3261. rename to sysdeps/unix/sysv/linux/arc/arc64/libutil.abilist
  3262. diff --git a/sysdeps/unix/sysv/linux/arc/bits/fcntl.h b/sysdeps/unix/sysv/linux/arc/bits/fcntl.h
  3263. new file mode 100644
  3264. index 0000000000..20292fd32f
  3265. --- /dev/null
  3266. +++ b/sysdeps/unix/sysv/linux/arc/bits/fcntl.h
  3267. @@ -0,0 +1,62 @@
  3268. +/* O_*, F_*, FD_* bit values for Linux / ARC
  3269. + Copyright (C) 2011-2021 Free Software Foundation, Inc.
  3270. +
  3271. + This file is part of the GNU C Library.
  3272. +
  3273. + The GNU C Library is free software; you can redistribute it and/or
  3274. + modify it under the terms of the GNU Lesser General Public
  3275. + License as published by the Free Software Foundation; either
  3276. + version 2.1 of the License, or (at your option) any later version.
  3277. +
  3278. + The GNU C Library is distributed in the hope that it will be useful,
  3279. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  3280. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3281. + Lesser General Public License for more details.
  3282. +
  3283. + You should have received a copy of the GNU Lesser General Public
  3284. + License along with the GNU C Library; if not, see
  3285. + <https://www.gnu.org/licenses/>. */
  3286. +
  3287. +#ifndef _FCNTL_H
  3288. +# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
  3289. +#endif
  3290. +
  3291. +#include <bits/wordsize.h>
  3292. +
  3293. +/* In 64-bit ISA files are always with 64bit off_t and F_*LK64 are the same as
  3294. + non-64-bit versions. It will need to be revised for 128-bit. */
  3295. +#if __WORDSIZE == 64
  3296. +# define __O_LARGEFILE 0
  3297. +
  3298. +# define F_GETLK64 5 /* Get record locking info. */
  3299. +# define F_SETLK64 6 /* Set record locking info (non-blocking). */
  3300. +# define F_SETLKW64 7 /* Set record locking info (blocking). */
  3301. +#endif
  3302. +
  3303. +struct flock
  3304. + {
  3305. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  3306. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  3307. +#if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
  3308. + __off_t l_start; /* Offset where the lock begins. */
  3309. + __off_t l_len; /* Size of the locked area; zero means until EOF. */
  3310. +#else
  3311. + __off64_t l_start; /* Offset where the lock begins. */
  3312. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  3313. +#endif
  3314. + __pid_t l_pid; /* Process holding the lock. */
  3315. + };
  3316. +
  3317. +#ifdef __USE_LARGEFILE64
  3318. +struct flock64
  3319. + {
  3320. + short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
  3321. + short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
  3322. + __off64_t l_start; /* Offset where the lock begins. */
  3323. + __off64_t l_len; /* Size of the locked area; zero means until EOF. */
  3324. + __pid_t l_pid; /* Process holding the lock. */
  3325. + };
  3326. +#endif
  3327. +
  3328. +/* Include generic Linux declarations. */
  3329. +#include <bits/fcntl-linux.h>
  3330. diff --git a/sysdeps/unix/sysv/linux/arc/bits/types/__sigset_t.h b/sysdeps/unix/sysv/linux/arc/bits/types/__sigset_t.h
  3331. index 795638a30b..6be69437f8 100644
  3332. --- a/sysdeps/unix/sysv/linux/arc/bits/types/__sigset_t.h
  3333. +++ b/sysdeps/unix/sysv/linux/arc/bits/types/__sigset_t.h
  3334. @@ -3,7 +3,7 @@
  3335. #define ____sigset_t_defined
  3336. /* Linux asm-generic syscall ABI expects sigset_t to hold 64 signals. */
  3337. -#define _SIGSET_NWORDS (64 / (8 * sizeof (unsigned long int)))
  3338. +#define _SIGSET_NWORDS 2
  3339. typedef struct
  3340. {
  3341. unsigned long int __val[_SIGSET_NWORDS];
  3342. diff --git a/sysdeps/unix/sysv/linux/arc/clone.S b/sysdeps/unix/sysv/linux/arc/clone.S
  3343. index d8c7b93d1c..364fa1edde 100644
  3344. --- a/sysdeps/unix/sysv/linux/arc/clone.S
  3345. +++ b/sysdeps/unix/sysv/linux/arc/clone.S
  3346. @@ -31,41 +31,41 @@
  3347. clone syscall in kernel (ABI: CONFIG_CLONE_BACKWARDS)
  3348. int sys_clone(unsigned long int clone_flags,
  3349. - unsigned long int newsp,
  3350. + unsigned long int newsp,
  3351. int __user *parent_tidptr,
  3352. void *tls,
  3353. int __user *child_tidptr). */
  3354. ENTRY (__clone)
  3355. - cmp r0, 0 /* @fn can't be NULL. */
  3356. - and r1,r1,-4 /* @child_stack be 4 bytes aligned per ABI. */
  3357. - cmp.ne r1, 0 /* @child_stack can't be NULL. */
  3358. + CMPR r0, 0 /* @fn can't be NULL. */
  3359. + ANDR r1, r1, -REGSZ /* @child_stack 4/8 aligned per ABI. */
  3360. + CMPR.ne r1, 0 /* @child_stack can't be NULL. */
  3361. bz L (__sys_err)
  3362. /* save some of the orig args
  3363. r0 containing @fn will be clobbered AFTER syscall (with ret val)
  3364. rest are clobbered BEFORE syscall due to different arg ordering. */
  3365. - mov r10, r0 /* @fn. */
  3366. - mov r11, r3 /* @args. */
  3367. - mov r12, r2 /* @clone_flags. */
  3368. - mov r9, r5 /* @tls. */
  3369. + MOVR r10, r0 /* @fn. */
  3370. + MOVR r11, r3 /* @args. */
  3371. + MOVR r12, r2 /* @clone_flags. */
  3372. + MOVR r9, r5 /* @tls. */
  3373. /* adjust libc args for syscall. */
  3374. - mov r0, r2 /* libc @flags is 1st syscall arg. */
  3375. - mov r2, r4 /* libc @ptid. */
  3376. - mov r3, r5 /* libc @tls. */
  3377. - mov r4, r6 /* libc @ctid. */
  3378. + MOVR r0, r2 /* libc @flags is 1st syscall arg. */
  3379. + MOVR r2, r4 /* libc @ptid. */
  3380. + MOVR r3, r5 /* libc @tls. */
  3381. + MOVR r4, r6 /* libc @ctid. */
  3382. mov r8, __NR_clone
  3383. ARC_TRAP_INSN
  3384. - cmp r0, 0 /* return code : 0 new process, !0 parent. */
  3385. + CMPR r0, 0 /* return code : 0 new process, !0 parent. */
  3386. beq thread_start_clone
  3387. blt L (__sys_err2) /* < 0 (signed) error. */
  3388. j [blink] /* Parent returns. */
  3389. L (__sys_err):
  3390. - mov r0, -EINVAL
  3391. + MOVR r0, -EINVAL
  3392. L (__sys_err2):
  3393. /* (1) No need to make -ve kernel error code as positive errno
  3394. __syscall_error expects the -ve error code returned by kernel
  3395. @@ -87,7 +87,7 @@ thread_start_clone:
  3396. /* Child jumps off to @fn with @arg as argument. */
  3397. jl.d [r10]
  3398. - mov r0, r11
  3399. + MOVR r0, r11
  3400. /* exit() with result from @fn (already in r0). */
  3401. mov r8, __NR_exit
  3402. diff --git a/sysdeps/unix/sysv/linux/arc/clone3.S b/sysdeps/unix/sysv/linux/arc/clone3.S
  3403. index 87a8272a39..7fc61524b5 100644
  3404. --- a/sysdeps/unix/sysv/linux/arc/clone3.S
  3405. +++ b/sysdeps/unix/sysv/linux/arc/clone3.S
  3406. @@ -37,9 +37,9 @@
  3407. ENTRY(__clone3)
  3408. /* Save args for the child. */
  3409. - mov r10, r0 /* cl_args */
  3410. - mov r11, r2 /* func */
  3411. - mov r12, r3 /* args */
  3412. + MOVR r10, r0 /* cl_args */
  3413. + MOVR r11, r2 /* func */
  3414. + MOVR r12, r3 /* args */
  3415. /* Sanity check args. */
  3416. breq r10, 0, L (__sys_err) /* No NULL cl_args pointer. */
  3417. @@ -49,17 +49,17 @@ ENTRY(__clone3)
  3418. r8: system call number
  3419. r0: cl_args
  3420. r1: size */
  3421. - mov r0, r10
  3422. + MOVR r0, r10
  3423. mov r8, __NR_clone3
  3424. ARC_TRAP_INSN
  3425. - cmp r0, 0
  3426. + CMPR r0, 0
  3427. beq thread_start_clone3 /* Child returns. */
  3428. blt L (__sys_err2)
  3429. j [blink] /* Parent returns. */
  3430. L (__sys_err):
  3431. - mov r0, -EINVAL
  3432. + MOVR r0, -EINVAL
  3433. L (__sys_err2):
  3434. b __syscall_error
  3435. PSEUDO_END (__clone3)
  3436. @@ -74,7 +74,7 @@ thread_start_clone3:
  3437. /* Child jumps off to @fn with @arg as argument. */
  3438. jl.d [r11]
  3439. - mov r0, r12
  3440. + MOVR r0, r12
  3441. /* exit() with result from @fn (already in r0). */
  3442. mov r8, __NR_exit
  3443. diff --git a/sysdeps/unix/sysv/linux/arc/getcontext.S b/sysdeps/unix/sysv/linux/arc/getcontext.S
  3444. index eb75c8ce02..851981b64c 100644
  3445. --- a/sysdeps/unix/sysv/linux/arc/getcontext.S
  3446. +++ b/sysdeps/unix/sysv/linux/arc/getcontext.S
  3447. @@ -26,39 +26,58 @@
  3448. ENTRY (__getcontext)
  3449. /* Callee saved registers. */
  3450. - add r2, r0, UCONTEXT_MCONTEXT
  3451. - STR (r13, r2, 37)
  3452. - STR (r14, r2, 36)
  3453. - STR (r15, r2, 35)
  3454. - STR (r16, r2, 34)
  3455. - STR (r17, r2, 33)
  3456. - STR (r18, r2, 32)
  3457. - STR (r19, r2, 31)
  3458. - STR (r20, r2, 30)
  3459. - STR (r21, r2, 29)
  3460. - STR (r22, r2, 28)
  3461. - STR (r23, r2, 27)
  3462. - STR (r24, r2, 26)
  3463. + ADDR r2, r0, UCONTEXT_MCONTEXT
  3464. + STR.as r13, r2, 37
  3465. + STR.as r14, r2, 36
  3466. + STR.as r15, r2, 35
  3467. + STR.as r16, r2, 34
  3468. + STR.as r17, r2, 33
  3469. + STR.as r18, r2, 32
  3470. + STR.as r19, r2, 31
  3471. + STR.as r20, r2, 30
  3472. + STR.as r21, r2, 29
  3473. + STR.as r22, r2, 28
  3474. + STR.as r23, r2, 27
  3475. + STR.as r24, r2, 26
  3476. - STR (blink, r2, 7)
  3477. - STR (fp, r2, 8)
  3478. - STR (gp, r2, 9)
  3479. - STR (sp, r2, 23)
  3480. + STR.as blink, r2, 7
  3481. + STR.as fp, r2, 8
  3482. + STR.as gp, r2, 9
  3483. + STR.as sp, r2, 23
  3484. +
  3485. +#if defined (__ARC_FLOAT_ABI_HARD__)
  3486. + FSTR.as f16, r2, 51
  3487. + FSTR.as f17, r2, 52
  3488. + FSTR.as f18, r2, 53
  3489. + FSTR.as f19, r2, 54
  3490. + FSTR.as f20, r2, 55
  3491. + FSTR.as f21, r2, 56
  3492. + FSTR.as f22, r2, 57
  3493. + FSTR.as f23, r2, 58
  3494. + FSTR.as f24, r2, 59
  3495. + FSTR.as f25, r2, 60
  3496. + FSTR.as f26, r2, 61
  3497. + FSTR.as f27, r2, 62
  3498. + FSTR.as f28, r2, 63
  3499. + FSTR.as f29, r2, 64
  3500. + FSTR.as f30, r2, 65
  3501. + FSTR.as f31, r2, 66
  3502. +#endif
  3503. /* Save 0 in r0 placeholder to return 0 when this @ucp activated. */
  3504. - mov r9, 0
  3505. - STR (r9, r2, 22)
  3506. + mov r9, 0
  3507. + STR.as r9, r2, 22
  3508. /* rt_sigprocmask (SIG_BLOCK, NULL, &ucp->uc_sigmask, _NSIG8). */
  3509. - mov r3, _NSIG8
  3510. - add r2, r0, UCONTEXT_SIGMASK
  3511. - mov r1, 0
  3512. - mov r0, SIG_BLOCK
  3513. - mov r8, __NR_rt_sigprocmask
  3514. + mov r3, _NSIG8
  3515. + ADDR r2, r0, UCONTEXT_SIGMASK
  3516. + mov r1, 0
  3517. + mov r0, SIG_BLOCK
  3518. + mov r8, __NR_rt_sigprocmask
  3519. ARC_TRAP_INSN
  3520. - brhi r0, -1024, L (call_syscall_err)
  3521. + BRRhi r0, -1024, L (call_syscall_err)
  3522. j.d [blink]
  3523. - mov r0, 0 /* Success, error handled in .Lcall_syscall_err. */
  3524. + mov r0, 0 /* Success, error handled in .Lcall_syscall_err. */
  3525. PSEUDO_END (__getcontext)
  3526. weak_alias (__getcontext, getcontext)
  3527. diff --git a/sysdeps/unix/sysv/linux/arc/setcontext.S b/sysdeps/unix/sysv/linux/arc/setcontext.S
  3528. index 12708379d2..e0b8b1a183 100644
  3529. --- a/sysdeps/unix/sysv/linux/arc/setcontext.S
  3530. +++ b/sysdeps/unix/sysv/linux/arc/setcontext.S
  3531. @@ -24,46 +24,74 @@
  3532. ENTRY (__setcontext)
  3533. - mov r9, r0 /* Stash @ucp across syscall. */
  3534. + MOVR r9, r0 /* Stash @ucp across syscall. */
  3535. /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, NULL, _NSIG8). */
  3536. mov r3, _NSIG8
  3537. mov r2, 0
  3538. - add r1, r0, UCONTEXT_SIGMASK
  3539. + ADDR r1, r0, UCONTEXT_SIGMASK
  3540. mov r0, SIG_SETMASK
  3541. mov r8, __NR_rt_sigprocmask
  3542. ARC_TRAP_INSN
  3543. - brhi r0, -1024, L (call_syscall_err)
  3544. + BRRhi r0, -1024, L (call_syscall_err)
  3545. /* Restore scratch/arg regs for makecontext case. */
  3546. add r9, r9, UCONTEXT_MCONTEXT
  3547. - LDR (r0, r9, 22)
  3548. - LDR (r1, r9, 21)
  3549. - LDR (r2, r9, 20)
  3550. - LDR (r3, r9, 19)
  3551. - LDR (r4, r9, 18)
  3552. - LDR (r5, r9, 17)
  3553. - LDR (r6, r9, 16)
  3554. - LDR (r7, r9, 15)
  3555. + LDR.as r0, r9, 22
  3556. + LDR.as r1, r9, 21
  3557. + LDR.as r2, r9, 20
  3558. + LDR.as r3, r9, 19
  3559. + LDR.as r4, r9, 18
  3560. + LDR.as r5, r9, 17
  3561. + LDR.as r6, r9, 16
  3562. + LDR.as r7, r9, 15
  3563. /* Restore callee saved registers. */
  3564. - LDR (r13, r9, 37)
  3565. - LDR (r14, r9, 36)
  3566. - LDR (r15, r9, 35)
  3567. - LDR (r16, r9, 34)
  3568. - LDR (r17, r9, 33)
  3569. - LDR (r18, r9, 32)
  3570. - LDR (r19, r9, 31)
  3571. - LDR (r20, r9, 30)
  3572. - LDR (r21, r9, 29)
  3573. - LDR (r22, r9, 28)
  3574. - LDR (r23, r9, 27)
  3575. - LDR (r24, r9, 26)
  3576. -
  3577. - LDR (blink, r9, 7)
  3578. - LDR (fp, r9, 8)
  3579. - LDR (gp, r9, 9)
  3580. - LDR (sp, r9, 23)
  3581. + LDR.as r13, r9, 37
  3582. + LDR.as r14, r9, 36
  3583. + LDR.as r15, r9, 35
  3584. + LDR.as r16, r9, 34
  3585. + LDR.as r17, r9, 33
  3586. + LDR.as r18, r9, 32
  3587. + LDR.as r19, r9, 31
  3588. + LDR.as r20, r9, 30
  3589. + LDR.as r21, r9, 29
  3590. + LDR.as r22, r9, 28
  3591. + LDR.as r23, r9, 27
  3592. + LDR.as r24, r9, 26
  3593. +
  3594. + LDR.as blink, r9, 7
  3595. + LDR.as fp, r9, 8
  3596. + LDR.as gp, r9, 9
  3597. + LDR.as sp, r9, 23
  3598. +
  3599. +#if defined (__ARC_FLOAT_ABI_HARD__)
  3600. + FLDR.as f0, r9, 43
  3601. + FLDR.as f1, r9, 44
  3602. + FLDR.as f2, r9, 45
  3603. + FLDR.as f3, r9, 46
  3604. + FLDR.as f4, r9, 47
  3605. + FLDR.as f5, r9, 48
  3606. + FLDR.as f6, r9, 49
  3607. + FLDR.as f7, r9, 50
  3608. +
  3609. + FLDR.as f16, r9, 51
  3610. + FLDR.as f17, r9, 52
  3611. + FLDR.as f18, r9, 53
  3612. + FLDR.as f19, r9, 54
  3613. + FLDR.as f20, r9, 55
  3614. + FLDR.as f21, r9, 56
  3615. + FLDR.as f22, r9, 57
  3616. + FLDR.as f23, r9, 58
  3617. + FLDR.as f24, r9, 59
  3618. + FLDR.as f25, r9, 60
  3619. + FLDR.as f26, r9, 61
  3620. + FLDR.as f27, r9, 62
  3621. + FLDR.as f28, r9, 63
  3622. + FLDR.as f29, r9, 64
  3623. + FLDR.as f30, r9, 66
  3624. + FLDR.as f31, r9, 68
  3625. +#endif
  3626. j [blink]
  3627. @@ -83,8 +111,8 @@ ENTRY (__startcontext)
  3628. jl [r14]
  3629. /* If uc_link (r15) call setcontext with that. */
  3630. - mov r0, r15
  3631. - breq r0, 0, 1f
  3632. + MOVR r0, r15
  3633. + BRReq r0, 0, 1f
  3634. bl __setcontext
  3635. 1:
  3636. diff --git a/sysdeps/unix/sysv/linux/arc/shlib-versions b/sysdeps/unix/sysv/linux/arc/shlib-versions
  3637. index 343c0a0450..92a61e53fc 100644
  3638. --- a/sysdeps/unix/sysv/linux/arc/shlib-versions
  3639. +++ b/sysdeps/unix/sysv/linux/arc/shlib-versions
  3640. @@ -1,7 +1,15 @@
  3641. DEFAULT GLIBC_2.32
  3642. +%ifdef HAVE_ARC32
  3643. +ld=ld-linux-arc32.so.2
  3644. +%else
  3645. +%ifdef HAVE_ARC64
  3646. +ld=ld-linux-arc64.so.2
  3647. +%else
  3648. %ifdef HAVE_ARC_BE
  3649. ld=ld-linux-arceb.so.2
  3650. %else
  3651. ld=ld-linux-arc.so.2
  3652. %endif
  3653. +%endif
  3654. +%endif
  3655. diff --git a/sysdeps/unix/sysv/linux/arc/swapcontext.S b/sysdeps/unix/sysv/linux/arc/swapcontext.S
  3656. index 76111af596..ff1741a08a 100644
  3657. --- a/sysdeps/unix/sysv/linux/arc/swapcontext.S
  3658. +++ b/sysdeps/unix/sysv/linux/arc/swapcontext.S
  3659. @@ -24,69 +24,88 @@ ENTRY (__swapcontext)
  3660. /* Save context into @oucp pointed to by r0. */
  3661. - add r2, r0, UCONTEXT_MCONTEXT
  3662. - STR (r13, r2, 37)
  3663. - STR (r14, r2, 36)
  3664. - STR (r15, r2, 35)
  3665. - STR (r16, r2, 34)
  3666. - STR (r17, r2, 33)
  3667. - STR (r18, r2, 32)
  3668. - STR (r19, r2, 31)
  3669. - STR (r20, r2, 30)
  3670. - STR (r21, r2, 29)
  3671. - STR (r22, r2, 28)
  3672. - STR (r23, r2, 27)
  3673. - STR (r24, r2, 26)
  3674. -
  3675. - STR (blink, r2, 7)
  3676. - STR (fp, r2, 8)
  3677. - STR (gp, r2, 9)
  3678. - STR (sp, r2, 23)
  3679. + ADDR r2, r0, UCONTEXT_MCONTEXT
  3680. + STR.as r13, r2, 37
  3681. + STR.as r14, r2, 36
  3682. + STR.as r15, r2, 35
  3683. + STR.as r16, r2, 34
  3684. + STR.as r17, r2, 33
  3685. + STR.as r18, r2, 32
  3686. + STR.as r19, r2, 31
  3687. + STR.as r20, r2, 30
  3688. + STR.as r21, r2, 29
  3689. + STR.as r22, r2, 28
  3690. + STR.as r23, r2, 27
  3691. + STR.as r24, r2, 26
  3692. +
  3693. + STR.as blink, r2, 7
  3694. + STR.as fp, r2, 8
  3695. + STR.as gp, r2, 9
  3696. + STR.as sp, r2, 23
  3697. +
  3698. +#if defined (__ARC_FLOAT_ABI_HARD__)
  3699. + FSTR.as f16, r2, 51
  3700. + FSTR.as f17, r2, 52
  3701. + FSTR.as f18, r2, 53
  3702. + FSTR.as f19, r2, 54
  3703. + FSTR.as f20, r2, 55
  3704. + FSTR.as f21, r2, 56
  3705. + FSTR.as f22, r2, 57
  3706. + FSTR.as f23, r2, 58
  3707. + FSTR.as f24, r2, 59
  3708. + FSTR.as f25, r2, 60
  3709. + FSTR.as f26, r2, 61
  3710. + FSTR.as f27, r2, 62
  3711. + FSTR.as f28, r2, 63
  3712. + FSTR.as f29, r2, 64
  3713. + FSTR.as f30, r2, 65
  3714. + FSTR.as f31, r2, 66
  3715. +#endif
  3716. /* Save 0 in r0 placeholder to return 0 when @oucp activated. */
  3717. - mov r9, 0
  3718. - STR (r9, r2, 22)
  3719. + mov r9, 0
  3720. + STR.as r9, r2, 22
  3721. /* Load context from @ucp. */
  3722. - mov r9, r1 /* Safekeep @ucp across syscall. */
  3723. + MOVR r9, r1 /* Safekeep @ucp across syscall. */
  3724. /* rt_sigprocmask (SIG_SETMASK, &ucp->uc_sigmask, &oucp->uc_sigmask, _NSIG8) */
  3725. - mov r3, _NSIG8
  3726. - add r2, r0, UCONTEXT_SIGMASK
  3727. - add r1, r1, UCONTEXT_SIGMASK
  3728. - mov r0, SIG_SETMASK
  3729. - mov r8, __NR_rt_sigprocmask
  3730. + mov r3, _NSIG8
  3731. + ADDR r2, r0, UCONTEXT_SIGMASK
  3732. + ADDR r1, r1, UCONTEXT_SIGMASK
  3733. + mov r0, SIG_SETMASK
  3734. + mov r8, __NR_rt_sigprocmask
  3735. ARC_TRAP_INSN
  3736. - brhi r0, -1024, L (call_syscall_err)
  3737. -
  3738. - add r9, r9, UCONTEXT_MCONTEXT
  3739. - LDR (r0, r9, 22)
  3740. - LDR (r1, r9, 21)
  3741. - LDR (r2, r9, 20)
  3742. - LDR (r3, r9, 19)
  3743. - LDR (r4, r9, 18)
  3744. - LDR (r5, r9, 17)
  3745. - LDR (r6, r9, 16)
  3746. - LDR (r7, r9, 15)
  3747. -
  3748. - LDR (r13, r9, 37)
  3749. - LDR (r14, r9, 36)
  3750. - LDR (r15, r9, 35)
  3751. - LDR (r16, r9, 34)
  3752. - LDR (r17, r9, 33)
  3753. - LDR (r18, r9, 32)
  3754. - LDR (r19, r9, 31)
  3755. - LDR (r20, r9, 30)
  3756. - LDR (r21, r9, 29)
  3757. - LDR (r22, r9, 28)
  3758. - LDR (r23, r9, 27)
  3759. - LDR (r24, r9, 26)
  3760. -
  3761. - LDR (blink, r9, 7)
  3762. - LDR (fp, r9, 8)
  3763. - LDR (gp, r9, 9)
  3764. - LDR (sp, r9, 23)
  3765. + BRRhi r0, -1024, L (call_syscall_err)
  3766. +
  3767. + ADDR r9, r9, UCONTEXT_MCONTEXT
  3768. + LDR.as r0, r9, 22
  3769. + LDR.as r1, r9, 21
  3770. + LDR.as r2, r9, 20
  3771. + LDR.as r3, r9, 19
  3772. + LDR.as r4, r9, 18
  3773. + LDR.as r5, r9, 17
  3774. + LDR.as r6, r9, 16
  3775. + LDR.as r7, r9, 15
  3776. +
  3777. + LDR.as r13, r9, 37
  3778. + LDR.as r14, r9, 36
  3779. + LDR.as r15, r9, 35
  3780. + LDR.as r16, r9, 34
  3781. + LDR.as r17, r9, 33
  3782. + LDR.as r18, r9, 32
  3783. + LDR.as r19, r9, 31
  3784. + LDR.as r20, r9, 30
  3785. + LDR.as r21, r9, 29
  3786. + LDR.as r22, r9, 28
  3787. + LDR.as r23, r9, 27
  3788. + LDR.as r24, r9, 26
  3789. +
  3790. + LDR.as blink, r9, 7
  3791. + LDR.as fp, r9, 8
  3792. + LDR.as gp, r9, 9
  3793. + LDR.as sp, r9, 23
  3794. j [blink]
  3795. diff --git a/sysdeps/unix/sysv/linux/arc/sys/ucontext.h b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
  3796. index 831b81a922..3a0f1d4aba 100644
  3797. --- a/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
  3798. +++ b/sysdeps/unix/sysv/linux/arc/sys/ucontext.h
  3799. @@ -42,6 +42,7 @@ typedef struct
  3800. unsigned long int __efa;
  3801. unsigned long int __stop_pc;
  3802. unsigned long int __r30, __r58, __r59;
  3803. + unsigned long int __fpr[32];
  3804. } mcontext_t;
  3805. /* Userlevel context. */
  3806. diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S
  3807. index c6ca329e9a..db1ffdad2a 100644
  3808. --- a/sysdeps/unix/sysv/linux/arc/syscall.S
  3809. +++ b/sysdeps/unix/sysv/linux/arc/syscall.S
  3810. @@ -19,15 +19,15 @@
  3811. #include <sysdep.h>
  3812. ENTRY (syscall)
  3813. - mov_s r8, r0
  3814. - mov_s r0, r1
  3815. - mov_s r1, r2
  3816. - mov_s r2, r3
  3817. - mov_s r3, r4
  3818. - mov_s r4, r5
  3819. - mov_s r5, r6
  3820. + MOVR r8, r0
  3821. + MOVR r0, r1
  3822. + MOVR r1, r2
  3823. + MOVR r2, r3
  3824. + MOVR r3, r4
  3825. + MOVR r4, r5
  3826. + MOVR r5, r6
  3827. ARC_TRAP_INSN
  3828. - brhi r0, -4096, L (call_syscall_err)
  3829. + BRRhi r0, -4096, L (call_syscall_err)
  3830. j [blink]
  3831. PSEUDO_END (syscall)
  3832. diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h
  3833. index 7f90d64124..14d11f038b 100644
  3834. --- a/sysdeps/unix/sysv/linux/arc/sysdep.h
  3835. +++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
  3836. @@ -26,6 +26,8 @@
  3837. /* "workarounds" for generic code needing to handle 64-bit time_t. */
  3838. +#ifndef __ARC64_ARCH64__
  3839. +
  3840. /* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c. */
  3841. #define __NR_clock_getres __NR_clock_getres_time64
  3842. /* Fix sysdeps/nptl/lowlevellock-futex.h. */
  3843. @@ -43,6 +45,8 @@
  3844. /* Hack sysdeps/unix/sysv/linux/generic/utimes.c. */
  3845. #define __NR_utimensat __NR_utimensat_time64
  3846. +#endif
  3847. +
  3848. /* For RTLD_PRIVATE_ERRNO. */
  3849. #include <dl-sysdep.h>
  3850. @@ -59,7 +63,7 @@
  3851. # undef PSEUDO
  3852. # define PSEUDO(name, syscall_name, args) \
  3853. PSEUDO_NOERRNO(name, syscall_name, args) ASM_LINE_SEP \
  3854. - brhi r0, -4096, L (call_syscall_err) ASM_LINE_SEP
  3855. + BRRhi r0, -4096, L (call_syscall_err) ASM_LINE_SEP
  3856. # define ret j_s [blink]
  3857. @@ -98,7 +102,7 @@
  3858. /* Don't set errno, return kernel error (in errno form) or zero. */
  3859. # define ret_ERRVAL \
  3860. - rsub r0, r0, 0 ASM_LINE_SEP \
  3861. + SUBR r0, 0, r0 ASM_LINE_SEP \
  3862. ret_NOERRNO
  3863. # undef PSEUDO_END_ERRVAL
  3864. @@ -117,12 +121,12 @@
  3865. # define SYSCALL_ERROR_HANDLER \
  3866. L (call_syscall_err): ASM_LINE_SEP \
  3867. - push_s blink ASM_LINE_SEP \
  3868. - cfi_adjust_cfa_offset (4) ASM_LINE_SEP \
  3869. + PUSHR blink ASM_LINE_SEP \
  3870. + cfi_adjust_cfa_offset (REGSZ) ASM_LINE_SEP \
  3871. cfi_rel_offset (blink, 0) ASM_LINE_SEP \
  3872. CALL_ERRNO_SETTER_C ASM_LINE_SEP \
  3873. - pop_s blink ASM_LINE_SEP \
  3874. - cfi_adjust_cfa_offset (-4) ASM_LINE_SEP \
  3875. + POPR blink ASM_LINE_SEP \
  3876. + cfi_adjust_cfa_offset (-REGSZ) ASM_LINE_SEP \
  3877. cfi_restore (blink) ASM_LINE_SEP \
  3878. j_s [blink]
  3879. diff --git a/sysdeps/unix/sysv/linux/arc/vfork.S b/sysdeps/unix/sysv/linux/arc/vfork.S
  3880. index 57b85988e3..57bd8d3d81 100644
  3881. --- a/sysdeps/unix/sysv/linux/arc/vfork.S
  3882. +++ b/sysdeps/unix/sysv/linux/arc/vfork.S
  3883. @@ -28,11 +28,11 @@
  3884. ENTRY (__vfork)
  3885. mov r0, CLONE_FLAGS_FOR_VFORK
  3886. - mov_s r1, sp
  3887. + MOVR r1, sp
  3888. mov r8, __NR_clone
  3889. ARC_TRAP_INSN
  3890. - cmp r0, 0
  3891. + CMPR r0, 0
  3892. jge [blink] ; child continues
  3893. b __syscall_error
  3894. diff --git a/timezone/zic.c b/timezone/zic.c
  3895. index 2875b5544c..3d606c8e6e 100644
  3896. --- a/timezone/zic.c
  3897. +++ b/timezone/zic.c
  3898. @@ -39,7 +39,7 @@ typedef int_fast64_t zic_t;
  3899. #include <sys/stat.h>
  3900. #endif
  3901. #ifdef S_IRUSR
  3902. -#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH)
  3903. +#define MKDIR_UMASK (S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH|S_IWOTH)
  3904. #else
  3905. #define MKDIR_UMASK 0755
  3906. #endif
  3907. --
  3908. 2.31.1