Commit 2aed556f authored by eseidel's avatar eseidel

2006-10-02 Nikolas Zimmermann <zimmermann@kde.org>

        Reviewed by eseidel & mjs.  Landed by eseidel.

        Fix Qt/Linux build with older gcc 3.3.4.
        http://bugs.webkit.org/show_bug.cgi?id=11116

        As discussed with Maciej, the GCC_ROOT_NS_HACK
        can be completely removed, as well as the friendship
        between cacheGlobalObject & the JS* objects.

        * bindings/scripts/CodeGeneratorJS.pm: Remove friendship.
        * platform/image-decoders/png/pnggccrd.c: Fix comments for gcc3.
        (png_read_filter_row_mmx_avg):
        * platform/image-decoders/png/pngvcrd.c: Ditto.
        (png_mmx_support):
        (png_read_filter_row_mmx_avg):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 39db9c21
2006-10-02 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by eseidel & mjs. Landed by eseidel.
Fix Qt/Linux build with older gcc 3.3.4.
http://bugs.webkit.org/show_bug.cgi?id=11116
* kjs/lookup.h: Move cacheGlobalObject into KJS namespace.
(KJS::cacheGlobalObject): Also remove GCC_ROOT_NS_HACK.
* wtf/Assertions.h: Include inttypes.h for uintptr_t.
2006-09-28 Steve Falkenburg <sfalken@apple.com>
Reviewed by Maciej.
......
......@@ -41,7 +41,7 @@ namespace KJS {
/**
* s is the key (e.g. a property name)
*/
const char *s;
const char* s;
/**
* value is the result value (usually an enum value)
......@@ -59,7 +59,7 @@ namespace KJS {
/**
* next is the pointer to the next entry for the same hash value
*/
const HashEntry *next;
const HashEntry* next;
};
/**
......@@ -88,7 +88,7 @@ namespace KJS {
* pointer to the array of entries
* Mind that some entries in the array are null (0,0,0,0).
*/
const HashEntry *entries;
const HashEntry* entries;
/**
* the maximum value for the hash. Always smaller than size.
*/
......@@ -103,9 +103,8 @@ namespace KJS {
/**
* Find an entry in the table, and return its value (i.e. the value field of HashEntry)
*/
static int find(const struct HashTable *table, const Identifier &s);
static int find(const struct HashTable *table,
const UChar *c, unsigned int len);
static int find(const struct HashTable*, const Identifier&);
static int find(const struct HashTable*, const UChar*, unsigned int len);
/**
......@@ -113,8 +112,7 @@ namespace KJS {
* This variant gives access to the other attributes of the entry,
* especially the attr field.
*/
static const HashEntry* findEntry(const struct HashTable *table,
const Identifier &s);
static const HashEntry* findEntry(const struct HashTable*, const Identifier&);
};
......@@ -125,16 +123,16 @@ namespace KJS {
* Helper for getStaticFunctionSlot and getStaticPropertySlot
*/
template <class FuncImp>
inline JSValue *staticFunctionGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
inline JSValue* staticFunctionGetter(ExecState* exec, JSObject*, const Identifier& propertyName, const PropertySlot& slot)
{
// Look for cached value in dynamic map of properties (in JSObject)
JSObject *thisObj = slot.slotBase();
JSValue *cachedVal = thisObj->getDirect(propertyName);
JSObject* thisObj = slot.slotBase();
JSValue* cachedVal = thisObj->getDirect(propertyName);
if (cachedVal)
return cachedVal;
const HashEntry *entry = slot.staticEntry();
JSValue *val = new FuncImp(exec, entry->value, entry->params, propertyName);
const HashEntry* entry = slot.staticEntry();
JSValue* val = new FuncImp(exec, entry->value, entry->params, propertyName);
thisObj->putDirect(propertyName, val, entry->attr);
return val;
}
......@@ -144,7 +142,7 @@ namespace KJS {
* Helper for getStaticValueSlot and getStaticPropertySlot
*/
template <class ThisImp>
inline JSValue *staticValueGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
inline JSValue* staticValueGetter(ExecState* exec, JSObject*, const Identifier&, const PropertySlot& slot)
{
ThisImp* thisObj = static_cast<ThisImp*>(slot.slotBase());
const HashEntry* entry = slot.staticEntry();
......@@ -172,7 +170,7 @@ namespace KJS {
* @param thisObj "this"
*/
template <class FuncImp, class ThisImp, class ParentImp>
inline bool getStaticPropertySlot(ExecState *exec, const HashTable* table,
inline bool getStaticPropertySlot(ExecState* exec, const HashTable* table,
ThisImp* thisObj, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = Lookup::findEntry(table, propertyName);
......@@ -194,13 +192,13 @@ namespace KJS {
* a dummy getValueProperty.
*/
template <class FuncImp, class ParentImp>
inline bool getStaticFunctionSlot(ExecState *exec, const HashTable *table,
inline bool getStaticFunctionSlot(ExecState* exec, const HashTable* table,
JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = Lookup::findEntry(table, propertyName);
if (!entry) // not found, forward to parent
return static_cast<ParentImp *>(thisObj)->ParentImp::getOwnPropertySlot(exec, propertyName, slot);
return static_cast<ParentImp*>(thisObj)->ParentImp::getOwnPropertySlot(exec, propertyName, slot);
assert(entry->attr & Function);
......@@ -213,8 +211,8 @@ namespace KJS {
* Using this instead of getStaticPropertySlot removes the need for a FuncImp class.
*/
template <class ThisImp, class ParentImp>
inline bool getStaticValueSlot(ExecState *exec, const HashTable* table,
ThisImp* thisObj, const Identifier &propertyName, PropertySlot& slot)
inline bool getStaticValueSlot(ExecState* exec, const HashTable* table,
ThisImp* thisObj, const Identifier& propertyName, PropertySlot& slot)
{
const HashEntry* entry = Lookup::findEntry(table, propertyName);
......@@ -233,7 +231,7 @@ namespace KJS {
* is found it sets the value and returns true, else it returns false.
*/
template <class ThisImp>
inline bool lookupPut(ExecState* exec, const Identifier &propertyName,
inline bool lookupPut(ExecState* exec, const Identifier& propertyName,
JSValue* value, int attr,
const HashTable* table, ThisImp* thisObj)
{
......@@ -263,7 +261,7 @@ namespace KJS {
* then it calls put() on the ParentImp class.
*/
template <class ThisImp, class ParentImp>
inline void lookupPut(ExecState* exec, const Identifier &propertyName,
inline void lookupPut(ExecState* exec, const Identifier& propertyName,
JSValue* value, int attr,
const HashTable* table, ThisImp* thisObj)
{
......@@ -271,34 +269,28 @@ namespace KJS {
thisObj->ParentImp::put(exec, propertyName, value, attr); // not found: forward to parent
}
} // namespace
/*
* The template method below can't be in the KJS namespace because it's used in
* KJS_DEFINE_PROPERTY which can be used outside of the KJS namespace. It can be moved back
* when a gcc with http://gcc.gnu.org/bugzilla/show_bug.cgi?id=8355 is mainstream enough.
*/
/**
* This template method retrieves or create an object that is unique
* (for a given interpreter) The first time this is called (for a given
* property name), the Object will be constructed, and set as a property
* of the interpreter's global object. Later calls will simply retrieve
* that cached object. Note that the object constructor must take 1 argument, exec.
*/
template <class ClassCtor>
inline KJS::JSObject *cacheGlobalObject(KJS::ExecState *exec, const KJS::Identifier &propertyName)
{
KJS::JSObject *globalObject = static_cast<KJS::JSObject *>(exec->lexicalInterpreter()->globalObject());
KJS::JSValue *obj = globalObject->getDirect(propertyName);
if (obj) {
assert(obj->isObject());
return static_cast<KJS::JSObject *>(obj);
/**
* This template method retrieves or create an object that is unique
* (for a given interpreter) The first time this is called (for a given
* property name), the Object will be constructed, and set as a property
* of the interpreter's global object. Later calls will simply retrieve
* that cached object. Note that the object constructor must take 1 argument, exec.
*/
template <class ClassCtor>
inline JSObject* cacheGlobalObject(ExecState* exec, const Identifier& propertyName)
{
JSObject* globalObject = static_cast<JSObject*>(exec->lexicalInterpreter()->globalObject());
JSValue* obj = globalObject->getDirect(propertyName);
if (obj) {
assert(obj->isObject());
return static_cast<JSObject* >(obj);
}
JSObject* newObject = new ClassCtor(exec);
globalObject->put(exec, propertyName, newObject, Internal | DontEnum);
return newObject;
}
KJS::JSObject *newObject = new ClassCtor(exec);
globalObject->put(exec, propertyName, newObject, KJS::Internal | KJS::DontEnum);
return newObject;
}
} // namespace
/**
* Helpers to define prototype objects (each of which simply implements
......@@ -317,37 +309,26 @@ inline KJS::JSObject *cacheGlobalObject(KJS::ExecState *exec, const KJS::Identif
* then the first line will use KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE, with DOMNodeProto as the second argument.
*/
// Work around a bug in GCC 4.1
#if !COMPILER(GCC)
#define KJS_GCC_ROOT_NS_HACK ::
#else
#define KJS_GCC_ROOT_NS_HACK
#endif
// These macros assume that a prototype's only properties are functions
#define KJS_DEFINE_PROTOTYPE(ClassProto) \
class ClassProto : public KJS::JSObject { \
friend KJS::JSObject *KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const KJS::Identifier &propertyName); \
public: \
static KJS::JSObject *self(KJS::ExecState *exec); \
virtual const KJS::ClassInfo *classInfo() const { return &info; } \
static KJS::JSObject* self(KJS::ExecState* exec); \
virtual const KJS::ClassInfo* classInfo() const { return &info; } \
static const KJS::ClassInfo info; \
bool getOwnPropertySlot(KJS::ExecState *, const KJS::Identifier&, KJS::PropertySlot&); \
protected: \
ClassProto(KJS::ExecState *exec) \
bool getOwnPropertySlot(KJS::ExecState* , const KJS::Identifier&, KJS::PropertySlot&); \
ClassProto(KJS::ExecState* exec) \
: KJS::JSObject(exec->lexicalInterpreter()->builtinObjectPrototype()) { } \
\
};
#define KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(ClassProto, ClassProtoProto) \
class ClassProto : public KJS::JSObject { \
friend KJS::JSObject* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(KJS::ExecState* exec, const KJS::Identifier& propertyName); \
public: \
static KJS::JSObject* self(KJS::ExecState* exec); \
virtual const KJS::ClassInfo* classInfo() const { return &info; } \
static const KJS::ClassInfo info; \
bool getOwnPropertySlot(KJS::ExecState*, const KJS::Identifier&, KJS::PropertySlot&); \
protected: \
ClassProto(KJS::ExecState* exec) \
: KJS::JSObject(ClassProtoProto::self(exec)) { } \
\
......@@ -355,11 +336,11 @@ inline KJS::JSObject *cacheGlobalObject(KJS::ExecState *exec, const KJS::Identif
#define KJS_IMPLEMENT_PROTOTYPE(ClassName, ClassProto, ClassFunc) \
const ClassInfo ClassProto::info = { ClassName, 0, &ClassProto##Table, 0 }; \
JSObject *ClassProto::self(ExecState *exec) \
JSObject* ClassProto::self(ExecState* exec) \
{ \
return ::cacheGlobalObject<ClassProto>(exec, "[[" ClassName ".prototype]]"); \
return KJS::cacheGlobalObject<ClassProto>(exec, "[[" ClassName ".prototype]]"); \
} \
bool ClassProto::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) \
bool ClassProto::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) \
{ \
return getStaticFunctionSlot<ClassFunc, JSObject>(exec, &ClassProto##Table, this, propertyName, slot); \
}
......@@ -374,23 +355,9 @@ inline KJS::JSObject *cacheGlobalObject(KJS::ExecState *exec, const KJS::Identif
put(exec, lengthPropertyName, jsNumber(len), DontDelete|ReadOnly|DontEnum); \
} \
/* Macro user needs to implement the callAsFunction function. */ \
virtual JSValue *callAsFunction(ExecState *exec, JSObject *thisObj, const List &args); \
virtual JSValue* callAsFunction(ExecState* exec, JSObject* thisObj, const List& args); \
private: \
int id; \
};
/*
* List of things to do when porting an objectimp to the 'static hashtable' mechanism:
* - write the hashtable source, between @begin and @end
* - add a rule to build the .lut.h
* - include the .lut.h
* - mention the table in the classinfo (add a classinfo if necessary)
* - write/update the class enum (for the tokens)
* - turn get() into getValueProperty(), put() into putValueProperty(), using a switch and removing funcs
* - write get() and/or put() using a template method
* - cleanup old stuff (e.g. hasProperty)
* - compile, test, commit ;)
*/
#endif
......@@ -38,6 +38,7 @@
*/
#include "Platform.h"
#include <inttypes.h>
#ifdef NDEBUG
#define ASSERTIONS_DISABLED_DEFAULT 1
......@@ -180,4 +181,4 @@ while (0)
#define JOIN_LOG_CHANNEL_WITH_PREFIX_LEVEL_2(prefix, channel) prefix ## channel
#endif
#endif // KXMLCORE_ASSERTIONS_H
#endif
2006-10-02 Nikolas Zimmermann <zimmermann@kde.org>
Reviewed by eseidel & mjs. Landed by eseidel.
Fix Qt/Linux build with older gcc 3.3.4.
http://bugs.webkit.org/show_bug.cgi?id=11116
As discussed with Maciej, the GCC_ROOT_NS_HACK
can be completely removed, as well as the friendship
between cacheGlobalObject & the JS* objects.
* bindings/scripts/CodeGeneratorJS.pm: Remove friendship.
* platform/image-decoders/png/pnggccrd.c: Fix comments for gcc3.
(png_read_filter_row_mmx_avg):
* platform/image-decoders/png/pngvcrd.c: Ditto.
(png_mmx_support):
(png_read_filter_row_mmx_avg):
2006-10-01 Maciej Stachowiak <mjs@apple.com>
Rubber stamped by Alexey.
......@@ -428,9 +428,6 @@ sub GenerateHeader
# Add prototype declaration -- code adopted from the KJS_DEFINE_PROTOTYPE and KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE macros
push(@headerContent, "class ${className}Proto : public KJS::JSObject {\n");
if (!$dataNode->extendedAttributes->{"DoNotCache"}) {
push(@headerContent, " friend KJS::JSObject* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<${className}Proto>(KJS::ExecState*, const KJS::Identifier& propertyName);\n");
}
push(@headerContent, "public:\n");
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
push(@headerContent, " static KJS::JSObject* self();\n");
......@@ -445,7 +442,6 @@ sub GenerateHeader
if ($numConstants ne 0) {
push(@headerContent, " KJS::JSValue* getValueProperty(KJS::ExecState*, int token) const;\n");
}
push(@headerContent, "protected:\n");
if ($dataNode->extendedAttributes->{"DoNotCache"}) {
push(@headerContent, " ${className}Proto() { }\n");
} else {
......@@ -626,7 +622,7 @@ sub GenerateImplementation
} else {
push(@implContent, "JSObject* ${className}Proto::self(ExecState* exec)\n");
push(@implContent, "{\n");
push(@implContent, " return ::cacheGlobalObject<${className}Proto>(exec, \"[[${className}.prototype]]\");\n");
push(@implContent, " return KJS::cacheGlobalObject<${className}Proto>(exec, \"[[${className}.prototype]]\");\n");
push(@implContent, "}\n\n");
}
if ($numConstants > 0 || $numFunctions > 0) {
......@@ -846,7 +842,7 @@ sub GenerateImplementation
if ($dataNode->extendedAttributes->{"GenerateConstructor"}) {
push(@implContent, "JSValue* ${className}::getConstructor(ExecState* exec)\n{\n");
push(@implContent, " return cacheGlobalObject<${className}Constructor>(exec, \"[[${interfaceName}.constructor]]\");\n");
push(@implContent, " return KJS::cacheGlobalObject<${className}Constructor>(exec, \"[[${interfaceName}.constructor]]\");\n");
push(@implContent, "}\n");
}
......
......@@ -2898,7 +2898,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid for active group)
/* lsb's were == 1 (only valid for active group) */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
// byte
......@@ -2918,7 +2918,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid for active group)
/* lsb's were == 1 (only valid for active group) */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
// byte
......@@ -2942,7 +2942,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid for active group)
/* lsb's were == 1 (only valid for active group) */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
// byte
......@@ -2978,8 +2978,8 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
case 6:
case 4:
//case 7: // who wrote this? PNG doesn't support 5 or 7 bytes/pixel
//case 5: // GRR BOGUS
/*case 7: who wrote this? PNG doesn't support 5 or 7 bytes/pixel
case 5: GRR BOGUS */
{
_ActiveMask.use = 0xffffffffffffffffLL; // use shift below to clear
// appropriate inactive bytes
......@@ -3023,7 +3023,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid for active group)
/* lsb's were == 1 (only valid for active group) */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
// byte
......@@ -3042,7 +3042,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid for active group)
/* lsb's were == 1 (only valid for active group) */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
// byte
......@@ -3114,7 +3114,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid
/* lsb's were == 1 (only valid */
// for active group)
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
......@@ -3135,7 +3135,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid
/* lsb's were == 1 (only valid */
// for active group)
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
......@@ -3155,7 +3155,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"movq %%mm3, %%mm1 \n\t" // now use mm1 for getting
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both lsb's were == 1
/* where both lsb's were == 1 */
// (only valid for active group)
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
......@@ -3177,7 +3177,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
// LBCarrys
"pand %%mm2, %%mm1 \n\t" // get LBCarrys for each byte
// where both
// lsb's were == 1 (only valid
/* lsb's were == 1 (only valid */
// for active group)
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm2 \n\t" // clear invalid bit 7 of each
......@@ -3288,7 +3288,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"pand %%mm1, %%mm3 \n\t" // get lsb for each prev_row byte
"psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2
"pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte
// where both lsb's were == 1
/* where both lsb's were == 1 */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm1 \n\t" // clear invalid bit 7, each byte
"paddb %%mm3, %%mm0 \n\t" // add LBCarrys to Avg, each byte
......@@ -3343,7 +3343,7 @@ png_read_filter_row_mmx_avg(png_row_infop row_info, png_bytep row,
"movq (%%edx,%%ebx,), %%mm2 \n\t"
"psrlq $1, %%mm1 \n\t" // divide prev_row bytes by 2
"pand %%mm2, %%mm3 \n\t" // get LBCarrys for each byte
// where both lsb's were == 1
/* where both lsb's were == 1 */
"psrlq $1, %%mm2 \n\t" // divide raw bytes by 2
"pand %%mm4, %%mm1 \n\t" // clear invalid bit 7 of each
// byte
......
......@@ -84,8 +84,8 @@ NOT_SUPPORTED:
pop ebx
}
//mmx_supported_local=0; // test code for force don't support MMX
//printf("MMX : %u (1=MMX supported)\n",mmx_supported_local);
/* mmx_supported_local=0; // test code for force don't support MMX
printf("MMX : %u (1=MMX supported)\n",mmx_supported_local); */
mmx_supported = mmx_supported_local;
return mmx_supported_local;
......@@ -2020,7 +2020,7 @@ davg3lp:
// Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2033,7 +2033,7 @@ davg3lp:
psllq mm2, ShiftBpp // shift data to position correctly
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2050,7 +2050,7 @@ davg3lp:
// get the correct x-bpp offset.
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2106,7 +2106,7 @@ davg4lp:
// Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2119,7 +2119,7 @@ davg4lp:
add ebx, 8
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2166,7 +2166,7 @@ davg2lp:
// Add 1st active group (Raw(x-bpp)/2) to Average with LBCarry
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2178,7 +2178,7 @@ davg2lp:
psllq mm2, ShiftBpp // shift data to position correctly
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2193,7 +2193,7 @@ davg2lp:
// get the correct x-bpp offset.
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2209,7 +2209,7 @@ davg2lp:
add ebx, 8
movq mm1, mm3 // now use mm1 for getting LBCarrys
pand mm1, mm2 // get LBCarrys for each byte where both
// lsb's were == 1 (Only valid for active group)
/* lsb's were == 1 (Only valid for active group) */
psrlq mm2, 1 // divide raw bytes by 2
pand mm2, mm4 // clear invalid bit 7 of each byte
paddb mm2, mm1 // add LBCarrys to (Raw(x-bpp)/2) for each byte
......@@ -2277,7 +2277,7 @@ davg8lp:
pand mm3, mm1 // get lsb for each prev_row byte
psrlq mm1, 1 // divide prev_row bytes by 2
pand mm3, mm2 // get LBCarrys for each byte where both
// lsb's were == 1
/* lsb's were == 1 */
psrlq mm2, 1 // divide raw bytes by 2
pand mm1, mm4 // clear invalid bit 7 of each byte
paddb mm0, mm3 // add LBCarrys to Avg for each byte
......@@ -2310,7 +2310,7 @@ davgAlp:
movq mm2, [edx + ebx]
psrlq mm1, 1 // divide prev_row bytes by 2
pand mm3, mm2 // get LBCarrys for each byte where both
// lsb's were == 1
/* lsb's were == 1 */
psrlq mm2, 1 // divide raw bytes by 2
pand mm1, mm4 // clear invalid bit 7 of each byte
paddb mm0, mm3 // add LBCarrys to Avg for each byte
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment