00:00:00 --- log: started forth/18.01.08 00:17:27 --- join: dddddd (~dddddd@unaffiliated/dddddd) joined #forth 01:00:07 --- join: dys (~dys@2003:5b:203b:100:6af7:28ff:fe06:801) joined #forth 04:28:17 --- join: proteusguy (~proteusgu@180.183.107.61) joined #forth 04:28:17 --- mode: ChanServ set +v proteusguy 04:30:46 --- quit: proteus-guy (Ping timeout: 248 seconds) 04:41:53 --- quit: jcob (Ping timeout: 246 seconds) 05:26:21 --- join: lijero (~lijero@unaffiliated/lijero) joined #forth 07:12:56 oshit you guys 07:13:07 jmp *(%rax,%rcx) is in fact a valid instruction 07:13:21 and only longer by one byte 07:13:31 this may be a reality, afterall 07:37:57 of course the movswq is still an additional four bytes though (and also an additional instruction) 08:20:24 another problem with it though is that if you read it as a signed then the interpreter can never be more than 32K away 08:20:37 so it would probably better to read it as unsigned, but it needs to be negative 08:21:47 well, it can't always be negative because then code-words couldn't work 08:21:59 this is a bad idea. 08:22:17 I guess the code field could just be a signed 32-bit 09:24:41 --- quit: dys (Ping timeout: 246 seconds) 09:51:26 --- join: dys (~dys@tmo-123-174.customers.d1-online.com) joined #forth 10:07:32 --- join: lugh (~lugh@chame.co) joined #forth 11:09:56 I am dumb 11:10:05 jmp *(%rax, %rcx) is not what I want, anyway 11:10:34 that calculates the address rax+rcx, then loads an address from there, and then jumps to that. which is meaningless. 11:10:41 (in this context) 11:10:57 so ultimately the moral of the story is: I think this is all a bad idea. 12:21:47 reepca, https://atariwiki.org/wiki/Wiki.jsp?page=Yet%20another%20target%20compiler 12:22:08 some text about relocatable forth meta-compilation 12:30:24 --- join: proteus-guy (~proteus-g@bba575250.alshamil.net.ae) joined #forth 12:39:17 --- join: karswell (~user@cust125-dsl91-135-5.idnet.net) joined #forth 12:46:00 --- quit: proteus-guy (Ping timeout: 256 seconds) 12:49:47 sort of covers what I had imagined (marking compiled addresses and patching them in a later pass), but I don't see it ever address how to deal with the code field of ITC. 13:01:31 --- join: proteus-guy (~proteus-g@bba575250.alshamil.net.ae) joined #forth 13:02:39 --- quit: proteus-guy (Max SendQ exceeded) 13:03:23 --- join: proteus-guy (~proteus-g@bba575250.alshamil.net.ae) joined #forth 13:04:38 --- quit: proteus-guy (Max SendQ exceeded) 13:05:00 --- join: proteus-guy (~proteus-g@bba575250.alshamil.net.ae) joined #forth 14:39:13 --- quit: dddddd (Remote host closed the connection) 15:06:13 --- quit: nighty- (Quit: Disappears in a puff of smoke) 15:39:25 --- quit: xek__ (Remote host closed the connection) 15:39:38 --- join: xek__ (xek@nat/intel/x-brmylsfgxrszmsyn) joined #forth 15:43:55 --- quit: dys (Ping timeout: 264 seconds) 16:34:29 --- join: nighty- (~nighty@kyotolabs.asahinet.com) joined #forth 17:22:57 --- quit: lugh (Quit: quitting bouncer) 17:24:12 --- join: lugh (~lugh@chame.co) joined #forth 17:25:10 --- quit: lugh (Client Quit) 17:29:34 --- join: lugh (~lugh@chame.co) joined #forth 18:18:30 --- quit: MrBusiness3 (Read error: Connection reset by peer) 18:19:34 --- join: MrBusiness3 (~ArcMrBism@2602:306:8325:a300:1426:998c:b44b:81fb) joined #forth 19:46:34 reepca, so I've spent the last couple of hours doing some prototyping and profiling. as of now my plan is to go with DTC five-byte code fields (e9 and four-byte relative address), and 16-bit thread-compiled addresses as described before 19:47:10 I think that achieves position-independence 19:47:48 my NEXT then is: lodsw; jmp *%rax 19:48:16 if I want to support cross-module calls (which I'm sure I will), that'll have to be: mov %rsi, %rax; lodsw; jmp *%rax 19:49:19 interestingly, in ITC that extra instruction seemed to have about a 50% impact to performance (about what I expected), but in DTC it was only about a 5% impact (???) 19:54:19 if you're interested, here's my test: https://gist.github.com/cmtptr/35b019538bbb5c40cf65c7e935fb23a5 19:55:38 it just raises a number to the 63rd power a bunch of times. I thought this would be a reasonable test because it has a good mixture of forth and code words, and it recurses a lot so you get a lot of nesting 19:56:41 and plus the end result is a reasonably unique number making it easy to tell when it's not working right 20:08:30 tomorrow I'll probably also play with using calls in the code field instead of jmp. it just seems like that should be better to me because you get a free address pushed onto the stack, but last time I tried it,il it was actually worse. I want to confirm I didn't do something stupid 20:08:40 but for now, I've got to call it a day 20:59:42 --- quit: lijero (Remote host closed the connection) 21:26:34 --- quit: proteus-guy (Ping timeout: 240 seconds) 23:49:58 --- quit: malyn (Ping timeout: 240 seconds) 23:50:16 --- join: malyn (~malyn@unaffiliated/malyn) joined #forth 23:59:59 --- log: ended forth/18.01.08