~laumann

Somewhere

https://laumann.xyz/

~laumann/cph-rs

Last active 21 days ago

~laumann/public-inbox

Last active 2 years ago

~laumann/a-tour-of-rust

Last active 5 years ago
View more

Recent activity

[PATCH v5] implement line number info tracking 1 year, 1 month ago

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]

Re: [PATCH v4] implement line number info tracking 1 year, 1 month ago

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

[PATCH v4] implement line number info tracking 1 year, 1 month ago

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]

Re: [RFC PATCH v3] implement line number info tracking 1 year, 2 months ago

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

Re: [RFC PATCH v3] implement line number info tracking 1 year, 2 months ago

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

[PATCH hare] rt/+linux/syscalls: fix small typo 1 year, 2 months ago

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]

[PATCH hare v2] encoding/base64: fix partial write bug 1 year, 2 months ago

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]

Re: [PATCH hare 1/2] encoding::base64: test for partial write bug 1 year, 2 months ago

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

[PATCH hare 2/2] encoding::base64: fix partial write bug 1 year, 2 months ago

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]

[PATCH hare 1/2] encoding::base64: test for partial write bug 1 year, 2 months ago

From Thomas Bracht Laumann Jespersen to ~sircmpwn/hare-dev

From: Armin Preiml <apreiml@strohwolke.at>

Signed-off-by: Armin Preiml <apreiml@strohwolke.at>
---
Same as https://paste.sr.ht/~apreiml/126a3f16c72626b3b4e2dd6289577c79b25e4e68,
modulo a blank line at the end of the file.

 encoding/base64/base64.ha | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/encoding/base64/base64.ha b/encoding/base64/base64.ha
index 25f43cc4..f1586abd 100644
--- a/encoding/base64/base64.ha
+++ b/encoding/base64/base64.ha
[message trimmed]