theyneversleep has quit [Remote host closed the connection]
xenos1984 has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
theyneversleep has joined #osdev
zenmov has quit [Ping timeout: 252 seconds]
zenmov has joined #osdev
Matt|home has quit [Quit: Matt|home]
xenos1984 has quit [Ping timeout: 246 seconds]
zenmov has quit [Ping timeout: 252 seconds]
xenos1984 has joined #osdev
Arthuria has joined #osdev
mpetch has quit [Ping timeout: 240 seconds]
arjun has joined #osdev
arjun has quit [Quit: Leaving]
Arthuria has quit [Ping timeout: 276 seconds]
<immibis>
why wouldn't retf work?
mpetch has joined #osdev
hwpplayer1 has quit [Quit: see you later]
Dead_Bush_Sanpai has joined #osdev
Dead_Bush_Sanpai is now known as Qichao_Xiong
Qichao_Xiong is now known as Qichao_Xiong{rm7
Qichao_Xiong{rm7 is now known as Qichao_Xiong
flx has joined #osdev
Qichao_Xiong is now known as Dead_Bush_Sanpai
Dead_Bush_Sanpai has quit [Quit: Dead_Bush_Sanpai]
Dead_Bush_Sanpai has joined #osdev
Arthuria has joined #osdev
mpetch has quit [Quit: Client closed]
netbsduser has quit [Ping timeout: 246 seconds]
cow has quit [Remote host closed the connection]
<geist>
lret does exist in long mode
<geist>
yeah retf/lret (two different names)
<geist>
note in 64bit mode there *is* a `jmp constant:whatever` but it only works on intel hardware
bauen1 has quit [Ping timeout: 276 seconds]
<geist>
so even if you have a constant segment to jump to, you still should use lret/retf
<heat>
surely you mean ljmp
<heat>
we dont speak of intel syntax in this channel!
bauen1 has joined #osdev
netbsduser has joined #osdev
<zid`>
intel's manual is insane for ret
cow has joined #osdev
<zid`>
it says ret, c3, ret cb (far), ret imm16 c2 iw, ret imm16 ca iw (far)
<zid`>
so.. how do you pick between near and far, intel?
<zid`>
maybe it says way earlier in a generic manner to postfix opcodes with 'far' in some intro paragraph?
<zid`>
nope literally just writes far ret etc everywhere
<zid`>
gives 0 hints
<geist>
someone at work actually lamented us not using intel syntax in disassembly
<zid`>
That's why nasm syntax is a thing, it's what you get if you actually use intel syntax in anger
<geist>
i was flabberghasted. i have honestly never actually bumped into someone outside of osdev just learning x86 from the manuals that like intel syntax
<zid`>
I like nasm syntax, does that count
<geist>
but i guess it probably has to do with if you do a lot of windows programming
<zid`>
or just.. don't mess with gnu assembly
<geist>
yah
<geist>
depends on which side of the world you come from
<zid`>
AT&T syntax skews old
<heat>
1337 UNIX HAXXOR vs enterprise win32 developer
<geist>
well skews open source unix
<zid`>
us zoomers all use intel
<zid`>
like I said, old :p
<zid`>
rms isn't getting younger, he's bringing the average with him
<geist>
i had this whole conversation with someone at work the other day that was just really sitting down and learning x86
<geist>
trying to describe the two syntaxes
<zid`>
I'd say "I hack on gnu software that uses assembly" is a rare subset of a rare subset
<zid`>
compared to say "I write C++ game engine code and sometimes it crashes and I need to read mov eax, [rsi+0x84]"
<heat>
AT&T syntax isn't GNU syntax
<geist>
i guess you could sort of say it's the syntax that by default a lot of gnu tools use as well as non gnu tools that are compatible with gnu tools (llvm)
Left_Turn has joined #osdev
leon has quit [Ping timeout: 252 seconds]
<geist>
and since unixy oses (and some that aren't) use those tool sets they also tend to use those syntaxes
<geist>
but really to me it's just some silly detail of x86, which is an architecture that has tons of silly details.
<geist>
but when first learning it's a major silly detail i guess
leon has joined #osdev
<heat>
well yes but most importantly AT&T syntax is older than GNU
<zid`>
zoomers have never heard of AT&T syntax
<heat>
i'm pretty sure AT&T syntax was already used by SVR4
<heat>
i'm a zoomer
<zid`>
spiders heat
<GeDaMo>
Damned kids, get off my LAN! :P
Turn_Left has quit [Ping timeout: 248 seconds]
<zid`>
GeDaMo how cold is it in lapland today
<heat>
spiders? where
<GeDaMo>
It's a bit chilly :P
<zid`>
heat: gis for spiders georg
<geist>
heat: yeah fair point, i was going to make that point but didnt really know for sure
<geist>
would be i guess kinda interestig to see where AT&T first showed up
<geist>
i'll ask roland at work, he probably remembers
<heat>
apparently they tried to port really old UNIX to the 8086 in 78
<zid`>
and they got stuck arguing about syntax for the assembler to write first
<zid`>
until their mom came home and said "Right that's it, I'm sick of this, we're just going to use VAX syntax"
<geist>
well at that point i dont think intel had much of a syntax. and iirc they were litiguous about formats at the time
<geist>
hence why z80 for example, being a clone + new features of the 8080 uses a completely different syntax
<zid`>
I'm going to say that intel doesn't actually specify a full syntax in their manual to this day
<geist>
but that was because a competitor company was doing it, so intel was pissy about it
<zid`>
given the far/near/etc stuff being missing, they only publish opcode listings
<zid`>
the code samples are purely pseudocode
<geist>
side note, i discovered that you can put () around labels in x86 AT&T syntax, which i think is far more readable, and 'fixes' one of the most annoying misfeatres of AT&T syntax, IMO
<geist>
ie, `mov foo, %rax` -> `mov (foo),%rax`
<zid`>
I discovered that GAS accepts 'dword' as a keyword, and it means '4'
<geist>
totally identical, but the latter is at least consistent with all the other addressing modes which involve putting () around the base part
<zid`>
someone came in with a bug nobody could find for hours
<zid`>
because the like mov esi, dword [edi] or whatever just got looked straight through
<zid`>
it turned it into 4[edi] which it turned into 4(%edi)
<geist>
a little surprised, figured it'd require a . in front of it
<geist>
https://godbolt.org/z/Wc41qoq9x huh it doesn't do exactly what you say, but it actually doesn't complain about the keyword
<bslsk05>
godbolt.org: Compiler Explorer
<zid`>
it doesn't take 4 ptr though, so idk what the hell is going on
<zid`>
geist: I think if you link it, it turns into 4
<zid`>
cus of some symbol somewhere
<geist>
oh sure that's standard syntax
<geist>
you can do label(register)
<geist>
that's how you get rip relative: `label(%rip)`
<zid`>
yea, we figured it out between us
<zid`>
explains everything
<zid`>
but yea, if it had been exported with address 0 not address 4 nobody would have even noticed :P
<zid`>
It'd have just been using the wrong encoding
<geist>
but yeah that whole foo(stuff inside, sometimes with commas) is pure DEC
<geist>
vax/pdp style
<geist>
as well as left to right
<zid`>
nod
<zid`>
and also the indirect call nonsense too I think
<zid`>
they just took the vax assembler codebase, and changed the register names
<zid`>
"0.1 of x86 assembler done!"
<geist>
yeah *%reg is weird
<heat>
i found a weird bug in my kernel. i didn't know this was possible. i thought i was perfect
<zid`>
dang heat
<zid`>
We're going to have to take you out back and shoot you now
<geist>
i guess it's because `jmp (%rax)` would be ambiguous, is it dereferencing the address at rax and then juming to it?
<geist>
though i guess `jmp %rax` would be sufficient
<zid`>
dw we'll tell everybody else you went to a farm in spain
<heat>
i do want to mention that WARN_ON is based and BUG_ON is based and i should get BUG_ON eventually
<heat>
crashing is lame
<geist>
we did end up adding a WARN style thing in zircon at some point
<geist>
an assert style thing that doesn't crash, but we otherwise pick up in our automated testing and generate a report
<zid`>
I'd pay so much money for a dmesg for the windows kernal and WARNs
<heat>
yeah, BUG_ON is a little more controversial
<zid`>
if a piece of hardware starts acting funny you just have to plug it into a linux machine to know what the fuck
<geist>
word. when i fiddle with non linux i realize how much we got with dmesg plus all the styff exposed in /proc and /sys
<geist>
it's really quite nice
<heat>
but i think still okay if you want to get something out of the error/want to sync the filesystems/whatever
<heat>
everything is a file btw
theyneversleep has quit [Remote host closed the connection]
<heat>
also dont forget ftrace and bpftrace and the tracing subsystem in general
<heat>
why write a debugging patch and rebuild and reboot when you can get a bpftrace one-liner to do it for you
<kof673>
that's what dtrace was said to be...
<kof673>
also: > Damned kids, get off my LAN! <shakes fist at cloud, muttering stream of curses in boomhauer-like/kyle yelling at visitors fashion>
<nikolar>
linux masterrace
<netbsduser>
zid`: i thought using intel syntax was more of a baby boomer thing than a baby zoomer thing
<nikolar>
i am a zoomer and i use at&t
<heat>
hi5
<nikolar>
ye
<netbsduser>
just look at the assembler that has a cult following among predominantly gen x eastern europeans
<heat>
intel syntax stans are too busy praying and fasting for intel to reply here
<netbsduser>
fasm
karenw has joined #osdev
<Ermine>
can confirm that
<cloudowind>
happy weekends osdev people
GeDaMo has quit [Quit: 0wt 0f v0w3ls.]
<the_oz>
sockets aren't files unless master race nein plan
<the_oz>
neun?
<the_oz>
happy now
Left_Turn has quit [Ping timeout: 245 seconds]
<heat>
sockets are technically files due to being fds
<the_oz>
oh sure except it acts nothing like
<heat>
yes it does?
<the_oz>
if it looks like notafile
<heat>
sockets support every file operation
<zid`>
except the good ones
<the_oz>
acts like notafile
<heat>
it acts 100% like a file
<the_oz>
you know how I know?
<the_oz>
because I've used ACTUAL socketfies
* zid`
ftruncates all of heat's so
<heat>
truncation is invalid for a lot of Real Files
<zid`>
Real Fake Files
<heat>
just because it's a stream of data doesn't mean it's not a file, it's kind of a big deal in UNIX
<heat>
see: pipes
<zid`>
Everything is treated like a sort of subset of file is just less punchy
<heat>
linux pseudo filesystems lie all the time about their sizes too, procfs commonly says 0, sysfs files say 4096
<the_oz>
maximal cope
<heat>
truncate /sysfs/bus/pci/00:00.0/config makes no sense
<the_oz>
;_; why do you hate me chain maze minotaur
<the_oz>
bramblehedgetreebush
<zid`>
for realies though, it seems to need, libarchive, rhash, expat, jsoncpp, libuv, curl, zlib, pkgconfig
<zid`>
everything else is a dep of a dep
mpetch has joined #osdev
<kof673>
that's a good name, minotaur package manager
<the_oz>
you're the minotaur in the maze dependency hell graph
<the_oz>
I, etc, we all are ... trapped by it.
<heat>
zid`, this spec file also requires xz, zstd, bz2, lzma, cppdap (whatever the fuck that is?), ncurses, sphinx by default, vim, emacs integrations too
<zid`>
rip
<heat>
X11 if you opt in for cmake gtk (what the fuck is this???)
<heat>
not gkt, qt
<heat>
even better
<zid`>
yea mine has a big block for qt?
Left_Turn has quit [Read error: Connection reset by peer]
<heat>
ok vim packaged and built, hopefully this is it