freenode/#mezzano - IRC Chatlog
Search
17:25:29
ebrasca
; Debugger entered on #<SB-KERNEL:CASE-FAILURE expected-type: (MEMBER :X86-64 :ARM64) datum: :PPC64>
17:32:36
froggey
you should look at how the arm assembler works, that'll be more similar to ppc than x86 is
17:34:15
froggey
arm64 has emit-instruction, which takes a whole instruction word and breaks it up into bytes for emit
18:09:31
froggey
if you want to check what you've assembled, you can copy the bytes into an assembly file as bytes and assemble it with binutils' assembler
18:10:47
froggey
the mezzano assembler will produce a vector of bytes like #(1 2 3 4), you can create a file call foo.s containing ".byte 1, 2, 3, 4"
20:29:56
froggey
jump/branch instructions are usually pc-relative, so their encoding will change based on where the instruction is
20:35:15
froggey
the label "test4" will be at offset 0, the instruction "b test4" will be at offset 12. if b instructions are pc-relative (and it looks like they are), then "b test4" is encoded as "branch backwards 12 bytes"
20:38:07
froggey
you see all the 'f's in "f4 ff ff 4b"? that usually indicates there's probably a negative value involved
20:38:31
froggey
no, I'm just guessing based on what you've told me about ppc64 & what I've learnt writing other assemblers
20:52:58
froggey
it requires understanding a complicated manual and implementing a whole bunch of repetitive code
20:53:47
froggey
mezzano doesn't have a disassemble function because I got tired of implementing the x86 assembler and didn't want to write a disassembler
22:28:37
froggey
don't add any more symbols to cl-symbols.lisp-expr, that's a list of all symbols exported by the COMMON-LISP package and is is defined by the CL standard
22:28:37
bms_
Oh, I have a question for you. I'm still working on a split-sequence function. I was wondering if you have an alternative already made and if not, how I can make the function external in your system?
22:30:29
bms_
That's probably to best solution. I wasn't sure what your status was on adding libraries, but if you're fine, I'll do it.
22:31:22
froggey
it should just be a case of adding it as a submodule in mbuild and requiring it in ipl.lisp
22:41:05
froggey
if there was not library, then for something like split-sequence I'd probably just dump it in the sys.int package and not bother exporting it... there isn't really any package exporting miscellaneous useful functions
22:42:01
froggey
if it was a group of functions/symbols doing some coherent thing then I'd define a new package & export through there
22:45:07
bms_
I found an implementation on Github. I’ve written it into .gitmodules. You said to include it in ipl.lisp?
22:47:20
froggey
there should be a bunch of require forms in ipl.lisp around line 100, add a new one after them
22:55:06
bms_
Of course, Virtualbox makes the whole thing slightly more tedious by keeping track of file UUIDs.
23:03:24
froggey
VBoxManage convertfromraw takes a --uuid option. I didn't include it in the Makefile because I though it might cause trouble if everyone produced disk images with the same uuid
23:09:45
bms_
Eh, it’s an easy workaround. I don’t care enough to add that, seeing as I do believe that could be weird.
0:29:09
bms_
So, I’ve added everything everywhere and my code in irc.lisp is commented out to make sure it’s not that, but I crash before I reach the desktop. The only result number option given is 0: retry allocation, but there’s an immovable window over that window so I can’t execute it… this happened before and rebuilding fixed it, but it didn’t this time. Suggestions?