Somewhere
From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev
I consent.
From Thomas Bracht Laumann Jespersen to ~mpu/qbe
Support "line" and "loc" directives. "line" takes a string (a file name)
assigns it a number, sets the current file to that number and records
the string for later. "loc" takes a single number and outputs location
information with a reference to the current file.
---
v4 -> v5:
* Rename emitfile()/emitloc() to dbgfile()/dbgloc()
* This version keeps track of seen file names. Calling dbgfile() sets a global
current file and optionally emits a .file n <filename> directive once per
file name.
[message trimmed]
From Thomas Bracht Laumann Jespersen to ~mpu/qbe
> really glad to see someone working on this. :-) > > * Rebased bgs' work on current qbe master - @bgs: I changed the Author, let > > me know if you'd like your name on the Author spot, I'll add myself to > > Co-authored-by in that case. > > I think that's fine as it is now. Ok. > > * drop the file number argument from "file" and "loc" - the current file number > > is kept in parse(), and added to Fn so the various emit() functions can get
From Thomas Bracht Laumann Jespersen to ~mpu/qbe
Co-authored-by: Bor Grošelj Simić <bgs@turminal.net>
---
v3 -> v4
* Rebased bgs' work on current qbe master - @bgs: I changed the Author, let
me know if you'd like your name on the Author spot, I'll add myself to
Co-authored-by in that case.
* drop the file number argument from "file" and "loc" - the current file number
is kept in parse(), and added to Fn so the various emit() functions can get
to it.
* address mpu's comments on v3: added emitfile() and emitloc() that are called
into from the arch-specific emit implementations
[message trimmed]
From Thomas Bracht Laumann Jespersen to ~mpu/qbe
> diff --git a/amd64/isel.c b/amd64/isel.c > index 5a64429..54aba26 100644 > --- a/amd64/isel.c > +++ b/amd64/isel.c > @@ -367,6 +367,7 @@ sel(Ins i, ANum *an, Fn *fn) > case Oexts: > case Otruncd: > case Ocast: > + case Oloc: > case_OExt: > Emit: > emiti(i); This emiti() call is immediately followed by calls to fixarg() which is avoided
From Thomas Bracht Laumann Jespersen to ~mpu/qbe
Hi, > > I'm not too keen on the syntax 'file' at toplevel does not > > really look like debug. Same applies to the 'loc' operation. > > The names are taken directly from gas, because the functionality is taken > directly from gas too - .file maps a file id to filename and .loc specifies the > source location of the succeeding instruction. > > > How is 'file' supposed to be used? Would it make sense to > > include it in functions' linkage? > > No, the id<->filename map is a global thing by design. I thought about this a > lot and I'm not sure how to improve it. I'm happy to change the command names
From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> --- rt/+linux/syscalls.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha index f7e12654..ea13c7fb 100644 --- a/rt/+linux/syscalls.ha +++ b/rt/+linux/syscalls.ha @@ -818,7 +818,7 @@ export fn ptrace( addr: uintptr, data: uintptr, ) (u64 | errno) = { // PTRACE_PEEK* requests write into *data instead of just returing[message trimmed]
From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev
Co-authored-by: Armin Preiml <apreiml@strohwolke.at> Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> --- v1 -> v2 Merge two commits into one: The first commit introduced a test that would fail, the second added a fix. encoding/base64/base64.ha | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/encoding/base64/base64.ha b/encoding/base64/base64.ha index 25f43cc4..c9db0c76 100644 --- a/encoding/base64/base64.ha [message trimmed]
From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev
> This patchset should be a single patch, introducing a test before fixing it is > undesirable, because it creates a point in git history at which the testsuite fails. Alright, I was torn between this and wanting to preserve authorship. The patch introducing the test was authored by apreiml. I'll send a v2, and add a "Co-authored-by" line, if that's ok. -- Thomas
From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev
Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> --- encoding/base64/base64.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/encoding/base64/base64.ha b/encoding/base64/base64.ha index f1586abd..c9db0c76 100644 --- a/encoding/base64/base64.ha +++ b/encoding/base64/base64.ha @@ -96,7 +96,7 @@ fn encode_writer( static let b: [3]u8 = [0...]; // 3 bytes get converted into 4 bytes if (i < s.avail) { for (let j = 0z; j < s.avail; j += 1) { b[j] = s.buf[i];[message trimmed]