Changeset 31d07f11
- Timestamp:
- Jul 8, 2006, 5:52:42 PM (18 years ago)
- Branches:
- clfs-1.2, clfs-2.1, clfs-3.0.0-systemd, clfs-3.0.0-sysvinit, master, systemd, sysvinit
- Children:
- 05dcc14
- Parents:
- 91ad4a4
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
patches/linux-2.6.17.4-mips_fixes-2.patch
r91ad4a4 r31d07f11 229 229 +#define __ide_mm_outsw writesw 230 230 +#define __ide_mm_outsl writesl 231 diff -Naur linux-2.6.17.4/arch/mips/lib/ashldi3.c linux-2.6.17.4/arch/mips/lib/ashldi3.c 232 --- linux-2.6.17.4/arch/mips/lib/ashldi3.c 1969-12-31 16:00:00.000000000 -0800 233 +++ linux-2.6.17.4/arch/mips/lib/ashldi3.c 2006-06-19 18:16:13.000000000 -0700 234 @@ -0,0 +1,29 @@ 235 +#include <linux/module.h> 236 + 237 +#include "libgcc.h" 238 + 239 +long long __ashldi3(long long u, word_type b) 240 +{ 241 + DWunion uu, w; 242 + word_type bm; 243 + 244 + if (b == 0) 245 + return u; 246 + 247 + uu.ll = u; 248 + bm = 32 - b; 249 + 250 + if (bm <= 0) { 251 + w.s.low = 0; 252 + w.s.high = (unsigned int) uu.s.low << -bm; 253 + } else { 254 + const unsigned int carries = (unsigned int) uu.s.low >> bm; 255 + 256 + w.s.low = (unsigned int) uu.s.low << b; 257 + w.s.high = ((unsigned int) uu.s.high << b) | carries; 258 + } 259 + 260 + return w.ll; 261 +} 262 + 263 +EXPORT_SYMBOL(__ashldi3); 264 diff -Naur linux-2.6.17.4/arch/mips/lib/ashrdi3.c linux-2.6.17.4/arch/mips/lib/ashrdi3.c 265 --- linux-2.6.17.4/arch/mips/lib/ashrdi3.c 1969-12-31 16:00:00.000000000 -0800 266 +++ linux-2.6.17.4/arch/mips/lib/ashrdi3.c 2006-06-19 18:16:13.000000000 -0700 267 @@ -0,0 +1,31 @@ 268 +#include <linux/module.h> 269 + 270 +#include "libgcc.h" 271 + 272 +long long __ashrdi3(long long u, word_type b) 273 +{ 274 + DWunion uu, w; 275 + word_type bm; 276 + 277 + if (b == 0) 278 + return u; 279 + 280 + uu.ll = u; 281 + bm = 32 - b; 282 + 283 + if (bm <= 0) { 284 + /* w.s.high = 1..1 or 0..0 */ 285 + w.s.high = 286 + uu.s.high >> 31; 287 + w.s.low = uu.s.high >> -bm; 288 + } else { 289 + const unsigned int carries = (unsigned int) uu.s.high << bm; 290 + 291 + w.s.high = uu.s.high >> b; 292 + w.s.low = ((unsigned int) uu.s.low >> b) | carries; 293 + } 294 + 295 + return w.ll; 296 +} 297 + 298 +EXPORT_SYMBOL(__ashrdi3); 299 diff -Naur linux-2.6.17.4/arch/mips/lib/libgcc.h linux-2.6.17.4/arch/mips/lib/libgcc.h 300 --- linux-2.6.17.4/arch/mips/lib/libgcc.h 1969-12-31 16:00:00.000000000 -0800 301 +++ linux-2.6.17.4/arch/mips/lib/libgcc.h 2006-06-19 18:16:13.000000000 -0700 302 @@ -0,0 +1,26 @@ 303 +#ifndef __ASM_LIBGCC_H 304 +#define __ASM_LIBGCC_H 305 + 306 +#include <asm/byteorder.h> 307 + 308 +typedef int word_type __attribute__ ((mode (__word__))); 309 + 310 +#ifdef __BIG_ENDIAN 311 +struct DWstruct { 312 + int high, low; 313 +}; 314 +#elif defined(__LITTLE_ENDIAN) 315 +struct DWstruct { 316 + int low, high; 317 +}; 318 +#else 319 +#error I feel sick. 320 +#endif 321 + 322 +typedef union 323 +{ 324 + struct DWstruct s; 325 + long long ll; 326 +} DWunion; 327 + 328 +#endif /* __ASM_LIBGCC_H */ 329 diff -Naur linux-2.6.17.4/arch/mips/lib/lshrdi3.c linux-2.6.17.4/arch/mips/lib/lshrdi3.c 330 --- linux-2.6.17.4/arch/mips/lib/lshrdi3.c 1969-12-31 16:00:00.000000000 -0800 331 +++ linux-2.6.17.4/arch/mips/lib/lshrdi3.c 2006-06-19 18:16:13.000000000 -0700 332 @@ -0,0 +1,29 @@ 333 +#include <linux/module.h> 334 + 335 +#include "libgcc.h" 336 + 337 +long long __lshrdi3(long long u, word_type b) 338 +{ 339 + DWunion uu, w; 340 + word_type bm; 341 + 342 + if (b == 0) 343 + return u; 344 + 345 + uu.ll = u; 346 + bm = 32 - b; 347 + 348 + if (bm <= 0) { 349 + w.s.high = 0; 350 + w.s.low = (unsigned int) uu.s.high >> -bm; 351 + } else { 352 + const unsigned int carries = (unsigned int) uu.s.high << bm; 353 + 354 + w.s.high = (unsigned int) uu.s.high >> b; 355 + w.s.low = ((unsigned int) uu.s.low >> b) | carries; 356 + } 357 + 358 + return w.ll; 359 +} 360 + 361 +EXPORT_SYMBOL(__lshrdi3);
Note:
See TracChangeset
for help on using the changeset viewer.