Deutsch   English   Français   Italiano  
<e1bb50a6c3f648c3b1b4393f4717d5b1@www.novabbs.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.misty.com!weretis.net!feeder9.news.weretis.net!news.nk.ca!rocksolid2!i2pn2.org!.POSTED!not-for-mail
From: mitchalsup@aol.com (MitchAlsup1)
Newsgroups: comp.arch
Subject: Re: 80286 protected mode
Date: Sat, 12 Oct 2024 18:32:48 +0000
Organization: Rocksolid Light
Message-ID: <e1bb50a6c3f648c3b1b4393f4717d5b1@www.novabbs.org>
References: <2024Oct6.150415@mips.complang.tuwien.ac.at> <memo.20241006163428.19028W@jgd.cix.co.uk> <2024Oct7.093314@mips.complang.tuwien.ac.at> <7c8e5c75ce0f1e7c95ec3ae4bdbc9249@www.novabbs.org> <2024Oct8.092821@mips.complang.tuwien.ac.at> <ve5ek3$2jamt$1@dont-email.me> <ve6gv4$2o2cj$1@dont-email.me> <ve6olo$2pag3$2@dont-email.me> <73e776d6becb377b484c5dcc72b526dc@www.novabbs.org> <ve7sco$31tgt$1@dont-email.me> <2b31e1343b1f3fadd55ad6b87d879b78@www.novabbs.org> <ve99fg$38kta$1@dont-email.me> <35cb536e6310a38f0269788881cffdaf@www.novabbs.org> <veb4j5$3kjt3$2@dont-email.me> <ab65eba51e4d4adc988e54df4a5fc7eb@www.novabbs.org> <ved03t$1uut$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
	logging-data="1738784"; mail-complaints-to="usenet@i2pn2.org";
	posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Site: $2y$10$9ZCrn3rsWwapJ.CqlQTBd.5jzBer6Sio5fGBnsrnuCEUQhFXuXZxa
X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71
Bytes: 2563
Lines: 35

On Sat, 12 Oct 2024 5:06:05 +0000, Brett wrote:

> MitchAlsup1 <mitchalsup@aol.com> wrote:
>> On Fri, 11 Oct 2024 12:10:13 +0000, David Brown wrote:
>>
>>>
>>> Do you think you can just write this :
>>>
>>> void * memmove(void * s1, const void  * s2, size_t n)
>>> {
>>> return memmove(s1, s2, n);
>>> }
>>>
>>> in your library's source?
>>
>>       .global memmove
>> memmove:
>>       MM     R2,R1,R3
>>       RET
>>
>> sure !
>>
>
> Can R3 be a const, that causes issues for restartability, but branch
> prediction is easier and the code is shorter.

The 3rd Operand can, indeed, be a constant.
That causes no restartability problem when you have a place to
store the current count==index, so that when control returns
and you re-execute MM, it sees that x amount has already been
done, and C-X is left.
>
> Though I guess forwarding a const is probably a thing today to improve
> branch prediction, which is normally HORRIBLE for short branch counts.

That is what Predication is for.