Add an additional hook (currently unused) for target specific capabilities.
This commit is contained in:
@@ -61,6 +61,7 @@
|
|||||||
#include "studyexpr.h"
|
#include "studyexpr.h"
|
||||||
#include "symbol.h"
|
#include "symbol.h"
|
||||||
#include "symtab.h"
|
#include "symtab.h"
|
||||||
|
#include "target.h"
|
||||||
#include "toklist.h"
|
#include "toklist.h"
|
||||||
#include "ulabel.h"
|
#include "ulabel.h"
|
||||||
#include "macro.h"
|
#include "macro.h"
|
||||||
@@ -445,7 +446,7 @@ static ExprNode* FuncCapability (void)
|
|||||||
/* The pseudo function result is the logical AND of all capabilities
|
/* The pseudo function result is the logical AND of all capabilities
|
||||||
** given.
|
** given.
|
||||||
*/
|
*/
|
||||||
if (!CPUHasCap (Cap)) {
|
if (!CPUHasCap (Cap) && !TargetHasCap (Cap)) {
|
||||||
Result = 0;
|
Result = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
|
#include "attrib.h"
|
||||||
#include "chartype.h"
|
#include "chartype.h"
|
||||||
#include "check.h"
|
#include "check.h"
|
||||||
#include "target.h"
|
#include "target.h"
|
||||||
@@ -302,3 +303,12 @@ const char* GetTargetName (target_t Target)
|
|||||||
/* Return the array entry */
|
/* Return the array entry */
|
||||||
return GetTargetProperties (Target)->Name;
|
return GetTargetProperties (Target)->Name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int TargetHasCap (capability_t Cap attribute((unused)))
|
||||||
|
/* Check if the current target has the given capability */
|
||||||
|
{
|
||||||
|
/* Currently unused */
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* common */
|
/* common */
|
||||||
|
#include "capability.h"
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -131,6 +132,9 @@ const TargetProperties* GetTargetProperties (target_t Target);
|
|||||||
const char* GetTargetName (target_t Target);
|
const char* GetTargetName (target_t Target);
|
||||||
/* Return the name of a target */
|
/* Return the name of a target */
|
||||||
|
|
||||||
|
int TargetHasCap (capability_t Cap);
|
||||||
|
/* Check if the current target has the given capability */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* End of target.h */
|
/* End of target.h */
|
||||||
|
|||||||
Reference in New Issue
Block a user