Click Here
home features news forums classifieds faqs links search
6071 members 
Amiga Q&A /  Free for All /  Emulation /  Gaming / (Latest Posts)
Login

Nickname

Password

Lost Password?

Don't have an account yet?
Register now!

Support Amigaworld.net
Your support is needed and is appreciated as Amigaworld.net is primarily dependent upon the support of its users.
Donate

Menu
Main sections
» Home
» Features
» News
» Forums
» Classifieds
» Links
» Downloads
Extras
» OS4 Zone
» IRC Network
» AmigaWorld Radio
» Newsfeed
» Top Members
» Amiga Dealers
Information
» About Us
» FAQs
» Advertise
» Polls
» Terms of Service
» Search

IRC Channel
Server: irc.amigaworld.net
Ports: 1024,5555, 6665-6669
SSL port: 6697
Channel: #Amigaworld
Channel Policy and Guidelines

Who's Online
16 crawler(s) on-line.
 167 guest(s) on-line.
 0 member(s) on-line.



You are an anonymous user.
Register Now!
 Gunnar:  30 mins ago
 pixie:  49 mins ago
 DiscreetFX:  1 hr 29 mins ago
 DWolfman:  1 hr 38 mins ago
 cncparts:  3 hrs 11 mins ago
 saipaman4366:  3 hrs 57 mins ago
 Beajar:  4 hrs 17 mins ago
 Rob:  4 hrs 19 mins ago
 agami:  5 hrs 22 mins ago
 RobertB:  5 hrs 42 mins ago

/  Forum Index
   /  Amiga OS4.x \ Workbench 4.x
      /  Does AOS4 support ALTIVEC?
Register To Post

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Next Page )
PosterThread
EntilZha 
Re: Does AOS4 support ALTIVEC?
Posted on 30-May-2004 20:34:04
#103 ]
OS4 Core Developer
Joined: 27-Aug-2003
Posts: 1679
From: The Jedi Academy, Yavin 4

Just to let you know: OS4 supports Altivec since today (I had nothing else to do today )

I went for the "simple" approach: When a task starts, it's launched with Altivec disabled, thus no vector registers are stored during context switch. The first altive instruction then generates an exception, and the enable bit is set. From then on, the task saves/restores Altivec context whenever it is scheduled. vrsave is used to keep track of the registers.

_________________
Thomas, the kernel guy

"I don't have a frigging clue. I'm norwegian" -- Ole-Egil

All opinions expressed are my own and do not necessarily represent those of Hyperion Entertainment

 Status: Offline
Profile     Report this post  
The_Editor 
Re: Does AOS4 support ALTIVEC?
Posted on 30-May-2004 20:42:54
#104 ]
Elite Member
Joined: 7-Mar-2003
Posts: 7629
From: 192.168.0.02 ..Pederburgh .. Iceni

@EntilZha
This is a news item Mr Frieden !!

btw ..

WELL DONE

_________________
******************************************
I dont suffer from Insanity - I enjoy it

******************************************

 Status: Offline
Profile     Report this post  
ajs 
Re: Does AOS4 support ALTIVEC?
Posted on 30-May-2004 20:43:50
#105 ]
Super Member
Joined: 8-Mar-2003
Posts: 1459
From: Surrey

@EntilZha

_________________
Everything is proceeding as I have foreseen

Some people are like slinkies. Not really good for anything but they bring a smile to your face when pushed down the stairs.

 Status: Offline
Profile     Report this post  
dimmck 
Re: Does AOS4 support ALTIVEC?
Posted on 30-May-2004 23:17:46
#106 ]
Regular Member
Joined: 3-Sep-2003
Posts: 415
From: Cheney, WA

@EntilZha

Quote:

EntilZha wrote:
Just to let you know: OS4 supports Altivec since today (I had nothing else to do today )

I went for the "simple" approach: When a task starts, it's launched with Altivec disabled, thus no vector registers are stored during context switch. The first altive instruction then generates an exception, and the enable bit is set. From then on, the task saves/restores Altivec context whenever it is scheduled. vrsave is used to keep track of the registers.


That's great news. It's really great when you have nothing else to do. I doubt that happens very often.

Anyway, by the time that becomes available in the the first update to OS4, maybe I'll have figured out how to put it to use. As it is, I know almost nothing about Altivec.

Dave M.

 Status: Offline
Profile     Report this post  
tomazkid 
Re: Does AOS4 support ALTIVEC?
Posted on 30-May-2004 23:41:27
#107 ]
Team Member
Joined: 31-Jul-2003
Posts: 11694
From: Kristianstad, Sweden

@EntilZha

That was really breaking news


_________________
Site admins are people too..pooff!

 Status: Offline
Profile     Report this post  
Bobsonsirjonny 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 0:14:13
#108 ]
Elite Member
Joined: 28-Jul-2003
Posts: 2880
From: Unknown



 Status: Offline
Profile     Report this post  
Bodie 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 1:21:05
#109 ]
Super Member
Joined: 9-Jan-2003
Posts: 1439
From: Azjol-Nerub

@EntilZha

bloody great news indeed .

 Status: Offline
Profile     Report this post  
Treke 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 7:41:17
#110 ]
Regular Member
Joined: 17-Mar-2003
Posts: 137
From: EU

@EntilZha

Quote:
Just to let you know: OS4 supports Altivec since today (I had nothing else to do today ) I went for the "simple" approach: When a task starts, it's launched with Altivec disabled, thus no vector registers are stored during context switch. The first altive instruction then generates an exception, and the enable bit is set. From then on, the task saves/restores Altivec context whenever it is scheduled. vrsave is used to keep track of the registers.


Congrats.
If bits in vrsave are zero, then no save is done, even if the task is already using Altivec ? Did I get it right ?

 Status: Offline
Profile     Report this post  
jd997uk 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 7:53:08
#111 ]
Regular Member
Joined: 11-Mar-2003
Posts: 135
From: Portsmouth

@Bobsonsirjonny

Re C Programming

Leicester University has decent online tutorials
here.
Should be enough to get you started.

-john

 Status: Offline
Profile     Report this post  
Rogue 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 8:23:25
#112 ]
OS4 Core Developer
Joined: 14-Jul-2003
Posts: 3999
From: Unknown

@Treke

Quote:
If bits in vrsave are zero, then no save is done, even if the task is already using Altivec ? Did I get it right ?


Yes. Usually, gcc clears vrsave when leaving a function that uses altivec, so task scheduler overhead is minimal.

_________________
Seriously, if you want to contact me do not bother sending me a PM here. Write me a mail

 Status: Offline
Profile     Report this post  
Anonymous 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 8:33:49
# ]

0
0

@Rogue

Will there be a trap library for processors without altivec? Or will using binaries with altivec code simply crash on processors without it?

/Björn

 
     Report this post  
Rogue 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 10:29:51
#114 ]
OS4 Core Developer
Joined: 14-Jul-2003
Posts: 3999
From: Unknown

@Orgin

Quote:
Will there be a trap library for processors without altivec? Or will using binaries with altivec code simply crash on processors without it?


Writing an "emulation" for altivec is a big task, and I don't think we'll be going through this. There are functions in the Exec API to test for the presence of Altivec, and applications are required to check this and not execute altivec instructions if not present.

_________________
Seriously, if you want to contact me do not bother sending me a PM here. Write me a mail

 Status: Offline
Profile     Report this post  
MagicSN 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 10:30:09
#115 ]
Hyperion
Joined: 10-Mar-2003
Posts: 666
From: Unknown

@Orgin

I'd say it might make sense to check what sort of CPU (check == with the provided API by the AltiVec-using program) is in an Amiga before using Altivec features. If not replacement non-Altivec-functions should be used by the program, without needed user-interaction, IMHO.

Steffen

 Status: Offline
Profile     Report this post  
Anonymous 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 10:41:00
# ]

0
0

@Rogue

Okey cool. Thanks.

I assume that it would technically be possible for a third party to supply such emulation though? (If looking at it technically and not whether there would be a need for it.)

/Björn

 
     Report this post  
Rogue 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 11:36:42
#117 ]
OS4 Core Developer
Joined: 14-Jul-2003
Posts: 3999
From: Unknown

@Orgin

Quote:
I assume that it would technically be possible for a third party to supply such emulation though? (If looking at it technically and not whether there would be a need for it.)


Yes. It would cause a "program exception", and an emulation would need to check for the instruction that caused this, and emulate its meaning.

_________________
Seriously, if you want to contact me do not bother sending me a PM here. Write me a mail

 Status: Offline
Profile     Report this post  
Treke 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 12:26:34
#118 ]
Regular Member
Joined: 17-Mar-2003
Posts: 137
From: EU

@Rogue

AFAIR, the Altivec.resource isn't done yet, it is scheduled only for final version ?

Btw the solution suggested by codesmith in 2nd reply from top looks more effective (if the exception handling is fast), but it is harder to implement. A bit speculative in speedup gain, but maybe worth a measure.

Don't take it as a nitpicking pls, (and on the end of the thread ! ) the Altivec support is realy a great thing.

re

Treke

 Status: Offline
Profile     Report this post  
Rogue 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 14:16:21
#119 ]
OS4 Core Developer
Joined: 14-Jul-2003
Posts: 3999
From: Unknown

@Treke

Quote:
AFAIR, the Altivec.resource isn't done yet, it is scheduled only for final version ?


Altivec resource was meant as an arbitration/detection method for Altivec. It has been more or less superceeded by Exec's API function GetCPUInfo.

Quote:
Btw the solution suggested by codesmith in 2nd reply from top looks more effective (if the exception handling is fast), but it is harder to implement. A bit speculative in speedup gain, but maybe worth a measure.


The problem here would be to anticipate when a task is going to use the altivec unit or not. That is, if Task A is preempted then you don't know if task B is going to use altivec or not.

The proposed method of storing the altivec registers in the interrupt is a bit problematic - the vector for the Altivec Unavailable interrupt is rather small, and the PowerPC does not save anything onto the stack upon an exception, so you would need to store the current CPU context before you can do any sensible work.

_________________
Seriously, if you want to contact me do not bother sending me a PM here. Write me a mail

 Status: Offline
Profile     Report this post  
EntilZha 
Re: Does AOS4 support ALTIVEC?
Posted on 31-May-2004 14:37:33
#120 ]
OS4 Core Developer
Joined: 27-Aug-2003
Posts: 1679
From: The Jedi Academy, Yavin 4

@Treke

Quote:
AFAIR, the Altivec.resource isn't done yet, it is scheduled only for final version ?


It won't be necessary. Initially, it was meant to "allocate" vetor registers, but since gcc generates the necessary vrsave code itself, and without the use of the system, it wasn't needed anymore. Same goes for streams.

To detect if there is an Altivec unit, you can use a new exec function ("GetCPUInfo") that will tell you if there is one or not.

Quote:
Btw the solution suggested by codesmith in 2nd reply from top looks more effective (if the exception handling is fast), but it is harder to implement. A bit speculative in speedup gain, but maybe worth a measure


This is probably more efficient (I haven't looked at this in detail yet), but since the scheduler will be replaced for 4.1, the more sophistcated algorithm can come in later. For now, the vrsave and msr marking will make sure that the overhead is kept at a minimum. The important point is that it works And it's transparent to the application code, anyway, so later changes will not affect the applications...

_________________
Thomas, the kernel guy

"I don't have a frigging clue. I'm norwegian" -- Ole-Egil

All opinions expressed are my own and do not necessarily represent those of Hyperion Entertainment

 Status: Offline
Profile     Report this post  
Jorge 
Re: Does AOS4 support ALTIVEC?
Posted on 1-Jun-2004 11:35:49
#121 ]
Cult Member
Joined: 20-Oct-2003
Posts: 657
From: Scottsdale, AZ

@MagicSN

Quote:
I'd say it might make sense to check what sort of CPU (check == with the provided API by the AltiVec-using


Well, now isn't that a cool thing in combination with the interface structures:


struct RenderIF * aRenderIF;

if (ExecIF->GetCPU()) & ALTIVEC) // or however this goes
{
render_lib = OpenLibrary("myPlainG3Render.library",0);
aRenderIF = ObtainInterface(render_lib);
}
else
{
render_lib = OpenLibrary("mySIMDRender.library",0);
aRenderIF = ObtainInterface(render_lib);
}

aRenderIF->RenderMe();


I guess this would work ;)



Real OOP at OS level

_________________
AmigaOne XE G3/933/VIA/FM801/R200 (fixed),
G3SE/600/Voodoo3/Sil680/RTL8139/SBLive! (noiseless!)
µA1-MK2/G3/933/R200/CMI8738
XE/G4 (broken 7450/800)

 Status: Offline
Profile     Report this post  
olegil 
Re: Does AOS4 support ALTIVEC?
Posted on 1-Jun-2004 12:25:22
#122 ]
Elite Member
Joined: 22-Aug-2003
Posts: 5895
From: Work

@Jorge

If that one gets verified it needs to become the start of a HOW-TO immediately

_________________
This weeks pet peeve:
Using "voltage" instead of "potential", which leads to inventing new words like "amperage" instead of "current" (I, measured in A) or possible "charge" (amperehours, Ah or Coulomb, C). Sometimes I don't even know what people mean.

 Status: Offline
Profile     Report this post  
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 Next Page )

[ home ][ about us ][ privacy ] [ forums ][ classifieds ] [ links ][ news archive ] [ link to us ][ user account ]
Copyright (C) 2000 - 2019 Amigaworld.net.
Amigaworld.net was originally founded by David Doyle