sorear changed the topic of #riscv to: RISC-V instruction set architecture | https://riscv.org | Logs: https://libera.irclog.whitequark.org/riscv | Backup if libera.chat and freenode fall over: irc.oftc.net
<dh`> I'm suggesting semi-tactfully that he doesn't actually know what he's talking about
<sorear> I'm far from convinced they've done anything illegal but they've certainly made a bunch of enemies in a hurry
<cousteau> I wasn't thinking breach-of-contract, but rather either abuse of power or trademark infringement
<dh`> I mean, I don't either, but I don't see any basis for legal action against the freenode organization
<xentrac> (the rules under civil-law systems are more complex but generally also don't require the exchange of money)
<sorear> including several major corps
<cousteau> more the former than the latter
<xentrac> cousteau: "abuse of power" is not a tort that I'm familiar with in any lgal system
<xentrac> *legal
<cousteau> although I could imagine that freenode registering channels such as #ubuntu without the consent of Canonical might be trademark infringement
<cousteau> but they were very smart and did NOT register ##ubuntu, I think
<dh`> it's their systems, they can do what they want, they've made a bunch of unilateral changes to their policies but it doesn't seem likely that there's any legal barrier to them doing that
<cousteau> xentrac: also probably unfair competition
<dh`> and if creating a discussion area called #ubuntu is trademark infringement then everyone's in trouble
<sorear> yes i don't think there's a legal barrier here
<cousteau> dh`: while I don't know of any specific relevant example, I am sure that "it's their server, they can do *whatever* they want" is not 100% true. They can't, say, do any illegal activities
<cousteau> so some laws still apply even on a completely "private" network
SpaceCoaster has joined #riscv
<sorear> illegal activities? on freenode? heavens *faint*
<dh`> cousteau, let me put it another way
<cousteau> re: TM infringement, I suspect most TM holders simply tolerate the existence of such channels, as long as they make it clear enough that they are not "official channels"
SpaceCoaster has quit [Remote host closed the connection]
<cousteau> so maybe all this gets the wrong person angry and they take out their lawyering stick
<dh`> if it were _your_ network, what legal doctrine prohibits you from writing the usage policies however you like?
<dh`> and then changing them as you see fit?
<cousteau> retroactively?
<cousteau> ok
<cousteau> "New policy: Any user of this network that joined last year agrees to pay $1,000,000 to cousteau immediately."
<dh`> yeah, you can make that your policy
<dh`> (trying to enforce that agreement is a different matter)
* dh` sighs
<dh`> this is not the place for "how laws actually work"
sh1r4s3 has quit [Ping timeout: 264 seconds]
<dh`> _if_ you can show that freenode, ltd has some kind of contractual obligation to maintain their irc network the way it was last month, then maybe they're now in breach and you can seek relief from a court
<dh`> but it is unlikely that any such obligation applies
<xentrac> cousteau: I'm pretty sure there's been a #unix on EFNet since the early 01990s without permission from Bell Labs or OSF or the Open Group or X/Open or whoever the fuck owns the trademark now
<dh`> especially since ToS and AUPs and whatnot are all invariably written to disclaim all such obligations
<cousteau> xentrac: but if Bell Labs or whatever didn't want that channel to exist, they probably would have taken legal action against the server, right?
<dh`> on what grounds?
<cousteau> I bet a skilled enough lawyer could have pulled a "trademark infringement" case
<dh`> it's not trademark infringement to use the trademark to refer to the trademarked object or service
<cousteau> and probably lost it
<cousteau> but at least have grounds to give them a headache they'd rather avoid
<xentrac> cousteau: probably lost it, yeah
sh1r4s3 has joined #riscv
<cousteau> or maybe defamation or whatever they decide to come up with... dunno, I somehow have the feeling that at some point they are going to annoy someone they shouldn't have annoyed and at least get in some weird legal labyrinth
<cousteau> but yeah, sorry for cramming all that nonsense into a channel aimed at discussing RISC-V :( all this situation has really gotten to me
sh1r4s3 has quit [Ping timeout: 264 seconds]
<xentrac> yeah, I get you. I'm pretty upset about it too
devcpu has quit [Quit: leaving]
<jrtc27> xentrac: 9 is not a legal digit in octal numbers :P
<sorear> nah i think they're just a mole from the long now fdn
devcpu has joined #riscv
sh1r4s3 has joined #riscv
sh1r4s3 has quit [Ping timeout: 264 seconds]
<cousteau> jrtc27: thank you!! that was bugging me
<xentrac> jrtc27: heh, not since C89
<jrtc27> fun fact: 0 is an octal constant in C
<sorear> anyway civil time as we currently understand it will completely break down over the next 500-1000 years due to the quadratically increasing error of the "86400 s" approximation that was adopted in 1960
<xentrac> haha, I never thought of that
<jrtc27> and yes, the less said about K&R C the better..
<sorear> unfortunately the CGPM set the second to give zero drift in ~1750, which was not a very forward looking decision in 1960
<cousteau> jrtc27: that fact still blows my mind a bit
<cousteau> I wanted them to change the standard to make 0 explicitly a decimal constant, just because it felt wrong that it were octal
sh1r4s3 has joined #riscv
<jrtc27> it's pedantic and inconsequential, but nonetheless what the parse tree says, and entertaining
<jrtc27> ik what you mean
<jrtc27> especially since you still need the lookahead to see if x comes next for hex
<cousteau> 0 is octal because that was the "least-energy" definition of integer constants
<cousteau> sorear: will the rate of leap seconds become unbearable by then?
<jrtc27> POSIX> what is a leap second
rvalles has quit [Read error: Connection reset by peer]
rvalles has joined #riscv
<sorear> who's excited for the negative leap second in 2029
sh1r4s3 has quit [Ping timeout: 252 seconds]
<jrtc27> tbh I don't know which kind is worse
<jrtc27> other than that negative has never been tested
elastic_dog has quit [Ping timeout: 264 seconds]
<cousteau> wait there's gonna be a negative leap second?
<cousteau> why not just wait until you get another positive one so they cancel out?
<sorear> because that's not what the law says
<sorear> also we don't know for certain there'll be one
elastic_dog has joined #riscv
<cousteau> yeah I just realized that... makes sense because it's virtually impossible to predict which days are gonna last longer
<sorear> the length-of-day graph has been awfully low lately but trying to predict a leap second 8 years out...you'd have better luck with the stock market
SpaceCoaster has joined #riscv
SpaceCoaster has quit [Remote host closed the connection]
cousteau has quit [Quit: Leaving]
sh1r4s3 has joined #riscv
s0ph0s has quit [Changing host]
s0ph0s has joined #riscv
iorem has quit [Ping timeout: 252 seconds]
sh1r4s3 has quit [Ping timeout: 265 seconds]
iorem has joined #riscv
h2t has quit [Changing host]
h2t has joined #riscv
h2t is now known as x0ul
smaeul has quit [Remote host closed the connection]
smaeul has joined #riscv
s0ph0s has quit [Quit: My ZNC server died. Probably updating my kernel...]
s0ph0s has joined #riscv
<xentrac> https://spectrum.ieee.org/geek-life/hands-on/build-a-riscv-cpu-from-scratch I was thinking about doing something like this
toshywoshy has quit [Read error: Connection reset by peer]
toshywoshy has joined #riscv
smaeul has quit [Quit: Down for maintenance...]
smaeul has joined #riscv
sh1r4s3 has joined #riscv
sh1r4s3 has quit [Ping timeout: 264 seconds]
wingsorc has quit [Quit: Leaving]
iorem has quit [Quit: Connection closed]
radu2424 has joined #riscv
joev has quit [Ping timeout: 265 seconds]
joev has joined #riscv
radu242 has quit [Ping timeout: 264 seconds]
radu2424 is now known as radu242
TwoNotes has quit [Quit: Leaving]
sh1r4s3 has joined #riscv
sh1r4s3 has quit [Ping timeout: 264 seconds]
dh` has quit [Ping timeout: 264 seconds]
_whitelogger has joined #riscv
_whitelogger has joined #riscv
_whitelogger has joined #riscv
joev has quit [Ping timeout: 265 seconds]
joev has joined #riscv
riff-IRC has quit [Remote host closed the connection]
petrj has joined #riscv
sh1r4s3 has joined #riscv
sh1r4s3 has quit [Ping timeout: 244 seconds]
dh` has joined #riscv
riff-IRC has joined #riscv
KREYREEN has joined #riscv
KREYREN has quit [Quit: Leaving]
KREYREEN has quit [Remote host closed the connection]
sh1r4s3 has joined #riscv
koolazer has joined #riscv
sh1r4s3 has quit [Ping timeout: 264 seconds]
Sos has joined #riscv
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
sh1r4s3 has joined #riscv
jotweh has joined #riscv
mctpyt has joined #riscv
_whitelogger has joined #riscv
iorem has joined #riscv
sh1r4s3 has quit [Ping timeout: 264 seconds]
yongxiang has joined #riscv
iorem has quit [Ping timeout: 265 seconds]
iorem has joined #riscv
sh1r4s3 has joined #riscv
Sos has quit [Quit: Leaving]
Sos has joined #riscv
zegalch96 has quit [Remote host closed the connection]
<gordonDrogon> Is the GNU assembler and linker generally OK to enable me to produce "bare metal" code for RSIC-V? (Looking to install something under x86 Linux - in more or less the same way I have the AVR versions for Atmel chips)
_whitelogger has joined #riscv
_whitelogger has joined #riscv
<gordonDrogon> ok, thanks.
<geist> i generate bare metal code with a riscv64-elf or riscv32-elf toolchain just fine
<geist> no reason you couldn't do it even with a -linux toolchain or whatnot
<gordonDrogon> yea, linux is my desktop (and everything else, really)
choozy has joined #riscv
choozy has quit [Remote host closed the connection]
jotweh has quit [Remote host closed the connection]
jotweh has joined #riscv
TwoNotes has joined #riscv
_whitelogger has joined #riscv
smartin has joined #riscv
rm is now known as gw6
gw6 is now known as rm
jotweh has quit [Ping timeout: 265 seconds]
Sos has quit [Quit: Leaving]
rsalveti has joined #riscv
TwoNotes has quit [Ping timeout: 264 seconds]
TwoNotes has joined #riscv
TwoNotes has quit [Client Quit]
mobius has joined #riscv
leah2 has quit [Quit: trotz alledem!]
leah2 has joined #riscv
_whitelogger has joined #riscv
frost has quit [Quit: Connection closed]
FluffyMask has joined #riscv
_whitelogger has joined #riscv
llamp[m] has joined #riscv
Maylay has quit [Ping timeout: 264 seconds]
TwoNotes has joined #riscv
llamp[m] has quit [Quit: node-irc says goodbye]
llamp[m] has joined #riscv
Maylay has joined #riscv
<TwoNotes> WHat is the trick to load a 32-bit constant into a register, on an RV64 system, WITHOUT getting sign-extension?
<sorear> I don't think there is a general trick for that
<jrtc27> yeah, it depends on the constant
<sorear> constants outside the [-2^31, 2^31-1] range mostly require more than two instructions. at least the ISA is designed to limit how often you need zero ext
iorem has quit [Quit: Connection closed]
<TwoNotes> 0xFFFFFFFF in this case. Sometimes 0x80000000
<TwoNotes> It is being done inside a macro, so I can just change the macro to do whatever the trick is
<jrtc27> ~0 is easy, addi reg, zero, -1 then srli reg, 32
<sorear> you can get those as (-1UL >> 32) and (1 << 31)
<TwoNotes> In AS in this case, but I see where you are going
<sorear> yeah, just using it as shorthand
<jrtc27> so addi reg, zero, 1 then slli reg, 31...
<jrtc27> (uh, reg, reg for those slli, of course)
<jrtc27> but, you know assemblers have an li pseudoinstruction that'll work all this out for you?
<TwoNotes> I am modifying an existing program. It does use 'li' in places. I need to check. And it is all dependant on whether "empty" Flash memory is all zeros or all FF on the specific hardware
* jrtc27 hmms at LLVM assembling li 0xffffffff to ((1 << 32) - 1)
<jrtc27> (needs moar patterns)
<sorear> i don't believe there is a reasonably short optimal set of patterns
<jrtc27> the simple approach is 8 instructions
<jrtc27> lui+addi+3*(slli 11 + addi)
<jrtc27> well, I guess one of the slli's is 10
<jrtc27> ie 8 instructions is always sufficient if you want a simple implementation
<TwoNotes> I just need to get it working for now - I can do something elegant later
<TwoNotes> At least it is always constant values, so I can put some assemble-time tests in there
<sorear> if you're using an existing assembler, use li
<TwoNotes> GNU assembler
<jrtc27> then use li
<jrtc27> and stop worrying about it
<jrtc27> https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md#load-immediate it's part of the specification for RISC-V assemblers
<TwoNotes> It seems to expand to 3 instructions, addiw, slli, addi
<rjek> Loading the top and bottom half of the word I imagine
<jrtc27> it's not always optimal, but it's normally good enough
<rjek> Those three instructions are probably a win over a 32 bit memory load
<jrtc27> and the assembler can always be improved, benefitting everyone
<jrtc27> rather than requiring everyone to roll their own
Maylay has quit [Ping timeout: 264 seconds]
choozy has joined #riscv
Maylay has joined #riscv
Werner has quit [Excess Flood]
Werner has joined #riscv
jn has quit [Remote host closed the connection]
crest has quit [Quit: No Ping reply in 180 seconds.]
rm has quit [Ping timeout: 248 seconds]
rm has joined #riscv
crest has joined #riscv
<TwoNotes> There also seems to be an "la" psudo-op
jn has joined #riscv
jn has quit [Changing host]
jn has joined #riscv
Werner has quit [Changing host]
Werner has joined #riscv
_whitelogger has joined #riscv
valentin has quit [Quit: Leaving]
elastic_dog has quit [Ping timeout: 265 seconds]
Andre_H has joined #riscv
llamp[m] has quit [Quit: node-irc says goodbye]
llamp[m] has joined #riscv
jotweh has joined #riscv
elastic_dog has joined #riscv
Gravis has quit [Ping timeout: 264 seconds]
Gravis has joined #riscv
Gravis has joined #riscv
Gravis has quit [Changing host]
TMM_ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TMM_ has joined #riscv
Gravis has quit [Ping timeout: 264 seconds]
Gravis has joined #riscv
Gravis has joined #riscv
Gravis has quit [Changing host]
llamp[m] has quit [Quit: node-irc says goodbye]
llamp[m] has joined #riscv
<TwoNotes> What happens if I try to assemble an address into a .word when the architecture is 64 bits but I happen to know that the address will fit in 32? I seem to be getting zeros.
<sorear> how are you running `as` and `ld` and how are you seeing zeros?
Narrat has joined #riscv
llamp[m] has quit [Quit: node-irc says goodbye]
llamp[m] has joined #riscv
<TwoNotes> riscv64-linux-gnu-as -march=rv64im and riscv64-linux-gnu-ld -m elf64lriscv
<TwoNotes> I see the zeros in GDB at runtime, and also in the dissaesmbly listing from objdump
<TwoNotes> A typical line of code is ".word 9f"
<TwoNotes> This code was written for RV32 and I am trying to port it to RV64 with minimal changes
KREYREN has joined #riscv
KREYREN has joined #riscv
<sorear> if you're objdumping a .o file zeros are expected because the relocations haven't applied yet. seeing them at runtime is more concerning
Gravis has quit [Ping timeout: 244 seconds]
Amanieu has quit [Ping timeout: 265 seconds]
<TwoNotes> I will write a very small test case to eliminate confusing factors.
* xentrac doesn't want to be eliminated! "Noooo..."
<TwoNotes> Actually, the objjump is reading the ELF file
<sorear> you should have at least two ELF files
<sorear> the object and the ... binary? unclear what your output format is but you didn't pass a linker script
<jrtc27> file(1) and readelf(1) can both tell you what kind of ELF file you've got
Gravis has joined #riscv
Gravis has quit [Changing host]
Gravis has joined #riscv
<TwoNotes> Yes, a .bin and a .elf
<TwoNotes> qemu reads the .bin
<jrtc27> .elf is a crappy extension
<jrtc27> lots of things are ELFs
<jrtc27> .o is an ELF, '' is an ELF, .so is an ELF
<jrtc27> all three tend to be different
<jrtc27> but, I'll assume that .elf is either ET_DYN or ET_EXEC
<jrtc27> FWIW, qemu can read ELF files just fine
<jrtc27> I don't know why people keep thinking they need to feed it .bin's
<jrtc27> waste of time and objectively worse
<TwoNotes> I can try that.
<TwoNotes> Test program gives expected results, so something else is going on.
llamp[m] has quit [Quit: node-irc says goodbye]
llamp[m] has joined #riscv
cousteau has joined #riscv
llamp[m] has quit [Client Quit]
llamp[m] has joined #riscv
Gravis has quit [Ping timeout: 264 seconds]
Gravis has joined #riscv
Gravis has joined #riscv
KREYREN has quit [Quit: Leaving]
cousteau has joined #riscv
cousteau has quit [Changing host]
KREYREN has joined #riscv
KREYREN has quit [Changing host]
KREYREN has joined #riscv
KREYREN has quit [Remote host closed the connection]
psydroid[m] has joined #riscv
Forty-Bot has quit [Ping timeout: 265 seconds]
vagrantc has joined #riscv
mctpyt has quit [Ping timeout: 264 seconds]
mhorne has quit [Ping timeout: 244 seconds]
mhorne has joined #riscv
psydroid[m] is now known as psydroid
choozy has quit [Ping timeout: 264 seconds]
psydroid has joined #riscv
psydroid has quit [Changing host]
KREYREN has joined #riscv
KREYREN has quit [Changing host]
KREYREN has joined #riscv
KREYREN is now known as BuZz_to_freenode
BuZz_to_freenode has quit [Quit: Leaving]
_whitelogger has joined #riscv
_whitelogger has joined #riscv
_whitelogger has joined #riscv
KREYREN has joined #riscv
choozy has joined #riscv
KREYREN has quit [Remote host closed the connection]
KREYREN has joined #riscv
devcpu has quit [Quit: leaving]
devcpu has joined #riscv
ats has quit [Ping timeout: 244 seconds]
KREYREN has quit [Quit: Leaving]
BUZZ_2_FREENODE has joined #riscv
BUZZ_2_FREENODE is now known as Guest1606
Andre_H has quit [Ping timeout: 264 seconds]
ats has joined #riscv
Maylay has quit [Ping timeout: 264 seconds]
Guest1606 has quit [Remote host closed the connection]
BUZZ_2_FREENODE has joined #riscv
BUZZ_2_FREENODE is now known as Guest5362
Maylay has joined #riscv
cwebber has joined #riscv
Guest5362 has quit [Remote host closed the connection]
BUZZ_ON_FREENODE has joined #riscv
BUZZ_ON_FREENODE has quit [Remote host closed the connection]
BUZZ_ON_FREENODE has joined #riscv
Maylay has quit [Ping timeout: 252 seconds]
Gravis has quit [Ping timeout: 244 seconds]
Maylay has joined #riscv
Gravis has joined #riscv
Gravis has joined #riscv
Gravis has quit [Changing host]
Gravis has quit [Remote host closed the connection]
sh1r4s3 has quit [Ping timeout: 264 seconds]
sh1r4s3 has joined #riscv
Guest52 has joined #riscv
Guest52 has left #riscv [#riscv]
sh1r4s3 has quit [Ping timeout: 265 seconds]
Gravis has joined #riscv
Gravis has joined #riscv
BUZZ_ON_FREENODE has quit [K-Lined]
sm2n has quit [Quit: Leaving]
sm2n has joined #riscv
sh1r4s3 has joined #riscv
sh1r4s3 has quit [Ping timeout: 244 seconds]
Raito_Bezarius has quit [Changing host]
Raito_Bezarius has joined #riscv
sh1r4s3 has joined #riscv
Narrat has quit [Quit: They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance.]
choozy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
Maylay has quit [Ping timeout: 265 seconds]
Maylay has joined #riscv
smartin has quit [Quit: smartin]
cousteau has quit [Quit: Leaving]
Andre_H has joined #riscv
ats has quit [Ping timeout: 244 seconds]
ats has joined #riscv
hendursaga has joined #riscv
Forty-Bot has joined #riscv
khem has joined #riscv
vagrantc has quit [Quit: leaving]
khem has quit [Quit: Client closed]
khem has joined #riscv