@whitequark@mastodon.social
@whitequark@mastodon.social avatar

whitequark

@whitequark@mastodon.social

catgirl shaped object

"A cat is valued for companionship and its ability to kill vermin."

✧ i have friends, and my purpose is to support them ✧
✦ i have enemies, and my purpose is to eliminate them ✦
✶ i have a life, and my purpose is to reach heaven by violence ✶
✷ nothing else matters ✷

#searchable

This profile is from a federated server and may be incomplete. Browse more on the original instance.

whitequark, to random
@whitequark@mastodon.social avatar

i love thinking rocks

fasterthanlime, to random
@fasterthanlime@hachyderm.io avatar

asking LLMs to do the lord's work:

it rewrote it to 1 << 24

whitequark,
@whitequark@mastodon.social avatar

@fasterthanlime huh, i got better at that in 30s

whitequark,
@whitequark@mastodon.social avatar

@fasterthanlime hm! we could pair and see

mcc, to random
@mcc@mastodon.social avatar

I wish Audacity were better than it is

whitequark,
@whitequark@mastodon.social avatar

@mcc I wish Linux had audio, vector, and video editing software

whitequark,
@whitequark@mastodon.social avatar

@deshipu @mcc kicad is... bearable..

whitequark,
@whitequark@mastodon.social avatar

@mcc @deshipu wanna pair on it?

whitequark, to random
@whitequark@mastodon.social avatar

i just need to reach L0

whitequark, to random
@whitequark@mastodon.social avatar

normal device

whitequark,
@whitequark@mastodon.social avatar

@icpmoles why zoomers

whitequark, to random
@whitequark@mastodon.social avatar

you should probably stop updating Chrome after 2025 :) https://blog.chromium.org/2024/05/manifest-v2-phase-out-begins.html

whitequark, to random
@whitequark@mastodon.social avatar

i think i need a cane

i have trouble standing for more than 10-15 minutes, even that is difficult

whitequark,
@whitequark@mastodon.social avatar

@masukomi I tried once and it was lifechanging

azonenberg, to random
@azonenberg@ioc.exchange avatar

Not sure if this is a gcc bug or some weird corner of UB or what...

But I have a packed struct containing a uint32 as the first field. I'm running on ARMv7-M so 32-bit unaligned loads are allowed (but not 64-bit).

This struct is being read directly via casting from a network RX buffer that is likely not aligned to any particular byte boundary. It's a) packed and b) has 32-bit fields in it.

So silly me assumed that gcc would generate either bytewise reads (assuming no alignment at all) or a ldr instruction (accepting that 32-bit unaligned loads are OK).

But for some reason at -O3 it generates a 64-bit read with ldrd, which promptly hard faults. I have no idea why it's doing that given that I was just __builtin_bswap32'ing a single 32-bit field.

Was able to work around the issue with memcpy, but seriously WTF? If I'm using a packed struct I'm explicitly telling the compiler not to make any assumptions about alignment because I'm directly serializing the data from somewhere. Where did it magically get the idea that my packed 32-bit field had 64-bit alignment?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg I also can't reproduce it on 12.2.1 from bookworm

whitequark,
@whitequark@mastodon.social avatar

@azonenberg are you sure the buffer itself isn't somehow 64-bit-aligned in the end?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg so r4 is loaded from [r6+#4]... what is the type of r4 in that structure?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg nod, yeah, looks like it needs more context

whitequark,
@whitequark@mastodon.social avatar

@azonenberg @pkhuong I think you need to redesign it architecturally

whitequark,
@whitequark@mastodon.social avatar

@steve @azonenberg oh... I did not realize that LDRD requires 32-bit alignment, not 64-bit. this is obvious now facepalm

whitequark,
@whitequark@mastodon.social avatar

@azonenberg @steve that's what Steve is saying, right? that you can use LDRD on any 32-bit aligned address?

whitequark,
@whitequark@mastodon.social avatar

@azonenberg @steve hah, here's someone hitting the exact same issue in Clang in 2012 https://groups.google.com/g/llvm-dev/c/E-H3ladGcM8

whitequark,
@whitequark@mastodon.social avatar

@azonenberg @steve yeah the ARM ARM says LDRD must be only word-aligned, not dword-aligned

whitequark,
@whitequark@mastodon.social avatar

@azonenberg @pmdj @pkhuong @steve yeah this looks good

whitequark, to random
@whitequark@mastodon.social avatar

i'm sorry... why does my laptop include a schematic sheet for smokeless powder?

whitequark,
@whitequark@mastodon.social avatar

@liiwi yes

whitequark, to random
@whitequark@mastodon.social avatar

where in the UK would i have a type-C connector on a laptop motherboard swapped?

I need it to be done within 1-2 days

whitequark,
@whitequark@mastodon.social avatar

@codeasm yeah this is annoying :(

whitequark,
@whitequark@mastodon.social avatar

@nela @6a62 i fix stuff myself but i'm not gonna risk the sole laptop i can use for work

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines