| *** yocti <yocti!~limnoria@2a01:4f9:c010:c053::1> has joined #oe | 17:44 | |
| *** yocti <yocti!~limnoria@2a01:4f9:c010:c053::1> has joined #oe | 17:59 | |
| *** yocti <yocti!~limnoria@2a01:4f9:c010:c053::1> has joined #oe | 18:02 | |
| *** Kubu_work is now away: Je ne suis pas lĂ pour l'instant. | 18:07 | |
| jeroen__ | khem: you mean just the command line arguments? | 18:15 |
|---|---|---|
| *** RP is back | 18:21 | |
| *** ptsneves is now away: I am currently away from the computer. | 18:25 | |
| *** RP is now away: Auto away at Tue May 13 18:32:36 2025 UTC | 18:32 | |
| jeroen__ | Is gcc infected by a bitcoin miner perhaps? time $CC .... api.cc -> real 0m27.867s, user 0m27.853s :( | 18:38 |
| khem | jeroen__:yes gcc cmdline during compiling | 18:40 |
| khem | these are builtins __atomic_load_n | 18:40 |
| khem | so they should be coming from gut of gcc | 18:40 |
| khem | it will be good to see what code it generated for __atomic_load_n in qt5 where it seems it worked | 18:41 |
| jeroen__ | yeah I know, I tried to make a c version of it, but trivial usage do work correctly. | 18:41 |
| jeroen__ | I need to somehow convince gcc to use that base register, I will have a look at that later | 18:42 |
| jeroen__ | I will post those arguments first, there is nothing really exciting as far as I can tell though | 18:42 |
| khem | for armv7 it could use LDREX/STREX for atomic ops so why it does not choose it | 18:43 |
| jeroen__ | well the assembler is unhappy: "Warning: index register overlaps transfer register", but that is too late | 18:43 |
| khem | is question in my mind, unless we say arch is < v6 | 18:43 |
| khem | jeroen__:that instruction is wrong for sure, some CPUs might execute it ok but thats ISA implementation dependent | 18:44 |
| *** halstead is now away: Auto-away | 18:46 | |
| jeroen__ | https://pastebin.com/sbvxLVPG | 18:50 |
| *** RP is back | 18:51 | |
| khem | -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 is as much armv7 as it can be | 18:55 |
| khem | Can you try preprocessing this file with -dD -E and we can see if its gettin LDRD via a inline assembly or something | 18:56 |
| *** sakoman is back | 19:03 | |
| *** ptsneves is back | 19:11 | |
| *** RP is now away: Auto away at Tue May 13 19:13:03 2025 UTC | 19:13 | |
| jeroen__ | sorry that is the test of api.cc, this https://pastebin.com/62CC3RQG is api.cc it self | 19:21 |
| khem | thats the cmdline add -dD -E to it and then check the .o file which will have preprocessed content | 19:23 |
| khem | it can tell a lot about what compiler it seeing | 19:24 |
| *** Kubu_work is back | 19:26 | |
| jeroen__ | there doesn't seem to be something interesting in there, let me try to get a smaller test case. This thing is quite large. | 19:38 |
| *** sakoman is now away: I'm not here right now | 19:45 | |
| *** Kubu_work <Kubu_work!~kubu@lfbn-nan-1-335-137.w82-120.abo.wanadoo.fr> has quit IRC (Quit: Leaving.) | 20:22 | |
| *** RP is back | 20:26 | |
| *** ptsneves <ptsneves!~Thunderbi@088156093164.unknown.vectranet.pl> has quit IRC (Ping timeout: 248 seconds) | 20:38 | |
| *** RP is now away: I'm not here right now | 20:44 | |
| *** flynn378 is now away: Auto-away | 20:49 | |
| *** KanjiMonster is now away: Auto away at Tue May 13 20:53:10 2025 UTC | 20:53 | |
| *** sakoman is back | 21:01 | |
| *** RP is back | 21:04 | |
| *** RP is now away: I'm not here right now | 21:09 | |
| *** Xagen <Xagen!~Xagen@syn-067-048-061-106.biz.spectrum.com> has quit IRC (Quit: My MacBook has gone to sleep. ZZZzzz…) | 21:10 | |
| *** RP is back | 21:11 | |
| *** sakoman is now away: I'm not here right now | 21:16 | |
| *** RP is now away: I'm not here right now | 21:16 | |
| *** RP is back | 21:21 | |
| *** pilonsi <pilonsi!~pilonsi@84.123.45.212.dyn.user.ono.com> has quit IRC (Quit: ZNC 1.9.1 - https://znc.in) | 21:21 | |
| *** pilonsi <pilonsi!~pilonsi@84.123.45.212.dyn.user.ono.com> has joined #oe | 21:21 | |
| *** pilonsi is now away: Auto away at Tue May 13 21:21:40 2025 UTC | 21:21 | |
| *** RP is now away: I'm not here right now | 21:26 | |
| *** RP is back | 21:28 | |
| *** RP is now away: I'm not here right now | 21:33 | |
| khem | jeroen__:no inlines etc ? | 21:37 |
| khem | no reference to ldrd | 21:37 |
| jeroen__ | khem: nope, no __asm which seem to be relevant.. | 21:38 |
| jeroen__ | I made it a bit shorter btw, https://pastebin.com/5wTb5nJ8 | 21:38 |
| jeroen__ | it is the futex-emulater, which has a "ldrdr2, [r3, r2]" | 21:39 |
| khem | jeroen__:you can see the ldrd instruction though | 21:40 |
| khem | try adding -mcpu=cortex-a9 -mno-unaligned-access | 21:40 |
| khem | and see if this still happens | 21:40 |
| jeroen__ | -mno-unaligned-access doesn't help, -mcpu=cortex-a9 turn it into ldrexd r2, [r2] | 21:43 |
| khem | yeah so thats why it works on some arm subarches but not everywhere | 21:44 |
| khem | std::atomic<int64_t>* p make it volatile for tests | 21:46 |
| khem | cortex-a9 does have problems with ldrd/strd for aromic ops and thats why its not using them perhaps | 21:47 |
| khem | For Cortex-A7, the compiler optimistically assumes ldrd is atomic (which is incorrect in practice) | 21:49 |
| khem | For Cortex-A9, the compiler knows ldrd is not atomic and correctly uses the exclusive load instruction ldrexd | 21:50 |
| khem | can you try adding -mno-ldrd :) | 21:50 |
| *** RP is back | 21:50 | |
| khem | what does it do with clang I wonder | 21:51 |
| *** MarcWeDLM <MarcWeDLM!~MarcWeDLM@user/MarcWeDLM> has quit IRC (Quit: Client closed) | 21:51 | |
| khem | what is your CPU if you dont mind to share details? | 21:53 |
| jeroen__ | error: unrecognized command-line option '-mno-ldrd' | 21:53 |
| khem | yeah I know :) I was joking | 21:56 |
| *** patersonc is now away: Auto-away | 21:57 | |
| jeroen__ | it is an Allwinner sun8i Family / ARMv7 Processor rev 5 (v7l) | 21:57 |
| jeroen__ | well there is actually -mfix-cortex-m3-ldrd though | 21:57 |
| khem | m3 is MCU | 21:59 |
| *** RP is now away: I'm not here right now | 21:59 | |
| *** RP is back | 22:05 | |
| jeroen__ | without nodejs https://pastebin.com/vfNhXm4k and now I call it the day | 22:12 |
| *** adadad is back | 22:13 | |
| jeroen__ | it is weird, remove that dummy void* isolate, and it goes away.. | 22:13 |
| *** RP is now away: I'm not here right now | 22:15 | |
| khem | jeroen__:hang on I think 64bit atomics are borked on H3 it seems | 22:15 |
| *** RP is back | 22:16 | |
| khem | which void* did you remove ? | 22:16 |
| khem | I think the key is to force it to use 8byte data so 64bit atomics can kick in | 22:17 |
| jeroen__ | see the pastebin, remove the void* from WaitSync(void* isolate, uint8_t *array_buffer, size_t addr, int64_t value) and it goes away | 22:21 |
| *** paulbarker is now away: Auto-away | 22:28 | |
| khem | jeroen__:I think you should omit using -mcpu=cortex-a7 and add -march=armv7-a for nodejs alone | 22:37 |
| khem | that should workaround it | 22:37 |
| khem | I can see gcc15 generating same code | 22:38 |
| khem | clang is ok | 22:38 |
| *** halstead is back | 22:39 | |
| *** dankm <dankm!~dan@user/dankm> has quit IRC (Remote host closed the connection) | 22:54 | |
| *** dankm <dankm!~dan@user/dankm> has joined #oe | 22:56 | |
| *** RP is now away: I'm not here right now | 23:07 | |
| *** RP is back | 23:11 | |
| *** RP is now away: Auto away at Tue May 13 23:12:45 2025 UTC | 23:12 | |
| *** florian <florian!~florian@2a02:3100:4618:4a00:d34f:6f78:8a7d:5086> has quit IRC (Ping timeout: 265 seconds) | 23:17 | |
| *** halstead is now away: Auto-away | 23:26 | |
Generated by irclog2html.py 4.0.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!