Re: 8-bit and 16-bit arithmetic

2021-10-28 Thread Carter Schonwald
yeah, like, currently the XOR for setting registers to zero trick / code optimization (first implemented in ghc backend by reid barton) is done as part of the pretty printer on X86/AMD_64 targets this and a lot of other easy win peephole optimizations that are platform /target dependent happen in

Re: 8-bit and 16-bit arithmetic

2021-10-28 Thread Ben Gamari
Norman Ramsey writes: > On x86, GHC can translate 8-bit and 16-bit operations directly > into the 8-bit and 16-bit machine instructions that the hardware > supports. But there are other platforms on which the smallest > unit of arithmetic may be 32 or even 64 bits. Is there a central > module

Re: 8-bit and 16-bit arithmetic

2021-10-28 Thread Andreas Klebinger
I think carter has it still right that it happens in the backends. If a new backend doesn't support these we could move this up into Cmm though without much issue I think. Am 28/10/2021 um 23:12 schrieb Carter Schonwald: I think thats done on a per backend basis (though theres been a lot of

Exact Print Annotations : Anchor in a SrcSpan

2021-10-28 Thread Alan & Kim Zimmerman
I have been updating the ghc-exactprint library for real world use cases on the about to be released GHC 9.2.1, and realised I need to be able to put an Anchor into every SrcSpan in the ParsedSource AST. I prepared !6854 to sort it out in master and turned to the problem of GHC 9.2.1, where I had

Re: 8-bit and 16-bit arithmetic

2021-10-28 Thread Carter Schonwald
I think thats done on a per backend basis (though theres been a lot of changes since i last looked at some of the relevent pieces). (i'm actually based in Cambridge MA for the next 1-2 years if you wanna brain storm IRL sometime) On Thu, Oct 28, 2021 at 4:59 PM Norman Ramsey wrote: > On x86,

8-bit and 16-bit arithmetic

2021-10-28 Thread Norman Ramsey
On x86, GHC can translate 8-bit and 16-bit operations directly into the 8-bit and 16-bit machine instructions that the hardware supports. But there are other platforms on which the smallest unit of arithmetic may be 32 or even 64 bits. Is there a central module in GHC that can take care of

Re: Running GHC in GHCi

2021-10-28 Thread Matthew Pickering
Looks good Ben. Would it be good to add a target to hadrian which builds just the right dependencies for this to work? and then deals with setting options such as -B as well. Matt On Thu, Oct 28, 2021 at 5:26 AM Bryan Richter wrote: > > That's very exciting! > > On Thu, 28 Oct 2021, 3.08 Ben