Re: [hatari-devel] DSP add AGU pipeline for parallel moves |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] DSP add AGU pipeline for parallel moves
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Wed, 5 Jun 2024 20:13:21 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1717611228; bh=DyoGhkq6OtFxjSANaZ91XoemUngS19pZmkplM9oJ+Fo=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To; b=QD2MBZ4ws/0anU6+/0yst1P7yN1nkvuHlAx+iy3AsxZJp87hkhV5jNIjw6zcfolTg XtQyQCZO4WQfw7ja2uFkpm0H+UpdZ27N1XTgH9j0Lj4vXKLaPloKtaCOY8whGOnLe0 cfnD3HIJK2bmK9pNWaU7wKZIUNMrXouNypLcxmqONxCKFd3we+M8xJkbDBOpCpybIm Y1QnLQLJGdC52PIYNmsJpzDluKZl3DZoJrqEPNsxDv7nKCUw5qNLQkGZtb57pQ35BD ugEYzjo8dcnLIv9ZbXpvniJGMK9uhwkcg6CD+BrwQCK0d9dAG9n+HV5TLuiALI0j7l aJ85AkkcvIEoQ==
Thank you for fixing this bug. Btw. this did not just cause a warning, the code would have failed.
In the old code m_reg was uint16_t. It probably makes sense to check the new code for other signed/unsigned data type errors. These errors are very hard to debug if discovered later.
And I suggest to remove the commented lines.
> Am 03.06.2024 um 23:02 schrieb Andreas Grabher <andreas_g86@xxxxxxxxxx>:
>
> Hello,
>
> thank you for the patch! I added it and have one minor issue:
>
> For this line in dsp_update_rn() I get a warning "Result of comparison of constant 65535 with expression of type 'int16_t' (aka 'short') is always false":
>
> if (reg_modulo == 65535) {
>
> Obviously the value is not recognized as -1 by the compiler. So probably better use -1 instead.
>
> Best wishes,
> Andreas
>
>> Am 03.06.2024 um 22:30 schrieb Laurent Sallafranque <laurent.sallafranque@xxxxxxx>:
>>
>> Hi,
>>
>> First, I'm pleased to see that tuxfamily.org is back.
>> I've taken some days to try to figure out why underscore demo was always bugging at the same point.
>> The main explanation was the lack of pipeline emulation in the AGU.
>>
>> For example :
>> move #<10,r0
>> move #<15,r0
>> move x:(r0),a
>>
>> The register "a" should equal 10 and not 15, due to a 1 instruction delay.
>> This happens for parallel moves instructions.
>>
>> I've implemented this behavior for all Rx, Nx and Mx registers.
>> I've done a lot of non regression tests with many demos, programs, musik players, ... and didn't noticed any regression.
>>
>>
>> I've seen this pipeline restriction in some demos with mod player sound embedded, with EKO System, and probably some other demos.
>> The only one I know that suffered this was underscore demo.
>>
>> _ demo now renders the arrow correctly, with the blue lightened metallic texture and runs more frames before crashing. The crash doesn't always occur at the same point : sometimes it crashs before or later.
>>
>> The max I can now run is until this frame :
>>
>> <S2tblOwg38Bq3wQz.png>
>>
>>
>> I've implemented the pipe for LUA, Parallel moves, MOVEC, TCC, MOVEP MOVE instructions.
>> The motorola DSP docs also include MOVEM, but I've done many tests and it doesn't seem to suffer the pipeline restriction.
>>
>>
>> This improvement in AGU emulation allows to feed the registers R, N or M just in time (also if this is not recommanded by Motorola ;)
>>
>> Regards
>> Laurent
>>
>
>
>