+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.
/**
* s is the key (e.g. a property name)
*/
- const char *s;
+ const char* s;
/**
* value is the result value (usually an enum value)
/**
* next is the pointer to the next entry for the same hash value
*/
- const HashEntry *next;
+ const HashEntry* next;
};
/**
* 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.
*/
/**
* 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);
/**
* 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&);
};
* 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;
}
* 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();
* @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);
* 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);
* 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);
* 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)
{
* 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)
{
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
* 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)) { } \
\
#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); \
}
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
*/
#include "Platform.h"
+#include <inttypes.h>
#ifdef NDEBUG
#define ASSERTIONS_DISABLED_DEFAULT 1
#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.
# 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");
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 {
} 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) {
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");
}
// 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
// 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
// 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
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
// 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
// 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
// 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
// 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
"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
// 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
"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
"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
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;
// 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
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
// 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
// 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
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
// 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
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
// 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
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
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
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